Solutions To A Problem Sheet Related To Dynamic Systems Modelling
Solutions To A Problem Sheet Related To Dynamic Systems Modelling
1. (a) Using 0.5 carry out three steps of the above 2nd order Runge
Kutta scheme to calculate y (0.3) for the ordinary differential equation
dy
1 2 xy with the initial condition y(0) 0 . [done in class]
dx
Page 1 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
Page 2 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
Page 3 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
2. Using the 2nd order Runge Kutta method with the α = 1 for the solution
dy
of the ordinary differential equation f ( x, y ) , and taking a stepsize
dx
of h 0.2 estimate y (0.4) for the problem
dy
yx with the initial condition y(0) 1 .
dx
and find the error estimate associated with this calculation.
Page 4 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
Page 5 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
3. Query the final answer for next version3. Apply one step of the second
2
order Runge –Kutta scheme with method and taking a step size
3
of h 0.2 to
dy
xy y 2 with the initial condition y(1) 2 ,
dx
and find the error estimate associated with this calculation.
Page 6 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
5. Apply the standard fourth order Runge-Kutta formulae for the solution
of the differential equation y f ( x, y) to the O.D.E.
dy 1 with the initial condition y(0) 1 .
dx 1 y
with a step size of h 0.5 to calculate y (1) .
Solution:
The fourth order Runge-Kutta formulae for the solution of the differential equation
f ( x , y ) with step size h are yn 1 yn k1 2k2 2k3 k4
dy 1
dx 6
k1 h. f x n , y n
h k
k 2 h. f x n , y n 1
2 2
Where
h k
k 3 h. f x n , y n 2
2 2
k 4 h. f x n h, y n k 3
Page 7 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
6. Using the standard fourth order Runge –Kutta formulae with h = 0.1 to estimate the solution at x = 0.1 for
the differential equations
dy
x yz with y (0) 1
dx
dz
1 y z with z (0) 1
dx
Compare this solution with that obtained using an Euler scheme with the same step size.
Describe how you would estimate the error associated with a Runge Kutta scheme. [done in class]
Page 8 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
7. Using the the standard fourth order Runge –Kutta formulae for the
solution of coupled pairs of ordinary differential equations, using a step
size with h = 0.1 solve for y(0.1) and z(0.1) the equations:
dy
yz with y (0) 0
dx
dz
y z with z (0) 1
dx
Page 9 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
d2y dy
8. Show that the second order differential equation
2
2y 0
dx dx
with the initial conditions y (0) 0, dy (0) 1 can be replaced by a
dx
system of coupled first order equations .
Using h = 0.2 carry out one step of the RK scheme to find y when x =
0.2 .
Page 10 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
d2y dy
9. Show that the second order differential equation
2
x 2y 0
dx dx
dy
with the initial conditions y (0) 1, (0) 0 can be replaced by a system of
dx
coupled first order equations .
Using h = 0.2 carry out two steps of the RK scheme to find y when x = 0.4.
Page 11 of 12
DSM Semester 7 Ordinary Differential Equations Problem Sheet 2
Page 12 of 12