- #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

y

_{n+1}= y

_{n}+ 1/6 ( k

_{1}+ 2k

_{2}+ 2k

_{3}+ k

_{4})

k

_{1}= h* f(x

_{n}, y

_{n})

k

_{2}= h* f(x

_{n}+ 1/2 h, y

_{n}+ 1/2 k

_{1})

k

_{3}= h* f(x

_{n}+ 1/2 h, y

_{n}+ 1/2 k

_{2})

k

_{4}= h* f(x

_{n+1}, y

_{n}+k

_{3})

## The Attempt at a Solution

I tried to convert the equation into two linear ODEs:

x = x

_{1}

x′= x

_{1}' = x

_{2}

x′′= x

_{1}'' = x

_{2}'

x

_{2}' = -x

_{2}t + t - 3x

_{1}(first linear ODE)

x

_{1}' = x

_{2}(second linear ODE)

I do not know what to do from here.

From 4th Order RK equations, I do not know what f(x

_{n}, y

_{n}) is.

Last edited by a moderator: