(71B) Differential Equations and Half-Increment Solution, Numerical Methods
|
12-23-2016, 07:26 PM
Post: #1
|
|||
|
|||
(71B) Differential Equations and Half-Increment Solution, Numerical Methods
Differential Equations and Half-Increment Solution, Numerical Methods
The program HALFDIFF solves the numerical differential equation d^2y/dt^2 = f(dy/dt, y, t) given the initial conditions y(t0) = y0 and dy/dt (t0) = dy0 In this notation, y is the independent variable and t is the dependent variable. The Method Let C = f(dy/dt, y, t). Give the change of t as Δt. First Step: With t = t0: h_1/2 = dy0 + C * Δt/2 y1 = y0 + dy0 * Δt Loop: t = t0 + Δt h_I+1/2 = h_I-1/2 + C * Δt y_I+1 = y_I +h_I+1/2 * Δt Repeat as many steps as desired. For more details, click here: http://edspi31415.blogspot.com/2016/11/t...ntial.html Source: Eiseberg, Robert M. Applied Mathematical Physics with Programmable Pocket Calculators McGraw-Hill, Inc: New York. 1976. ISBN 0-07-019109-3 Program HALFDIFF 250+ bytes, 12/22/2016 Edit f(A,Y,T) at line 5 where A = y’(t), Y = y(t), T = t Code: 5 DEF FNF(A,Y,T) = insert function y’(t), y(t), and t here Example: y’’(t) = y’(t) + 2 * t with y’(0) = 0, y(0) = 1, Delta t = 1, Max t = 6 FNF(A,Y,T) = A + 2 * T Results: T Y 1 2 2 8 3 26 4 70 5 168 6 376 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)