▼
Posts: 109
Threads: 38
Joined: Dec 2012
When using the template in CAS to type in f'(sin x) where x=pi/3, I get the expected 1/2. In home, if 0 is stored in X, the same derivative evaluates as 0. Why doesn't using the "where X=pi/3" temporarily override the 0 that was stored in X to produce the expected 1/2?
▼
Posts: 1,665
Threads: 142
Joined: Jan 2009
If you use the form SLOPE(SIN(X),pi/3), you get the correct answer.
▼
Posts: 109
Threads: 38
Joined: Dec 2012
Thanks. How do I know when it is appropriate to use the "where X=" template. Is this meant mainly for CAS?
▼
Posts: 1,665
Threads: 142
Joined: Jan 2009
Well basically the ' derivative is the CAS function diff, which is primarily a symbolic operation, so you are going to have problems using it outside of CAS. Capital X is a reserved real number variable, whereas small x is just a symbol that can take on a numeric value. SLOPE OTOH is a nonCAS operation that is numeric in nature, hence the format where you assign a numeric value to the point where you want to find the derivative. You can still use SLOPE in CAS if you want to as well as Home. Small letter operations and functions like diff are typically CAS, whereas capital lettered ones like SLOPE are nonCAS.
Posts: 11
Threads: 3
Joined: Nov 2013
Richard, by "using the template," I assume you mean you are using the derivative template on the math template key rather than typing "diff" on the entry line. True? If so, I don't see how you are able to add a "where X=pi/3" with the template. What exactly did you mean by that?
I've been evaluating derivatives at specific points in CAS View with
eval(diff(sin(x)),x=pi/3)
Have you found a better way using the templates?
I was getting so many uppercaselowercase errors that I just stay in CAS now unless I'm just doing simple "scientific calculator" math. If I want to get an approximate answer instead of a symbolic one, I use Shift+Enter instead of Enter rather than going back to Home View.
▼
Posts: 1,665
Threads: 142
Joined: Jan 2009
Which is why I will use a nonCAS alternative such as SLOPE if it is available. It works w/o any drama anywhere, including programs, and no worrying about upper case vs lower case, quotes, local vs global variables etc. I find CAS to be most useful when seeking purely symbolic results.
Edited: 30 Nov 2013, 10:14 a.m.
Posts: 109
Threads: 38
Joined: Dec 2012
I used the template key and chose where f(x) = choice and filled the template in (choosing template again to enter the function to differentiate) and then filled in the where X= part. This way of doing worked in CAS, but the where x= Option would not override whatever had been stored in X (0, for example) in home view. I could use the template for differentiating an equation in home, and simply store my value of interest in X, and it would work. Seemed strange that the use of the where X= template wouldn't temporarily override the stored X value. If I didn't recognize an answer as wrong, I would be mislead by this procedure not working in home.
▼
Posts: 11
Threads: 3
Joined: Nov 2013
Sorry, I still don't understand. I am in CAS View and have the math template key pressed now (the key with "Units" and "C" on it), and there is no "f(x) = choice" kind of option, nor is there a "where X=" part. Precisely what key are you pressing to get this?
▼
Posts: 1,665
Threads: 142
Joined: Jan 2009
You have to first enter the derivative template (fourth item on first row), make the entries, then enter the where bar , after which the where options will appear as you enter them.
Posts: 109
Threads: 38
Joined: Dec 2012
You are right there...the where variable equals option is the choice on the template menu immediately left of the differentiate choice. This works fine in CAS, but the where variable equals whatever option will not override whatever had been stored in X in home which I find strange, and misleading to a student that might try this in the home view...an correct answer for whatever had been stored in X will come up in home instead.
▼
Posts: 11
Threads: 3
Joined: Nov 2013
Got it. Thanks.
By the way, I get exactly the same behavior as you do in Home View.
Posts: 709
Threads: 104
Joined: Nov 2005
Quote:
When using the template in CAS to type in f'(sin x) where x=pi/3, I get the expected 1/2. In home, if 0 is stored in X, the same derivative evaluates as 0. Why doesn't using the "where X=pi/3" temporarily override the 0 that was stored in X to produce the expected 1/2?
What exactly did you mean by: f'(sin x) ? I would interpret this as: f(x) is a predefined function, and we wish to evaluate the derivative of f(x) at sin(x). Perhaps you meant simply to take the derivative of f(x) = sin(x), and evaluate the result at x=pi/3?
In CAS view, type:
f(x) := sin(x);
g := f' ;
Now, whether you are in HOME or CAS, you can simply type:
g(pi/3)
to get the correct result.
With respect to using they templates:
As you have noticed, the behavior is different in CAS and HOME view. It's just how things were designed on the HP Prime. For symbolic manipulation and exact evaluation, use CAS view.
▼
Posts: 109
Threads: 38
Joined: Dec 2012
Thanks for the discussion and working solution. I do hope for more intuitive consistency between home and CAS. By offering the template option of "where variable equals", it implies that this has been offered to me as a handy tool to accomplish this sort of task. If it won't work in home, it should be grayed out perhaps. In any case, consistency between CAS and home should be a goal for intuitive use of this wonderful creation! I remembering wondering with a friend while a senior in high school...19711972...how wonderful it would be for such an instrument to be possible!
