I am trying to derive the solution to the equation of simple harmonic motion without guessing the sin/cos result. I know I have seen this proof somewhere, but I can't find anything about it online. All I can find are sources using the guessing technique.

In a nutshell, I would be grateful if someone could point me in the direction of a proof that the most general solution to

$$\frac{d^2x}{dt^2} - k^2x =0$$


$$x(t)= A \cos(kt+\phi) = B\cos(kt) + C\sin(kt)$$


Hint: A good start should be writing the simple harmonic motion equation correctly

$$\frac{d^2}{dt^2} x(t) + \frac{k}{m} x(t) = 0$$

Thus writing $x(t) = e^{rt}$ you should find $r^2 + k/m = 0$ which implies $r = \pm i\sqrt{\frac{k}{m}}$. Now remember that $$e^{\mu it} = \cos (\mu t ) + i \sin (\mu t)$$ and that combinations of such are also solutions.

  • $\begingroup$ Thank you for your reply! Is there a reason why we would write $x(t)=e^{rt}$? Is that not already guessing some solutions? $\endgroup$ – Meep Dec 9 '16 at 17:36
  • 1
    $\begingroup$ @21joanna12 yep, it's totally guessing. Educated guessing that is. Note that differentiating the exponential gives itself up to constant factor, which matches the form your differential equation is (look at the left hand side). A lot of solving differential equations is guessing and checking! For example, look up the Method of Undetermined Coefficients. Educated guesses of course, but still guesses :) $\endgroup$ – Brevan Ellefsen Dec 9 '16 at 17:56
  • $\begingroup$ The reason is how the derivative of $e^{rt}$ behaves. And yes, you work out different methods to give solutions to each ODE. Most of which are based on good guesses. $\endgroup$ – Aaron Maroja Dec 9 '16 at 17:56

If $x'' + ax = 0$, multiplying by $x'$, $x'x'' + axx' = 0$, or $2x'x'' + 2axx' = 0$, or $(x'^2)' + a (x^2)' = 0 $.

Integrating, $x'^2+ax^2 = c $.

There a number of ways to solve this.

  • $\begingroup$ Hi Marty Cohen, thank you for your reply! Could you give some names of techniques used to solve the above so I can look them up? I have never seen an equation like this with derivatives being squared before. $\endgroup$ – Meep Dec 9 '16 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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