Community Tip - You can change your system assigned username to something more personal in your community settings. X
Check attached files.
My attempt is to solve for x at a certain p value. Can anyone explain why the solve command and solve block fails?
Manilka Jayasooriya
Solved! Go to Solution.
1) The assume keyword does not filter the results, it determines assumptions about the variables on the LHS. If you want to filter the results you have to assign them to a numeric variable and then filter them as a second step.
2) I assume you are referring to the solve shown in the screenshot. You are simply asking too much of the symbolic solver. That expression is far too complex for there to be a symbolic solution. You will have to solve it numerically (with a solve block, as in NEW 18......mcdx)
3) There is no such attachment
4) No. You can assign the result to a variable, and then filter the vector for real roots, but that's all.
5) No. I have never seen that before.
1) The assume keyword does not filter the results, it determines assumptions about the variables on the LHS. If you want to filter the results you have to assign them to a numeric variable and then filter them as a second step.
2) I assume you are referring to the solve shown in the screenshot. You are simply asking too much of the symbolic solver. That expression is far too complex for there to be a symbolic solution. You will have to solve it numerically (with a solve block, as in NEW 18......mcdx)
3) There is no such attachment
4) No. You can assign the result to a variable, and then filter the vector for real roots, but that's all.
5) No. I have never seen that before.
Thanks Rich..
The "assume" command is a beast and ever so often you will not get the wished for result.
But this does not mean that it fails every time, though - the example you posted works OK:
But you may run into troubles if you have more unknowns in your formula and maybe even units (which the symbolics does not know anything about). You will have to tell Mathcad singly (using "ALL" ever so often fails) for every unit and variable that its real, maybe that its positive (that implies real anyway) or, if you have expressions like sqrt(a-b), that a>=b, etc. That can be very cumbersome and there is no guarantee that it will work OK. You will have to give it a try.
WE
Here are some further examples of how to use assume to filter/constrain your symbolic calculations:
1) Filter for the positive solutions of an equation:
2) Solving an goniometric equation
lets look at ALL (infinite) solutions
or at all solutions within a given range
3) But as already stated, Mathcad symbolics is limited and so is its solver. In this example it refuses to show the second solution of the given equation.
Maybe it has to do with the fact, that muPad is here forced to switch to numeric/float mode - I don't know.
Plotting assures us as of the two solutions:
but the symbolics is not able to calculate the positive solution
we have to use Mathcads own numerics to get what we want
Facit: You have to play around and give different combinations of keywords a try. Mathcads symbolics (muPad) sure is not the best available but its all we have in Mathcad.
WE