- #1
Kanashii
- 9
- 0
Homework Statement
Consider the initial value problem x" + x′ t+ 3x = t; x(0) = 1, x′(0) = 2 Convert this problem to a system of two first order equations and determine approximate values of the solution at t=0.5 and t=1.0 using the 4th Order Runge-Kutta Method with h=0.1.
Homework Equations
yn+1 = yn + 1/6 ( k1 + 2k2 + 2k3 + k4)
k1 = h* f(xn, yn)
k2 = h* f(xn + 1/2 h, yn + 1/2 k1)
k3 = h* f(xn + 1/2 h, yn + 1/2 k2)
k4 = h* f(xn+1, yn+k3)
The Attempt at a Solution
I tried to convert the equation into two linear ODEs:
x = x1
x′= x1' = x2
x′′= x1'' = x2'
x2' = -x2 t + t - 3x1 (first linear ODE)
x1' = x2 (second linear ODE)
I do not know what to do from here.
From 4th Order RK equations, I do not know what f(xn, yn) is.
Last edited by a moderator: