# Simple Harmonic Motion solution problem

1. May 10, 2009

### Matuku

I've been going through and proving to myself that the solution to the SHM equation is correct; at A level we were just told what it was but never really shown why.

I've gone through the problem as a standard 2nd Order ODE (with complex roots of course) and ended up at:

$$x = A_{real} cos(\omega t) - A_{im} sin(\omega t)$$

But the form I want (as the one were were given) is $$Bsin(\omega t + \phi)$$

http://mathworld.wolfram.com/SimpleHarmonicMotion.html seems to imply that you can get:
$$B cos(\phi) = A_{real}$$
$$B sin(\phi) = A_{im}$$

Which then allows use of a trigonometric identity to get it to cos (still not quite what I want but you can just put an extra pi/2 into the phi and make it sin). Is this always the case? Can you always find values of B and $$\phi$$ which will allow this?

2. May 10, 2009

### HallsofIvy

Staff Emeritus
$sin(x+ y)= sin(x)cos(y)+ cos(x)sin(y) is the trigonometric identity you refer to. Of course, we must have $sin^2(x)+ cos^2(x)= 1$ but what you can do is this: Given $A_{real} cos(\omega t)+ A_{imag}sin(\omega t)$, if $\sqrt{A^2_{real}+ A^2_{imag}}\ne 1$, factor that out: $\sqrt{A^2_{real}+ B^2_{imag}}\left(\frac{A_{real}}{\sqrt{A^2_{real}+ B^2_{imag}}}cos(\omega t)+ \frac{A_{imag}}{\sqrt{A^2_{real}+ B^2_{imag}}}sin(\omega t)\right)$. And, now, because $\left(\frac{A_{real}}{\sqrt{A^2_{real}+ B^2_{imag}}}\right)^2+ \frac{A_{imag}}{\frac{A_{real}}{\sqrt{A^2_{real}+ B^2_{imag}}}}= 1$, we can find $\phi$ such that $cos(\phi)= \frac{A_{real}}{\frac{A_{real}}{\sqrt{A^2_{real}+ B^2_{imag}}}}$ and $sin(\phi)= \frac{A_{imag}}{\frac{A_{real}}{\sqrt{A^2_{real}+ B^2_{imag}}}}$ and thus, $$A_{real}cos(\omega t)+ A_{imag}sin(\omega t)=\sqrt{A^2_{real}+ A^2_{imag}}\left( sin(\phi)cos(\omega t)+ cos(\phi)sin(\omega t)\right)= \sqrt{A^2_{real}+ A^2_{imag}}sin(\omega t+ \phi)$ Last edited: May 10, 2009 3. May 10, 2009 ### Matuku Ah, that brings back memories from A level actually; let me see if I've got this right. Let, [tex]\] Acos(\theta) + Bsin(\theta) = Rsin(\theta + \phi)\\ \therefore Acos(\theta) + Bsin(\theta)=Rcos(\theta)sin(\phi) + Rsin(\theta)cos(\phi)\\ \therefore A = Rsin(\phi), B= Rcos(\phi)\\ \therefore R = sqrt{A^2 + B^2}, \phi=arctan(A/B)\\ \[$$

Last edited: May 10, 2009