# How to transform a differential equation to a system of differential equations

Lets say I have a differential equation like $$y''+y+4=0$$ and I have to convert it to a system of first order equations? How is that done.

I am interested in the method (and an explanation of it) rather than the answer.

• If you are interested in the theory rather that the answer I can strongly recommend you the book of Elementary Differential Equations with Boundary Value Problems by C. Henry Edwards, David E. Penney Jun 13, 2014 at 19:17

The general procedure is to replace the derivatives of $y$ with new symbols - so in this case, we might set

$$u = y, v = y'$$

Note that these are automatically related via $u' = v$. Now consider a differential equation such as $y'' - 12 y= 0$. Rewriting this as

$$(y')' - 12y = 0$$

and expressing this in the new symbols, we have

$$v' - 12 u = 0 \implies v' = 12 u$$

So for this ODE, the system could be

$$\left\{\begin{array}{l} u' &= v \\ v' &= 12 u \end{array}\right.$$

For a higher order equation, like $y^{(n)} = ...$, make a total of $n + 1$ substitutions, e.g. $u = y, u_1 = y', u_2 = y''$, and so on.

The offending term (that makes it higher than first order), is $y''$, so convert it to first order. How? Let $z = y'$, then $z' = y''$. It's as simple as that. So now the single second order equation $y'' + y + 4 = 0$ becomes the system of two first-order equations

$z' + y + 4 = 0\\ z = y'$

$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ $\ds{y'' + y + 4 = 0:\ {\large ?}}$.

\begin{align} {y' \choose y}' &=\pars{\begin{array}{cc}0 & -1 \\ 1 & 0\end{array}} {y' \choose y} + {4 \choose 0}\quad\imp\quad \vec{r}' + \ic\sigma_{y}\vec{r} = \vec{R} \end{align}

where $$\vec{r} \equiv {y' \choose y}\,,\qquad \sigma_{y} \equiv \pars{\begin{array}{rr}0 & -\ic \\ \ic & 0\end{array}}\,, \qquad \vec{R} \equiv {4 \choose 0}$$

$$\totald{\pars{\expo{\ic\sigma_{y}x}\vec{r}}}{x} =\expo{\ic\sigma_{y}x}\vec{R} \qquad\imp\qquad\vec{r} =\expo{-\ic\sigma_{y}x} \int\expo{\ic\sigma_{y}x}\vec{R}\,\dd x + \expo{-\ic\sigma_{y}x}\vec{C}\,,\quad \vec{C}:\ \mbox{constant vector}$$

$$\vec{r} = -\ic\sigma_{y}\vec{R} + \expo{-\ic\sigma_{y}x}\vec{C}\,, \qquad \expo{-\ic\sigma_{y}x} =\cos\pars{x} - \ic\sigma_{y}\sin\pars{x} =\pars{\begin{array}{rr}\cos\pars{x} & -\sin\pars{x} \\ \sin\pars{x} & \cos\pars{x}\end{array}}$$

$$\color{#88f}{\large y = -4 + C_{x}\sin\pars{x} + C_{y}\cos\pars{x}}$$