![]()
![]()
Lab for the Runge Kutta Method
![]()
Runge-Kutta Method of Order 4
for O.D.E.'s. To approximate the solution of the initial
value problem
with
by
using the formula
,
where
![[Graphics:rk.txtgr4.gif]](rk.txtgr4.gif)
Report to be handed in.
Computer Problems.
![]()
Exercise 1. Solve the I.V.P.
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
.
Exercise 2. Solve the I.V.P.
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.txtgr15.gif]](rk.txtgr15.gif)
Exercise 3. Solve the I.V.P.
with y(0) = 0 over
.
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.txtgr20.gif]](rk.txtgr20.gif)
Exercise 4. Solve the I.V.P.
with y(0) = 0 over
.
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.txtgr25.gif]](rk.txtgr25.gif)
Exercise 5. Solve the I.V.P.
with y(0) = 0 over
.
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.txtgr30.gif]](rk.txtgr30.gif)
Remark. The value of y(10) is known to be:
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