[Math] Convert higher order ODE to system of first order ODEs

linear algebraordinary differential equations

Given the following 2nd order differential equation with initial conditions $y(0)=y_0$ and $y'(0)=v_0$, convert it into a system of first order differential equations:

$$y'' = \sin(y)-\cos(t)$$

My attempt:

Let $y_1 = t, y_2 = y, y_3 = y'$

Then we get the following system:

$$y_1' = 1$$
$$y_2' = y_3$$
$$y_3' = \sin(y_2)- \cos(y_1)$$

Is that correct?

My main question is, how do I have to deal with the initial value conditions? Do I simply have to rewrite them as $y_2(0)=y_0, y_2'(0)=v_0$?

Best Answer

You have one too many equations there. Everything is a function if $t$, you don't need to make $y_1 = t$. Call $u = y$, $v = y'$. Then it becomes: $$\begin{cases} u' = v \\ v' = \sin(u) - \cos(t) \\ u(0) = y_0, v(0) = v_0\end{cases}.$$

Related Question