Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Translate the entire conversation x

Problem with solve block again

SM_11353843
3-Newcomer

Problem with solve block again

The solve block is not finding a solution. I'm using Mathcad Prime 10


But using the same formula I can iterate a solution I think is convenient enough. What am I doing wrong?
I though maybe changing TOL or CTOL would be the solution but no.

 

SM_11353843_0-1738942808069.png

SM_11353843_1-1738942855352.png

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:SM_11353843)

Its amongst others a matter of choosing the correct guess value.

I turned the solve block into a function with the guess value as function argument, so we can easily check different guesses.

Werner_E_0-1738953294570.png

I don't understand why the solve block fails for most guesses and will only work around 9,73 ksi, which actually is just one of three possible solutions. I also tried to choose different algorithms for 'find' to use, but to no avail.

 

The equation you try to solve is a simple cubic equation which  of course can be solved by Primes symbolics:

Werner_E_1-1738953514108.png

Being a polynomial we can also solve it using the "polyroots" function. This functions expects the coefficients of the equation as its argument and not the equation itself. So I used the symbolics to get the coefficients the most convenient way:

Werner_E_2-1738953614502.png

 

But I would suggest that you rater use Primes "root function. It seems to be much more benign and easily finds all solutions with suitable guess values.

Werner_E_3-1738954126041.png

 

I really don't understand why the solve block fails so badly, the cubic looks quite innocent and well-behaved

Werner_E_4-1738954191794.png

 

Prime 10 sheet attached

 

 

View solution in original post

6 REPLIES 6

Please attach worksheet.

 

No clue as to what your program does. But symbolc engine can find answers, and answer as a guess satisfies solve block. Prime 10 file attached.

Roger

 

Werner_E
25-Diamond I
(To:SM_11353843)

Its amongst others a matter of choosing the correct guess value.

I turned the solve block into a function with the guess value as function argument, so we can easily check different guesses.

Werner_E_0-1738953294570.png

I don't understand why the solve block fails for most guesses and will only work around 9,73 ksi, which actually is just one of three possible solutions. I also tried to choose different algorithms for 'find' to use, but to no avail.

 

The equation you try to solve is a simple cubic equation which  of course can be solved by Primes symbolics:

Werner_E_1-1738953514108.png

Being a polynomial we can also solve it using the "polyroots" function. This functions expects the coefficients of the equation as its argument and not the equation itself. So I used the symbolics to get the coefficients the most convenient way:

Werner_E_2-1738953614502.png

 

But I would suggest that you rater use Primes "root function. It seems to be much more benign and easily finds all solutions with suitable guess values.

Werner_E_3-1738954126041.png

 

I really don't understand why the solve block fails so badly, the cubic looks quite innocent and well-behaved

Werner_E_4-1738954191794.png

 

Prime 10 sheet attached

 

 

Thank you all for your time. I thought about trying (some of) these alternates you analyzed but I don't have the Mathcad knowledge to tackle them.
You are very clever, thank you. Maybe the Mathcad devs can see into this matter to improve the solve block utility.

Werner_E
25-Diamond I
(To:Werner_E)

Continued to play around with the solve block and "find".

I thought that the problem might be the missing unit (ksi^3) on the right  hand side after the zero.

Then I had the idea to divide the equation by ksi^3 and ... voilà!

Werner_E_5-1738954883040.png

As you can see we get a result using your guess value 30ksi as well.

 

So there is something PTC could/should  fix/improve considering usage of units in a solve block.

Announcements

Top Tags