Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi,
I'm straggling to understand why with solve block i get accurate solution, whereas writing down the expression i don't get the right answer with arrow and "solve" function..
Thanks in advance.
Solved! Go to Solution.
Always attach the worksheet itself, not just a picture.
It looks like your equation has more than just one solution.
The solve block will give you the one based on your guess value.
The symbolic solve chose one of the solutions at its own will and it happens to be a different one.
You may try to put both solutions into your equation and see if they satisfy it (up to a certain inaccuracy)
Chances are that the solution of the symbolics will end up in an overflow (number exceeds 10^308)
You may try to add the modifier "assume, T2>100". It should help, but usually it doesn't and the symbolics will ignore it.
Guess you will have to stay with the numeric solve block.
BTW, using the numeric root() function in one of its two flavors instead of the solve block might be an option, too.
Always attach the worksheet itself, not just a picture.
It looks like your equation has more than just one solution.
The solve block will give you the one based on your guess value.
The symbolic solve chose one of the solutions at its own will and it happens to be a different one.
You may try to put both solutions into your equation and see if they satisfy it (up to a certain inaccuracy)
Chances are that the solution of the symbolics will end up in an overflow (number exceeds 10^308)
You may try to add the modifier "assume, T2>100". It should help, but usually it doesn't and the symbolics will ignore it.
Guess you will have to stay with the numeric solve block.
BTW, using the numeric root() function in one of its two flavors instead of the solve block might be an option, too.
Thanks for the comment.
the file attached to the original post.
Root works perfects in this case... thanks
The general solution to your problem is:
It contains the Lambert W 'function', that consists of two branches, for negative arguments.
The W function occurs in solutions of the problem x=z*exp(-x):
To get an impression of the upper branch:
The negative limit for z is -1/e, lower (more negative) values of z, the function has no real solutions (but may have complex solutions). The lower branch starts at the point (-1/e , -1) and turns downward and towards the y-axis where it stops.
Now with:
we get:
And the argument to the W function is:
negative, and within -1/e and 0, so there are two solutions.
One of them is:
Success!
Luc
Thanks!
how did you get the second solution, which it the expected one? "1008.4"
thanks
Luc is using an older Mathcad version (11) which has a symbolic engine (Maple) thats much more capable than what PTC had built into Prime (Axiom/friCAS). So you can't duplicate what he had done.
I rewrote your equation and defined a function
and we are now looking at its zeros. A plot shows the zero at around 1000
which is what your solve block had found and which easily could be found, too, by using the root function
But if we zoom in we see that there is another solution, too, at approx. 90
Your solve block sure would be able to find it using a different guess value and of course the roor function succeeds, too
Upon further zooming we get the impression that there is a third zero at T2=0,
but the function is not defined for T2=0 because of a division by zero. Nonetheless the limit when we approach zero from the right actually is zero
and this is the (only) wrong solution the symbolic in Prime is willing to deliver.
Its wrong twofold because its inaccurate (it should be exactly zero) and because the function is not defined at x=0.
So why not stay with numeric methods?
If your goal was to derive a closed expression for T2 you can't do so in Prime as the symbolic engine is not capable enough.
But if you intended to compare the solutions when you vary certain input values, you can do so using the numeric methods as well as you can turn the solve block as well as the root function into a fucntion of the desired input variables.
As an example the pic below shows the value of T2 for various values of n
BTW, I also tried in Mathcad 15 which had muPad implemented for symbolic operations (less capable than Maple in MC11, but probably a bit more powerful compared to the new engine in Prime)
It can't solve the equation symbolically, but when provided values for the variables it delivers at first a non-real solution.
But we can tell the symbolics that all variables (including T2) are positive (and therefore real). Now we get the first solution 90.6.
Unfortunately the modifier "assume, T2>500" is ignored so it could not be talked into returning the second real solution.