# Uniqueness of solutions of $y''+y=0$

Recently I was asked about the uniqueness of the solutions of the equation $y'=y$. It could be obtained by multiply $e^{-x}$.

This time I was wondering about the same question regarding a different equation. We know that the solutions of $y''+y=0$ are of the form $a\sin(x)+b\cos(x)$.

How can we explain that these are the ONLY solutions?

We shall show that every solution of the equation $y''+y=0$ is of the form $y(x)=a\cos x+b\sin x$, for some $a,b\in\mathbb R$.

In particular, we shall show that $$y(x)=y(0)\cos x+y'(0)\sin x$$ or equivalently $\,z(x)\equiv 0,\,$ where $z(x)=y(x)-\big(y(0)\cos x+y'(0)\sin x\big)$.

First of all, it can be readily shown that $$z''(x)+z(x)=0,$$ and $$z(0)=z'(0)=0. \tag{1}$$ Hence $$0=z'(z''+z)=z'z''+zz'=\frac{1}{2}\big((z')^2+z^2\big)'$$ and thus $w(x)=\big(z(x)\big)^2+\big(z'(x)\big)^2$ is a constant function, and in particular $w(x)=w(0)$ $$\big(z(x)\big)^2+\big(z'(x)\big)^2=w(x)=w(0)=\big(z(0)\big)^2+\big(z'(0)\big)^2=0.$$ Thus $z\equiv 0$.

Consider the change of variable $$y' = x$$ Then you get the following ODE system: $$\begin{cases}x' =-y\\y'=x\end{cases}$$ which is of the form $$\begin{pmatrix}x'\\y' \end{pmatrix} = \begin{pmatrix}0&-1\\1&0 \end{pmatrix}\begin{pmatrix}x\\y \end{pmatrix} = A\begin{pmatrix}x'\\y' \end{pmatrix}$$ where $A$ is the fundamental matrix. Therefore, you have a linear homogeneous differential equation with constant coefficients which is explicitly solvable. You can find a proof here with some examples.

Using $z(t)=y(t)\cos (t+a)-y'(t)\sin (t+a)$ you get $$z'(t)=-(y(t)+y''(t))\sin(t+a)=0$$ so that $z$ is constant without deviation, with the constant uniquely determined by the initial condition, so that for all $a$ $$y_0\cos(a)-y'_0\sin(a)=y(t)\cos (t+a)-y'(t)\sin (t+a).$$ Now substitute $a=-t$ (or $t=-a$) to get, also uniquely, $$y(t)=y_0\cos(t)+y'_0\sin(t).$$

You can also solve it easily

$$y''=-y$$ for $y \neq 0$ $$\frac {y''}{y}=-1$$ $$\left (\frac {y'}{y} \right)'+\left( \frac {y'}{y}\right )^2=-1$$ Substitute $z=\frac {y'}y$ $$z'+z^2=-1$$ That's separable $$\int \frac {dz}{z^2+1}=-x+K \implies \arctan(z)=K-x$$ $$y'=y\tan (K-x)$$ $$y'\cos(K-x)-y\sin(K-x)=0$$ $$y=C_1\cos(x+C_2)$$

• unm.. i have two questions for your answer. First can we multiply by y'? I think we shold be careful for this because we don't have ANY equation for for y'. Second how can I solve the last line of your equation? – 김기훈 May 18 '18 at 0:29
• I added a complete solution I hope it's more clear..@김기훈 – Isham May 18 '18 at 18:42