# Differential equations for this problem?

How would i go about solving the differential equation> $$y''+y=0$$ (Identify the auxiliary equation.)

-

## 4 Answers

This is called a homogeneous second-order linear differential equation. To solve, plug $y = e^{mx}$:

\begin{align*} \left(e^{mx}\right)'' + e^{mx} &= 0 \\ m^2 e^{mx} + e^{mx} &= 0 \\ (m^2 + 1) e^{mx} &= 0 \end{align*}

For the LHS to be $0$ for all values of $x$, the following must be true:

$$m^2 + 1 = 0$$

Or:

$$m = \pm i$$

Therefore, the following are solutions to the equation:

\begin{align*} y_1 &= e^{ix} \\ y_2 &= e^{-ix} \end{align*}

And the general solution is:

$$y = C_1 e^{ix} + C_2 e^{-ix}$$

Where $C_1$ and $C_2$ are constants.

For real solutions, remember that:

\begin{align*} e^{ix} &= \cos x + i \sin x \\ e^{-ix} &= \cos x - i \sin x \end{align*}

Plug and simplify to get:

$$y = (C_1 + C_2)\cos x + (C_1 i - C_2 i)\sin x$$

And replace with real constants $B_1$ and $B_2$:

$$y = B_1 \cos x + B_2 \sin x$$

-

Guess a solution of $e^{rx}$. Plugging in, we get

$$e^{rx}(r^2+1)=0$$

$e^{rx}$ is never zero, meaning that the solutions are when $r^2+1=0$. Use that to find the valid values of r, and use the superposition principle (since it's a linear homogenous equation) to find the general solution.

EDIT:

$r^2+1=0$ gives $r=i,-i$. So by this and the superposition principle, your general solution is

$$Ae^{ix}+Be^{-ix}$$

But this is just one way of representing the general solution. All you need are two linearly independent solutions (which, for two solutions, just means one isn't a multiple of the other). If you know euler's formula, you can write

$$\cos(x)=\frac{e^{ix}+e^{-ix}} 2$$ $$\sin(x)=i\frac{e^{ix}-e^{-ix}} 2$$

So one "new" solution (cos) is found by taking $A=\frac 1 2, B=\frac 1 2$. Another (sin) is found by taking $A=\frac i 2, B=-\frac i 2$. Since these are linearly independent solutions, they can also be the "basis" of our solution set, and so we can see that another way of writing the above solution is $$A\cos(x)+B\sin(x)$$

-
How would i put it in terms of sin and cos? –  Grigor May 28 '12 at 19:37
Use Euler's identity: $e^{ix}=\cos x+i\sin x$ –  Dennis Gulko May 28 '12 at 19:42

An other standard method is to look for solutions of the form $$u(x)=\sum_{n=0}^\infty a_nx^n$$ Then a formal calculation (this step must be justified for solutions we might find) shows that $$u''(x)=\sum_{n=0}^\infty (n+2)(n+1)a_{n+2}x^n$$ which leads to $$u''(x)+u(x)= \sum_{n=0}^\infty \left((n+2)(n+1)a_{n+2}+a_n\right)x^n=0$$ This can only happen if $(n+2)(n+1)a_{n+2}+a_n =0$ for all $n$.

I hope you see the picture and how to continue.

-

A less rigorous method (at least without an accompanying discussion that is more substantial than the problem itself) which does not involve guessing the solution involves "factorizing" the LHS: $$\left(\frac{d^2}{dx^2}+1\right)y=0$$ $$\left(\frac{d}{dx}-i\right)\left(\frac{d}{dx}+i\right)y=0$$ $$\frac{dy}{dx}-iy=0 \qquad \frac{dy}{dx}+iy=0$$ $$y_1=C_1e^{ix} \qquad y_2=С_2e^{-ix}$$

Finally, the one that does not involve characteristic equation. Multiply by $y'$

$$y'y''+yy'=0$$ $$\frac{1}{2}\left(\frac{d{(y'^2)}}{dx}+\frac{d{(y^2)}}{dx}\right)=0$$ which is directly integrated once and leads to a second-order equation

-