# Pendulum differential equation question

Alright, for the second order differential d^2 theta/dt^2 = -g/l sin theta, where l is length of pendulum, g is gravity, etc...how do you solve that exactly for theta as a function of time?

I substituted (w=omega) dw/dt for d2theta/dt2...and eventually got 1/2 w^2 = g/l cos theta + C...but that doesn't give me theta as a function of time?

Any help is appreciated...thanks

Staff Emeritus
Gold Member
This problem usually asks for an approximation for small theta.

When that is the case, you can use the fact that

$$\sin \theta \rightarrow \theta$$,

$$\cos \theta \rightarrow 1 - \frac{\theta^2}{2}$$

Last edited:
but is there a way to solve it exactly?

alright here's what i did
so let's say O is theta, w is omega, for ease of writing

first i have
d2O/dt2 = -g/l sin O
I said w = dO/dt and then dw/dt=d2O/dt2
eventually i got to a point where i had
w dw = -g/l sin O dO
so i integrated and got
1/2 w^2 = g/l cos O + C

problem being, i had no time in there...
so then i put back in dO/dt for w and got
dO/dt = sqrt(2g/l * cosO)
so when you separate everything you get
dO/sqrt (cosO) = sqrt(2g/l) dO
then you integrate..here's where i ran into trouble yet again...how do you integrate the left hand side?

Homework Helper
No, there is no way to solve the "pendulum problem" exactly.

A standard attack is "linearization"- for small values of &theta;, replace sin(&theta;) by its linear approximation &theta; to get the linear equation d2&theta;/dt2= -(g/l)&theta;.

Another method is "quadrature" which is basically what you are doing. Let &omega;= d&theta;/dt so that d2&theta;/dt2= d&omega;/dt= (d&omega;/d&theta;)(d&theta;/dt)= &omega d&omega;/dt= -(g/l)sin&theta;.

That can be integrated to get (1/2)&omega;2= (g/l)cos(&theta;)+ C, a "first integral" (which physicists would associate with the "total energy" of the pendulum).

You could, of course, rewrite that as &omega;= d&theta;/dt= &radic;((2g/l)cos(&theta;)+ C); but the resulting integral is an "elliptic integral" which cannot be integrated exactly.

Originally posted by okalakacheekee
alright here's what i did
so let's say O is theta, w is omega, for ease of writing

first i have
d2O/dt2 = -g/l sin O
I said w = dO/dt and then dw/dt=d2O/dt2
eventually i got to a point where i had
w dw = -g/l sin O dO
so i integrated and got
1/2 w^2 = g/l cos O + C

problem being, i had no time in there...
so then i put back in dO/dt for w and got
dO/dt = sqrt(2g/l * cosO)
so when you separate everything you get
dO/sqrt (cosO) = sqrt(2g/l) dO
then you integrate..here's where i ran into trouble yet again...how do you integrate the left hand side?

What you've done turns up the very useful relation of pendulum speed versus amplitude. Another way to derive it is to write KE + PE = $${1\over 2}mv^2-mgl\cos\theta=\mbox{constant}$$.

You can plot curves in v vs. &theta; space (this space is called phase space); these will look like ellipses but become distorted into eye-shaped as the pendulum amplitude reaches large enough angles.

If you know enough "special functions", then yes, the problem is solvable in closed form. Look up info on "Jacobian Elliptic Functions". They're not as common as sines and cosines, but they are just as legitimate in the "finding a closed form solution" sense.

Last edited: