# Differential Equations

• Dec 4th 2008, 08:49 AM
Aryth
Differential Equations
Verify that the differential equation:

$\displaystyle \frac{d^2y}{dx^2} = -k^2y$

has as its solution:

$\displaystyle y = A\cos{(kx)} + B\sin{(kx)}$

where A and B are arbitrary constants. Show also that this solution can be written in the form:

$\displaystyle y = C\cos{(kx+\alpha)} = C \ Re[e^{j(kx + \alpha)}] = Re[Ce^{j\alpha}e^{jkx}]$

And express C and $\displaystyle \alpha$ as functions of A and B.
• Dec 4th 2008, 09:26 AM
Chris L T521
Quote:

Originally Posted by Aryth
Verify that the differential equation:

$\displaystyle \frac{d^2y}{dx^2} = -k^2y$

has as its solution:

$\displaystyle y = A\cos{(kx)} + B\sin{(kx)}$

where A and B are arbitrary constants. Show also that this solution can be written in the form:

$\displaystyle y = C\cos{(kx+\alpha)} = C \ Re[e^{j(kx + \alpha)}] = C \ Re[Ce^{j\alpha}e^{jkx}]$

And express C and $\displaystyle \alpha$ as functions of A and B.

The differential equation is equivalent to $\displaystyle y^{\prime\prime}+k^2y=0$. The corresponding auxiliary equation is $\displaystyle r^2+k^2=0\implies r=\pm ki$. This implies that the corresponding solutions are $\displaystyle y_1=e^{-kix}$ and $\displaystyle y_2=e^{kix}$

Thus, the general solution has the form $\displaystyle y=c_1e^{-kix}+c_2e^{-kix}$

However, by Euler's formula, we see that $\displaystyle e^{ikx}=\cos(kx)+i\sin(kx)$ and $\displaystyle e^{-ikx}=\cos(kx)-i\sin(kx)$

Thus, $\displaystyle y=c_1\left[\cos(kx)-i\sin(kx)\right]+c_2\left[\cos(kx)+i\sin(kx)\right]$ $\displaystyle =\left(c_1+c_2\right)\cos(kx)+\left(c_2-c_1\right)i\sin(kx)$

Letting $\displaystyle A=c_1+c_2$ and $\displaystyle B=(c_2-c_1)i$, we see that the general solution is $\displaystyle \color{red}\boxed{y=A\cos(kx)+B\sin(kx)}$

Now, $\displaystyle A\cos(kx)+B\sin(kx)=\sqrt{A^2+B^2}\cos\left[kx-\tan^{-1}\left(\frac{B}{A}\right)\right]$ $\displaystyle =\sqrt{A^2+B^2}\left[\cos\left[kx-\tan^{-1}\left(\frac{B}{A}\right)\right]\right]=\sqrt{A^2+B^2}\text{Re}\left[e^{i\left[kx-\tan^{-1}\left(\frac{B}{A}\right)\right]}\right]$

I don't see how the last step is $\displaystyle \sqrt{A^2+B^2}\,\text{Re}\left[e^{i\left[kx-\tan^{-1}\left(\frac{B}{A}\right)\right]}\right]=\sqrt{A^2+B^2}\text{Re}\left[\sqrt{A^2+B^2}e^{ikx}e^{-i\tan^{-1}\left(\frac{B}{A}\right)}\right]$. I believe it should only be $\displaystyle \color{red}\boxed{\text{Re}\left[\sqrt{A^2+B^2}e^{ikx}e^{-i\tan^{-1}\left(\frac{B}{A}\right)}\right]}$. I may be wrong, though. Anyone can correct me if needed...

Does this make sense?
• Dec 4th 2008, 09:49 AM
Aryth
You're right... There is no C before the Re.

One thing though, there should be an i before the arctan in your final solution.

Thanks though, I understand it now.
• Dec 4th 2008, 10:48 AM
Chris L T521
Quote:

Originally Posted by Aryth
One thing though, there should be an i before the arctan in your final solution.

Yes. I forgot to include that.