# Differential Equations

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

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

has as its solution:

$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:

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

And express C and $\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:

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

has as its solution:

$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:

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

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

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

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

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

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

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

Now, $A\cos(kx)+B\sin(kx)=\sqrt{A^2+B^2}\cos\left[kx-\tan^{-1}\left(\frac{B}{A}\right)\right]$ $=\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 $\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 $\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.