Lab for the Runge Kutta Method

Modue for the Runge Kutta Method

   Check out the new Numerical Analysis Projects page.

Runge-Kutta Method of Order 4 for O.D.E.'s. To approximate the solution of the initial value problem [Graphics:rk.txtgr1.gif] with
[Graphics:rk.txtgr2.gif]by using the formula [Graphics:rk.txtgr3.gif],
where
[Graphics:rk.txtgr4.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr5.gif]
 

Report to be handed in.

Computer Problems.



Exercise 1.
Solve the I.V.P. [Graphics:rk.txtgr7.gif] with y(0) = 1 over [0.0, 0.4].
Use the Runge-Kutta method with 2 subintervals of [0.0, 0.4] to get a numerical approximation to the solution.
Show the calculations for K1, K2, K3, K4 for each step.
Compare the Runge-Kutta solution with the known analytic solution [Graphics:rk.txtgr8.gif].

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr9.gif]
[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr10.gif]
[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr11.gif]
[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr12.gif]

Exercise 2. Solve the I.V.P. [Graphics:rk.txtgr13.gif] with y(0) = 0 over [0.0, 10.0].
Use the Runge-Kutta subroutine and 10 subintervals of [0,10] to get your answer.
Plot the solution using the 11 points you just computed in the window {{0,10},{0,1}}.
Report the last point which is the numerical approximation to (10, y(10)).

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr14.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr15.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr16.gif]

Exercise 3. Solve the I.V.P. [Graphics:rk.txtgr17.gif] with y(0) = 0 over [Graphics:rk.txtgr18.gif].
Use the Runge-Kutta subroutine and 10 subintervals of [0,10] to get your answer.
Plot the solution using the 21 points you just computed in the window {{0,10},{0,1}}.
Report the last point which is the numerical approximation to (10, y(10)).

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr19.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr20.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr21.gif]

Exercise 4. Solve the I.V.P. [Graphics:rk.txtgr22.gif] with y(0) = 0 over [Graphics:rk.txtgr23.gif].
Use the Runge-Kutta subroutine and 10 subintervals of [0,10] to get your answer.
Plot the solution using the 51 points you just computed in the window {{0,10},{0,1}}.
Report the last point which is the numerical approximation to (10, y(10)).

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr24.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr25.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr26.gif]

Exercise 5. Solve the I.V.P. [Graphics:rk.txtgr27.gif] with y(0) = 0 over [Graphics:rk.txtgr28.gif].
Use the Runge-Kutta subroutine and 10 subintervals of [0,10] to get your answer.
Plot the solution using the 101 points you just computed in the window {{0,10},{0,1}}.
Report the last point which is the numerical approximation to (10, y(10)).

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr29.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr30.gif]

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr31.gif]

Remark. The value of y(10) is known to be:

[Graphics:rk.txtgr6.gif][Graphics:rk.txtgr32.gif]

Exercise 6. Read the textbook and see if you can find out something about how small the step size should be in the Runge-Kutta method to guarantee an accurate solution.

 

 

 

(c) John H. Mathews, 1998