# How to show that all solutions of$x'' = -x$ is $\alpha sin(t) +\beta cos(t)$

I have this problem:

Show that any solution of $x'' = -x$ is one of these: $αsin(t) + βcos(t)$ for some $(α, β)$.

I'm not sure is I should use the Mean Value Theorem that says if $f '(x) = 0$ for all $x$, then $f$ is constant on that interval.

• What is your definition of $\sin$ and $\cos$? – velut luna May 21 '17 at 17:30

## 3 Answers

Let $X:=\begin{pmatrix}x\\x'\end{pmatrix}$, then $x$ is a solution of your ODE if and only if $X$ is a solution of $X'=AX$, where: $$A:=\begin{pmatrix}0 & 1\\-1&0\end{pmatrix}.$$ Therefore, one gets: $$\tag{1}X(t)=e^{-tA}X(0).$$ Notice that $A^2=-I_2$, then if you compute $e^{-tA}$ using the power series splitting up even and odd terms: $$e^{-tA}=\cos(t)I_2+\sin(t)A=\begin{pmatrix}\cos(t)&\sin(t)\\-\sin(t)&\cos(t)\end{pmatrix}.$$ Finally, if $X(0)=\begin{pmatrix}\alpha\\\beta\end{pmatrix}$, then $x(t)=\alpha\cos(t)+\beta\sin(t)$.

If you don't know how to derive $(1)$, notice that since $e^{-tA}$ is invertible, then: $$X'=AX\iff e^{-tA}(X'(t)-AX(t))=0\iff\frac{\mathrm{d}}{\mathrm{d}t}(e^{-tA}X(t))=0.$$ Therefore, $t\mapsto e^{-tA}X(t)$ has to be constant. Whence the result.

Remark. I used the following definitions: \begin{align}\exp(z)&=\sum_{n=0}^{+\infty}\frac{z^n}{n!},\\\cos(z)&=\sum_{n=0}^{+\infty}\frac{(-1)^{2n}x^{2n}}{(2n!)},\\\sin(z)&=\sum_{n=0}^{+\infty}\frac{(-1)^{2n+1}x^{2n+1}}{(2n+1)!}.\end{align}

If the solution of the Auxiliary Equation of the D.E. is ($\alpha\pm i\beta$) , then the solution is given by $e^\alpha(A cos(\beta t)+ Bsin(\beta t))$.

Here the auxiliary equation is $m^2=-1\implies m=\pm i$.

So $x(t)=Acos(t)+Bsin(t).$

A neat trick you can do in this case is multiplying both sides with $cos(t)$ then subtracting $\overset{.}{x}sin(t)$. This yields a product rule in both sides, which you can then integrate and as a result reduce this equation to an ODE.