# Diferencial equation

1. Mar 8, 2014

### alpha25

How can I demostrate that a solution of d2u/(dθ)^2+u=0 is u=cos(θ-θ0)

Thanks

2. Mar 8, 2014

### LCKurtz

Differentiate it twice, add it to the result, and see if you get zero.

3. Mar 8, 2014

### alpha25

Yes, thanks, but how can I get that result

4. Mar 8, 2014

### LCKurtz

Show us what happens when you try it.

5. Mar 8, 2014

### alpha25

I already differentiate it twice and then I replace it to the equation and I get to zero, I know that cos(θ-θ0) is a solution, but I don t know how to get that solution.
When I solve the equation I reach other result more complicated with imaginary terms etc...

6. Mar 8, 2014

### LCKurtz

To save typing I will use $x$ instead of $\theta$ for the independent variable. When you solved $u''+u=0$ you probably got solutions like $e^{ix}$ and $e^{-ix}$, so the general solution is $u = Ae^{ix}+Be^{-ix}$. Using the Euler formulas you can write this equivalently as $u = C\cos x + D\sin x$. A solution of the form $\cos(x-x_0)$ can be written using the addition formula as $\cos x \cos x_0 - \sin x \sin x_0$. You can get that from the previous form by letting $C=\cos x_0,~D= -\sin x_0$.

You can read about constant coefficient DE's many places on the internet. One such place is:
http://www.cliffsnotes.com/math/differential-equations/second-order-equations/constant-coefficients

7. Mar 8, 2014

### alpha25

D is imaginary?

8. Mar 8, 2014

### LCKurtz

The constants can be imaginary or complex. But there is a theorem that if the coefficients of the DE are real and the boundary conditions are real, the constants C and D will be real in the {sine,cosine} expression. If you leave the solution in the complex exponential form, the constants A and B will come out complex. So for real coefficients and real boundary conditions, you really just make it complicated if you leave it in the complex exponential form. Use the {sine,cosine} form.