SOLVE wrong answers

05262022, 08:03 AM
Post: #1




SOLVE wrong answers
Hi,
When inputting solve(15=1.7*10*x^(3/2) ,x) into the CAS page, it yields an answer of {0.456...} which is incorrect. I have used lowercase 'x'. the answer is supposed to be 0.9199... please advise on why this is happening and how to fix it. thank you in advance! 

05262022, 11:21 AM
Post: #2




RE: SOLVE wrong answers
Try purge(x), or x='x', before solve. This may fix it.


05262022, 01:22 PM
Post: #3




RE: SOLVE wrong answers
I get the proper answer in CAS of 0.9199... However, as well as following Albert's advice it's worth bearing in mind that you should be using fsolve for that particular problem, as it's a numerical solve problem.
Luckily the Prime gracefully uses Newton's bisection method as a symbolic solve isn't apt for the problem, but it's good to get in the habit of using the apt solve for the job at hand. You can't always be sure that the Prime OS will gracefully fix your error. 

05262022, 05:35 PM
(This post was last modified: 05262022 05:44 PM by C.Ret.)
Post: #4




RE: SOLVE wrong answers
(05262022 11:21 AM)Albert Chan Wrote: Try purge(x), or x='x', before solve. This may fix it. Purging the 'x' variable is strongly recommended. See, in the following capture, I deliberately give a value to the symbolic variable x, this does affect the resolution of a nonsymbolic expression by taking x=2 as the initial value. Consequently, the format of the input is of great importance since a nonsymbolic expression greatly affects the behavior of the CAS. (05262022 01:22 PM)jonmoore Wrote: I get the proper answer in CAS of 0.9199... However, as well as following Albert's advice it's worth bearing in mind that you should be using fsolve for that particular problem, as it's a numerical solve problem. An alternative method is to use solve, but deliberately giving a guess value or limiting the resolution to a specified interval. See the following screenshot. All the power of the solve function in CAS mode is summarized in its online help: Quote:Syntax: The most important fact, missing from the help explanations, is that the symbolic resolve function returns a list while the numeric resolve subroutine gives only a numeric output. The key detail in the user's equation is that ks2000 enters 1.7*10, which does not have the same meaning as the exact, symbolic integer 17. This has a determining effect on how the CAS of the HP Prime interprets the data and on the type of resolution. See in the screen capture the format of the result depending of entry containing a symbolic 17 versus a 1.7*10 expression. In case of a nonsymbolic expression, giving an intial guess (or a range interval) is strongly recommended. 

05262022, 06:57 PM
Post: #5




RE: SOLVE wrong answers
(05262022 05:35 PM)C.Ret Wrote: An alternative method is to use solve, but deliberately giving a guess value or limiting the resolution to a specified interval. I would advise faithfully solving with "purged" variables. Purging not only remove its value, but its assumption (if any) Alternative method(s) work (because we tried it ?), but it may not. (unless documentation stated otherwise) 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)