The equations of motions for a simple pendulum is given by

$$\ddot{\theta} ~=~ -\frac{g}{\ell}\sin(\theta),$$

where $g$ is acceleration due to gravity and $\ell$ is the length of the pendulum's string. Notice that the differential equation is of second order, does this mean that if I solve this equation numerically, the numbers that I get refers to the change in the velocity of the pendulum?

  • $\begingroup$ Hint, how is the velocity related to the rate of change of the angle $\dot{\theta}$. $\endgroup$ – ja72 Mar 5 '13 at 16:56
  • $\begingroup$ What I am thinking is that $\dot{\theta}$ refers to the velocity of the pendulum, so $\ddot{\theta}$ is the acceleration of the pendulum $\endgroup$ – user61835 Mar 8 '13 at 16:52
  • 1
    $\begingroup$ yes if you add the word "angular" in there. $\endgroup$ – ja72 Mar 8 '13 at 18:40

This is really the same as Mark's answer but phrased in a different way. If you write your equation in Leibniz's notation it is:

$$ \frac{d^2\theta}{dt^2} = -\frac{g}{\ell}\sin(\theta) $$

This makes it clearer that the solution is going to be the function $\theta(t)$ i.e. the angle as a function of time.


If you solve the equation for $\theta$, whether numerically or otherwise, you will have $\theta$, not $\dot\theta$ or $\ddot{\theta}$. You can get those by differentiating, of course, or you may find them as part of your numerical algorithm along the way. The fact that the equation is second order simply means you will need two initial conditions to find a solution.


This might be helpful if you want to check the accuracy of your numerical integration scheme.

Normalize time using $\tau=t\sqrt{g/l}$ giving $$\frac{d^2\theta}{d\tau^2}=-\sin\theta$$ which can be written as $$ \frac12\frac{d}{d\theta}\left(\frac{d\theta}{d\tau}\right)^2=-\sin\theta $$ Integrating this gives, $$ \frac{d\theta}{d\tau}=\sqrt{c+2\cos\theta} $$ Put $\theta=2\lambda$ so $$ d\tau=\frac{2d\lambda}{\sqrt{c+2-4\sin^2\lambda}} $$ and thus $$ \tau(\theta)=\tau\left(\theta_0\right)+\frac{2}{\sqrt{2+c}}\int_{\theta_0/2}^{\theta/2}\frac{d\lambda}{\sqrt{1-\frac{4}{2+c}\sin^2\lambda}} $$ which is the tabulated form of the standard elliptic integral with modulus $4/(2+c)$. Numerical solution requires choosing initial values $\theta_0$ and $\left(\frac{d\theta}{d\tau}\right)_0$ and thus $$ c=\left(\frac{d\theta}{d\tau}\right)_0^2-2\cos\theta_0 $$

  • $\begingroup$ No image. What do you mean by a "math editor?" $\endgroup$ – Bill N Jun 27 '17 at 14:20
  • $\begingroup$ Okay, I fixed your link, but why not put this in using MathJax? $\endgroup$ – Bill N Jun 27 '17 at 14:24
  • $\begingroup$ I dont have MathJax. I use MS Word $\endgroup$ – Jens Jun 27 '17 at 20:50
  • $\begingroup$ Sorry there is a typo in the second equation. The outside derivative should be dtheta, not dt. $\endgroup$ – Jens Jun 27 '17 at 20:54
  • 1
    $\begingroup$ MathJax is how we write nice equations in answers. You should take some time studying this link: math.meta.stackexchange.com/questions/5020/… $\endgroup$ – Bill N Jun 27 '17 at 21:32

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.