(48G 49G 50G) Runge-Kutta Diff Eqn solver
06-07-2021, 07:52 AM (This post was last modified: 06-07-2021 09:22 AM by Werner.)
Post: #5
 Werner Senior Member Posts: 881 Joined: Dec 2013
RE: 48G-50G Runge-Kutta Diff Eqn solver
Having never used the differential equation solver in the 49/50, I had to look up how to use it.
Given Y' = F(X,Y), with X the independent and Y the dependent variable, it expects an equation or a program to return the value of Y', given X and Y.
In your case, you have a second-order Diff.Eq
y' = v
v' = g - k*v^2
that we'll rewrite as a first-order one:
U' = F(U,t)
with U = [ y v ]
and F(U,t) = [ v g-k*v^2 ]
Instead of an equation for F, the calculator also accepts a program, so all we need to do
is write one that will return [ v g-k*v^2 ] from U = [ y v ]

Code:
\<<   U 2. GET   g OVER SQ k * - \->NUM   2. \->ARRY \>>

Seeing that the program is very small, just type it in your 50g, without the backslashes ;-)
Store the program in the reserved variable EQ, fire up the num. solver, diff eq.
The program is shown as 'F', enter indep. var' t' and soln 'U' and all the other parameters, and SOLVE. Should work.

Update: two more remarks
- the equation should be v' = -g - k*v^2 (you're falling down, no?)
- the inital value for U must be given as a 1x2 vector [ y0 v0 ] eg [ 1000. 0. ] so falling from 1000m high, initial velocity 0. m/s
Solving for Final will then give the final value of U [ vf vf' ]

Cheers, Werner

41CVâ€ ,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
 « Next Oldest | Next Newest »

 Messages In This Thread (48G 49G 50G) Runge-Kutta Diff Eqn solver - rcthacker - 06-03-2021, 10:14 PM RE: 48G-50G Runge-Kutta Diff Eqn solver - Werner - 06-04-2021, 11:05 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - rcthacker - 06-05-2021, 10:06 PM RE: 48G-50G Runge-Kutta Diff Eqn solver - BINUBALL - 06-06-2021, 08:32 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - Werner - 06-07-2021 07:52 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - rcthacker - 06-07-2021, 03:13 PM RE: 48G-50G Runge-Kutta Diff Eqn solver - Werner - 06-07-2021, 07:26 PM RE: 48G-50G Runge-Kutta Diff Eqn solver - rcthacker - 06-08-2021, 01:53 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - Werner - 06-08-2021, 06:22 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - rcthacker - 06-09-2021, 01:54 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - Werner - 06-09-2021, 06:30 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - rcthacker - 06-11-2021, 11:23 PM RE: 48G-50G Runge-Kutta Diff Eqn solver - Werner - 06-14-2021, 06:42 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - rcthacker - 06-14-2021, 10:24 PM RE: 48G-50G Runge-Kutta Diff Eqn solver - Werner - 06-15-2021, 05:54 AM RE: 48G-50G Runge-Kutta Diff Eqn solver - Giuseppe Donnini - 06-15-2021, 12:50 PM RE: 48G-50G Runge-Kutta Diff Eqn solver - rcthacker - 06-15-2021, 09:09 PM RE: (48G 49G 50G) Runge-Kutta Diff Eqn solver - Giuseppe Donnini - 06-19-2021, 02:24 AM RE: (48G 49G 50G) Runge-Kutta Diff Eqn solver - jeejohn - 07-16-2021, 08:05 PM

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