Part A-
Convert the equation-
d3y/dx3 - 2 · dy/dx - 1 · x · y = 0
and initial conditions y(0) = 1.00279, y'(0) = 1.13313 and y''(0) = -0.17902, into three first order differential equations. Find the formulas for solving this system of equations by:
1. Euler's forward difference method
2. The second order Runge-Kutta method based on
k1 = h·f(xn, vn)
k2 = h·f(xn + h/2, yn + k1/2)
yn+1 = yn + k2
Find the numerical solution y at 0.1, x = 0.2 and x = 0.3 by both methods using a step length h = 0.1.
Give your answers to 5 decimal places (no more and no less) however you should do you calculations with sufficient accuracy to ensure you answers are accurate to 5 decimal places.
For the Euler method:
y0 = 1.00279
y1 =
y2 =
y3 =
For the Runge-Kutta method:
y0 = 1.00279
y1 =
y2 =
y3 =
Part B-
Find the numerical solution to
y''(x) - (x + 0.2)y'(x) - (x + 3.7)y(x) = 0.5x + 3.6
in the interval 0 ≤ x ≤ 1 with conditions y(0) = 2.5895 and y(1) = 2.9327, using a step length h = 0.2 and the 2nd-order Runge-Kutta scheme given by
k1 = h·f(xn, yn)
k2 = h·f(xn + 2h/3, yn + 2k1/3)
yn+1 = yn + k1/4 + 3k2/4
Give your answers to 5 decimal places (no more and no less).
y0 = 2.5895
y1 =
y2 =
y3 =
y4 =
y5 =2.932