

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Assigned Monday Oct 22, due Monday Oct 29
[1] The classic 4th^ order Runge-Kutta method is
1 1 2 1 1
3 1 2 4 1 3 1 1 2 3
n n
n n n n
Y y Y y hf
Y y hf Y y hf y y h f f f f
โ โ
โ โ โ
1 1 2 3 1/2 1 4
k k k n n n n
f f T Y T t T T t t h T t
โ โ โ
Rewrite this in the form yn = y (^) n โ 1 + h ฮจ ( t (^) n โ 1 , yn (^) โ 1 , h ); i.e., find an expression for the function ฮจ.
2 Implement the RK4 method to solve the problem
3 2 2 2( 1) (0) 1
dy t t dt y y
from HW1. Plot the numerical and exact solutions on the interval [0,2] for a reasonable choice of time steps.
(b) Compare to the exact solution found in HW1 and use the result to estimate the rate of convergence for RK4 on this problem. Specifically, find the error between the exact solution and numerical solution at t = 2.0 using a reasonable set of timesteps dt.
(c) Apply your program to use RK4 to solve the Fitzhugh-Nagumo system
( )( 1)
( ) (0) 0. (0) 0. 0.01, 0.2, 2.5, 0.
du (^) u u u v dt dv (^) u v dt u v
over the time interval 0