HP Forums

Full Version: solving diff. equations on Prime vs 50g and 48G ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
In this 50G tutorial is explained how to solve differential equations with iterations : it's intuitive and can be done on the 48GX as well.
https://www.ele.uri.edu/faculty/vetter/O...ations.pdf

It's computed numerically(kind of Runge Kutta?) step by step in a convenient way and it is said : "The most convenient way to numerically solve a differential equation is the built-in numeric differential equation
solver and its input form
" See last pages of this URL.
The Example 2 is interesting : "A physical body moves under the influence of a constant force F in a viscous liquid. The differential equation of its
motion is"
etc.

I wonder how this way of computing can be done on the HP Prime, numerically, step by step.

Eddie has proposed a way to "mimics" DE numerical solving, in a creative way, inside the Geometry app :
http://edspi31415.blogspot.com/2015/11/h...art-5.html

Any idea ?

PS: I don't want here play with a symbolic CAS solution ;-)
thanks,
This:

Syntax:
odesolve(Expr, VectVar, VectInit, FinalVal, [tstep=Val, curve])

Ordinary Differential Equation solver

Solves an ordinary differential equation given by Expr, with variables declared in VectVar and initial conditions for those variables declared in VectInit. For example, odesolve(f(t,y),[t,y],[t0,y0],t1) returns the approximate solution of y'=f(t,y) for the variables t and y with initial conditions t=t0 and y=y0.


Example:
odesolve(sin(t*y),[t,y],[0,1],2) → [1.82241255674]

may be what you want.

-road
(03-09-2023 07:24 PM)roadrunner Wrote: [ -> ]Example:
odesolve(sin(t*y),[t,y],[0,1],2) → [1.82241255674]
Thanks Roadrunner.
If you want the intermediate steps, add curve as last optional argument
odesolve(sin(t*y),[t,y],[0,1],2,curve)
Should also work for differential systems.
(03-12-2023 05:31 PM)parisse Wrote: [ -> ]If you want the intermediate steps, add curve as last optional argument
odesolve(sin(t*y),[t,y],[0,1],2,curve)
Should also work for differential systems.

ah oui, indeed. Merci M. Parisse !
Strange, t had a value here, and with the equation above, it gives an error; I was forced to "purge" t in order to make it working.
Can I use odesolve to solve a system of differential equations numerically? I know that you can plot the solution (or at least the phase plane) like the example included in the help of the function.
Xcas online help has an example
odesolve(0..pi,(t,v)->{[-v[1],v[0]]},[0,1])
Needs to be modified for the Prime since {} does not have the same meaning. I would try with BEGIN ... END instead.
Reference URL's