Skip to main content
3-Newcomer
February 7, 2025
Solved

Problem with solve block again

  • February 7, 2025
  • 2 replies
  • 1092 views

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

 

Best answer by Werner_E

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

 

 

2 replies

15-Moonstone
February 7, 2025

Please attach worksheet.

15-Moonstone
February 7, 2025

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_E25-Diamond IAnswer
25-Diamond I
February 7, 2025

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

 

 

3-Newcomer
February 7, 2025

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.