# Thread: Approximating a 2nd Order ODE

1. ## Approximating a 2nd Order ODE

Hey,

I am trying to approximate the solution to a second order ODE using the 4th order Runge-Kutta.

I was told that in order to do this, I have to write the second order ODE and a pair of 1st order ODEs.

Given that my differential equation is

d^2v/dt^2 + adv/dt + bv = 0, where a and b are constant coefficients, I am a little lost on how to do this.

Any advice on how to approach this?

Thanks

2. ## Converting to a system

To convert a single second-order ODE to a system of two couples first-order ODEs, we create a new function equal to the derivative of our unknown function: we define $w = \dot v$. Then $\dot w = \ddot v = -a\dot v - bv = -aw-bv$. So then our system is $\dot v = w, \dot w = -aw-bv$, or in matrix notation,

$\begin{pmatrix}
\dot v \\
\dot w
\end{pmatrix} = \begin{pmatrix}
0 & 1 \\
-b & -a
\end{pmatrix}\begin{pmatrix}
v \\
w
\end{pmatrix}$

From here, you then perform the fourth-order Runge-Kutta on this system.

--Kevin C.