cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Division by zero error - Mathcad Prime 7

Cornel
19-Tanzanite

Division by zero error - Mathcad Prime 7

Hello,

CornelBejan_0-1674111807043.png


Thank you.

Mathcad Prime 7 file attached.

ACCEPTED SOLUTION

Accepted Solutions

Well, sorry Terry, let's rethink this a bit:

Fred_Kohlhepp_0-1674133048903.png

 

View solution in original post

10 REPLIES 10

Hi,

First and last equations of the four can be rearranged and substituted into second and third equations meaning only two independent equations are used to find four variables and this is not possible.

Capture.JPG

Cheers Terry

Here are the solutions obtained in Mathcad 11 with above 4 equations and 4 unknown variables (L1, L2, C1, ws): 

 

CornelBejan_1-1674123050941.png

CornelBejan_2-1674123059098.png

CornelBejan_4-1674123083194.png

CornelBejan_5-1674123089582.png

So, these solutions I want to obtained also in Mathcad Prime 7.

 

 

Werner_E
25-Diamond I
(To:Cornel)



So, these solutions I want to obtained also in Mathcad Prime 7.

 


Rule of thumb: If you wan to see the result which Maple (the symbolics in MC11) is able to deliver, you should use Maple!

 

Maple in MC11 was much superior compared to muPad in later versions (up to Prime 6). And muPad on the other hand seems to have been superior to Axom/FriCAS which now is used for symbolic calculations in Prime.

 

In Prime 6 we can switch over to muPad and also muPad cannot solve your system as it is. But if we do without the last equation (which is independent from the others) and if we help muPad (squaring the two equations to get rid of the roots) it is able to deliver the desired result.

Werner_E_0-1674133891861.png

 

But I was not able to talk the new symbolics into delivering a similar result.

Maybe friCAS in Prime needs even some more manual help, maybe replacing L2 by n*L1 as Fred showed can help. But then why should we use the symbolic engine at all if we have to solve half of the system manually ourselves?

The point is that it looks to me that you are not using the right tool for the problems you'd like to solve. Your various questions here in the forum ever so often show that the symbolic in Prime simply is not capable enough for your needs even if here and there we could find a clumsy workaround to elicit a reasonable result from Prime after all.

Its sad but things got worse from Maple to muPad to friCAS.

Feel free to report this problem here as a bug to PTC support. Then maybe in 10 or 20 years .... who knows?

Well, sorry Terry, let's rethink this a bit:

Fred_Kohlhepp_0-1674133048903.png

 

LucMeekes
23-Emerald III
(To:Cornel)

To add to the discussion:

Mathcad 11:

LucMeekes_0-1674250084948.png

Prime 7:

LucMeekes_1-1674250193740.png

That error is the 'division by zero' error.

 

To show the Mathcad 11 result for the second set is valid (given positive values for all knowns):

LucMeekes_0-1674251524702.png

 

 

Success!

Luc

Just to dot an i

 

Maple (Flow) still can generate the answer:

Fred_Kohlhepp_0-1674411327377.png

 

Mathcad 15 also has no problems (if we omit the last, independent equation, Neither using the symbolic "solve", nor by symbolically evaluate a solve block with "find".

Werner_E_0-1674418816430.png

 

Cornel
19-Tanzanite
(To:Werner_E)

This is what Mathcad Prime (8) says 🙂
CornelBejan_1-1674421659105.png

 

CornelBejan_2-1674421869580.png

 

CornelBejan_0-1674422764056.png

 

Hm...it's fine, even manual in some way for this job...

The big problem is with the other topic with those big powers of s (s^30, etc.). I will post about this thing...

Cornel
19-Tanzanite
(To:Werner_E)

Something seems wrong here...

CornelBejan_4-1674423190717.png

 

The correct expressions for L1, L2 and C1 are:

CornelBejan_3-1674423157788.png

 

 

Werner_E
25-Diamond I
(To:Cornel)

Oops! I had a typo in the last equation (L1+L1 instead of L1+L2) 😞

After correcting this MC15 fails to find a solution. Only after getting rid of the roots we get a solution

Werner_E_0-1674429768197.png

So (not surprisingly) it shows the same behaviour which I already had shown with Prime and the legacy engine.

Announcements

Top Tags