The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

[HP Prime] Tips for Solving Differential Equations More Efficiently
Message #1 Posted by Chris Pem10 on 21 Nov 2013, 2:52 p.m.

I'd like to throw out a few ideas regarding solving differential equations on the Prime.

1. The tick mark used to denote differentiation of a function is too many keystrokes away (Shift -> Chars -> ' -> OK). In fact, it took quite a while to hunt it down. It is one keystroke on the HP48,50 and two strokes on the HP49. Perhaps I can redefine a key on the Prime?

Bonus points: have the "Template" key pop up symbols/characters that are relevant to the function currently being entered on the stack. For instance, if I've chosen desolve(), have the template key display the tick mark along with the other things already displayed.

2. I'd like to plot the solution of desolve(). CAS mode uses lowercase variables and the plotter wants uppercase. I've tried limping along in the CAS, explicitly typing uppercase X for my variable... and it "works"; but I feel I'm abusing the way the CAS was meant to be used. I also feel that at some point I'll screw up and my calc will substitute a numerical value of X into my expression and I'll never be the wiser.

So what I'd like to do is just use the CAS as intended; with lower case variables. I'd like to write a small app, lets call it "PlotCAS", that will copy my CAS expression off the CAS stack, replace all lower case x variables with X, and store the result in variable G7. Not sure if it's possible... "find and replace" method might end up clobbering any math functions whose name contained the letter x? Symbolic side of the calc may substitute 0, or the latest numeric value for X, for all instances of X after the substitution?

Not expecting anyone here to program it for me... just want to know if it is feasible.

      
Re: [HP Prime] Tips for Solving Differential Equations More Efficiently
Message #2 Posted by Helge Gabert on 21 Nov 2013, 5:46 p.m.,
in response to message #1 by Chris Pem10

Re: 2) You should be able to do just this:

G7 := subst(here is your expression or equation, x='X')

            
Re: [HP Prime] Tips for Solving Differential Equations More Efficiently
Message #3 Posted by Chris Pem10 on 21 Nov 2013, 9:08 p.m.,
in response to message #2 by Helge Gabert

The substitution of x='X' works, but the G7:= throws an error. I also tried subst(..., x='X') |> G7 but it didn't work either (the |> is my attempt to show Sto here). Only tested it on the stack; were you implying that it should work within a program?

                  
Re: [HP Prime] Tips for Solving Differential Equations More Efficiently
Message #4 Posted by Helge Gabert on 21 Nov 2013, 10:06 p.m.,
in response to message #3 by Chris Pem10

Sigh - - at least subst(. . . , x='X') works.

I guess you'll just have to highlight the expression, copy, and then paste it into the graphing environment.

or

try something like A7:=' . . . '; that works. Does it need to be named G7?

                        
Re: [HP Prime] Tips for Solving Differential Equations More Efficiently
Message #5 Posted by Chris Pem10 on 22 Nov 2013, 12:42 p.m.,
in response to message #4 by Helge Gabert

No, needn't be G7. I thought that variable was used to store one of the expression to be graphed in the Function app. I was trying to sneak my expression into the app by saving it as one of the expressions loaded when the app is started. I'll have to do some reading to find out if that can be done.

Perhaps variable F7 ?

Yes, this works:

F7:=subst(sin(x),x='X')

results in F7(X)=SIN(X) being populated in the Function app.

Thanks everyone.

Edited: 22 Nov 2013, 12:48 p.m.

                              
Re: [HP Prime] Tips for Solving Differential Equations More Efficiently
Message #6 Posted by CR Haeger on 23 Nov 2013, 9:25 a.m.,
in response to message #5 by Chris Pem10

F7:=subst(sin(x),x='X'). This seems to work okay in CAS.

Is it possible to use this type of expression in the spreadsheet app? If so, it would be handy for PLOTTING CAS expressions generated in the spreadsheet.

=F7:=subst(sin(x),x='X') and =Function.F7:=subst(sin(x),x='X') do not seem to store the symbolic expression in F7.

Best, Carl

                  
Re: [HP Prime] Tips for Solving Differential Equations More Efficiently
Message #7 Posted by Han on 22 Nov 2013, 12:20 a.m.,
in response to message #3 by Chris Pem10

Quote:
The substitution of x='X' works, but the G7:= throws an error. I also tried subst(..., x='X') |> G7 but it didn't work either (the |> is my attempt to show Sto here). Only tested it on the stack; were you implying that it should work within a program?

I believe G7 is a frame buffer (graphic object) used by the system. G0 is the current display, and G1 through G9 can be used as extra buffers. See DIMGROB and related commands.

      
Re: [HP Prime] Tips for Solving Differential Equations More Efficiently
Message #8 Posted by Tim Wessman on 21 Nov 2013, 6:06 p.m.,
in response to message #1 by Chris Pem10

Re 1)

SHIFT () BKSP

TW

            
Re: [HP Prime] Tips for Solving Differential Equations More Efficiently
Message #9 Posted by Chris Pem10 on 21 Nov 2013, 8:25 p.m.,
in response to message #8 by Tim Wessman

Quote:
Re 1)

SHIFT () BKSP

TW


Well I feel silly. Didn't know the little square with touchdown arms were tick marks.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall