Problem with zeros and solve in HP Prime.
|
01-20-2014, 10:01 PM
(This post was last modified: 01-20-2014 11:27 PM by Han.)
Post: #4
|
|||
|
|||
RE: Problem with zeros and solve in HP Prime.
zeros() works fine when used as follows:
Code: zeros("(x-1)*(x-2)*(x+1)*e^(-1/2*x^2)","x") as does the case when e^() is replaced with exp(). You were correct to cast fd as a string. I wonder if there is an issue with your use of collect() -- it too is a CAS command and requires its arguments to be cast as strings. So if d(1) is not a string, you might get nonsensical results since it will be evaluated via the Home view. Also you do not need to add two null strings when forming temp, if the goal is simply to cast fd as a string. Use one of the two shown below: Code: temp:=""+fd; // or Be aware that STRING() and string() behave slightly differently depending on Home vs CAS view. This is not an issue in a program since everything executes as if in the Home view. An easy way to track down the problem debug it. Here's an example of how to implement it. Usage: EXTREMA("x^3-3*x","x") Note that only minimal error checking is in place. Your actual program should check to see if complex mode is on (this may affect the results of zeros()), and other details I have left out. Code:
Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Problem with zeros and solve in HP Prime. - John P - 01-20-2014, 11:08 AM
RE: Problem with zeros and solve in HP Prime. - Han - 01-20-2014, 03:11 PM
RE: Problem with zeros and solve in HP Prime. - John P - 01-20-2014, 04:08 PM
RE: Problem with zeros and solve in HP Prime. - Han - 01-20-2014 10:01 PM
RE: Problem with zeros and solve in HP Prime. - Michael de Estrada - 01-21-2014, 01:19 AM
RE: Problem with zeros and solve in HP Prime. - Han - 01-21-2014, 01:31 AM
RE: Problem with zeros and solve in HP Prime. - John P - 01-21-2014, 10:18 AM
|
User(s) browsing this thread: 2 Guest(s)