Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the problem $y''+4y = 0$ where $y(0) = 1$ , and $y'(0) = 0$

I have to find a particular solution, making a guess it is in the form $y(x) = e^{rx}$

I have the solution here, but I cannot quite follow it. I get that the Euler equation is $r^2 + 4 = 0$; and that $r = \pm2i$. However, they show that Euler's equations suggest $e^{2ix} = \cos 2x + i \sin 2x$. Immediately followed by the solutions statement that $y(x) = c_1 \cos 2x + c_2 \sin 2x$. How did they make this transition?

Then they state, to find the particular solution; we want $0=y(0) - c_1$ ; and $0 = y'(0) = 2c_2$. Why is this the case? Why do we want $y'(0)$ to be equal to $2c_2$?

The final particular solution is $y(x) = \cos 2x$. This makes sense if $0 = 2c_2$ as they expressed above. However, I still do not know same of those intermediate steps

share|cite|improve this question
did you forget something after the equals in your question? Regards – Amzoti Feb 10 '13 at 20:49


You need to fix the original, but here are the latter parts.

For the complex exponentials, refer to Complex Roots.

Do you follow this web site?

This gets us to the point of: $y(x) = c_1 \cos 2x + c_2 \sin 2x$

Next, we have been given initial conditions and will use those to find the constants $c_1$ and $c_2$.

If we substitute $0$ into $y(x)$, we have: $y(0) = 1 = c_1$, so $c_1 = 1$.

If we take the derivative of the solution, $y(x)$, we have:

$$y'(x) = -2c_1 \sin 2x + 2 c_2 \cos 2x$$

We know that $y'(0) = 0$, so we have (just substitute $x=0$ into the derivative), $y'(0) = 0 = 2 c_2$, which gives us $c_2 = 0$.

Substituting $c_1$ and $c_2$ into $y(x)$, yields the final solution:

$$y(x) = \cos 2x$$

You should validate that this indeed solves the DEQ.

$$y''(x) + 4y(x) = -4 \cos 2x + 4 \cos 2x = 0$$

Which checks out.


share|cite|improve this answer
I would do the same if i was supposed to do this work. + – Babak S. Feb 16 '13 at 6:32
Nice work, Amzoti. I agree with Babak! – amWhy May 3 '13 at 0:24

To solve the linear homogeneous differential equation $$ y'' + 4y = 0, $$ we find the solutions to its characteristic equation, which, as you said, is $$ r^2 + 4 = 0, $$ which gives the result $r=\pm2i$. Using this result, the linear superposition principle, which gives us $y(x) = e^{r_1x} + e^{r_2x}$ and Euler's formula, we know $$ \begin{equation} \begin{split} y(x) &= c_1e^{r_1x} + c_2e^{r_2x} \\ &= c_1e^{2xi} + c_2e^{-2xi} \\ &= c_1(\cos(2x) + i\sin(2x)) + c_2(\cos(-2x) + i\sin(-2x)) \\ &= c_1(\cos(2x) + i\sin(2x)) + c_2(\cos(2x) - i\sin(2x)) \end{split} \end{equation} $$ Then, by grouping the sine and cosine terms, $$ \begin{equation} \begin{split} y(x) &= c_1(\cos(2x) + i\sin(2x)) + c_2(\cos(2x) - i\sin(2x))\\ &= (c_1 + c_2)\cos(2x) + i (c_1-c_2)\sin(2x) \end{split} \end{equation} $$

Letting $c_1 = \frac{1}{2}$ and $c_2 = \frac{1}{2}$ yields the solution $y_1(x) =\cos(2x)$. Likewise, letting $c_1 = -\frac{1}{2}i$ and $c_2 = \frac{1}{2}i$ yields the solution $y_2(x) = \sin(2x)$. So, by the linear superposition principle, this gives us the general family of solutions $$ y_c = c_1\cos(2x) + c_2\sin(2x). $$

From that solution, to find the final particular solution to the IVP, we set $y_c(0) = 1$, and set the derivative of $y_c$ equal to $0$ and solve the system. $$ \begin{equation} \begin{split} y_c(0) &= &c_1\cos(0) + &c_2\sin(0) &= 1\\ y_c'(0) &= -2&c_1\sin(0) + 2&c_2\cos(0) &= 0 \end{split} \end{equation} $$

Which gives $c_1 = 1$ and $c_2 = 0$. Substituting these values gives your final solution, $$ y(x) = \cos(2x) $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.