Problem with solve block again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Labels:
-
Mathcad Usage
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
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:
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:
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.
I really don't understand why the solve block fails so badly, the cubic looks quite innocent and well-behaved
Prime 10 sheet attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please attach worksheet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
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:
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:
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.
I really don't understand why the solve block fails so badly, the cubic looks quite innocent and well-behaved
Prime 10 sheet attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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à!
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.
