# How to Integrate the Differential Equation for the Pendulum Problem

The motion of a pendulum is described by the differential equation

$$\ddot\theta +\frac gl \sin \theta = 0$$

if we integrate this equation with respect to $$\theta$$ we obtain

$$\frac 12 \dot \theta ^2 - \frac gl \cos \theta = C$$

Would anyone please shed some light on how to integrate the first term? It seems that: $$\int \ddot \theta\,d\theta = \frac 12 \dot \theta ^2$$

Or in other words
$$\int{\frac{d^2\theta}{dt^2}}\,d\theta =\frac{1}{2}\left( \frac{d\theta}{dt} \right) ^2$$

There is a tidy trick for that using chain-rule. Remember this once and for all. We have

$$\ddot \theta (t) + {g \over l}\sin \left( {\theta \left( t \right)} \right) = 0$$

where it is a nonlinear second order differential equation. Wow, it seems scary a little as we don't have linearty. This is how we tackle this down

$$\ddot \theta (t) = {{{d^2}\theta } \over {d{t^2}}} = {d \over {dt}}\left( {{{d\theta } \over {dt}}} \right) = {d \over {d\theta }}\left( {{{d\theta } \over {dt}}} \right){{d\theta } \over {dt}} = \dot \theta {d \over {d\theta }}\left( {\dot \theta } \right) = {d \over {d\theta }}\left( {{1 \over 2}{{\dot \theta }^2}} \right)$$

then put this into the equation and integrate with respect to $\theta$.

I just want to say one more thing. When you use the work-energy theorem, you directly obtain the integrated form you wanted. Do you know why this happens? It's because the work-energy theorem is nothing more than integrating the second newton law. If you dig into the proof of work-energy theorem for a particle, you may understand what I mean.

• In your last step where did the $\frac 12$ come from? Oct 10, 2015 at 17:48
• How do you integrate $y{{dy} \over {dx}}$? You just find the aniderivative and it is simply ${1 \over 2}{y^2}$. Try it by taking the derivative. Do you understand me? Oct 10, 2015 at 17:51
• Of course I meant when $y=y(x)$. Oct 10, 2015 at 17:58
• Yes, I understand what you mean $y = \dot \theta$, and therefore when we integrate $\int \ddot \theta d\,\theta = \frac 12 \dot \theta ^2$ Oct 10, 2015 at 18:00
• so $x= \theta$ in your analogy? Oct 10, 2015 at 18:24

Multiply the equation through by $\dot{\theta}$:

$$\dot{\theta}\, \ddot{\theta} +\frac{g}{\ell} \dot{\theta} \sin{\theta} = 0$$

Integrate with respect to $t$.

$$\int dt \, \dot{\theta}\, \ddot{\theta} = \int d\dot{\theta} \, \dot{\theta} = \frac12 \dot{\theta}^2 + C$$

$$\int dt\, \dot{\theta} \sin{\theta} = \int d\theta \, \sin{\theta}$$

• Did you mean to put the $\,dt$ after the $\dot \theta \ddot \theta$ expression? Oct 10, 2015 at 17:41
• @user32882: No. I treat the integral as an operator, so I prefer the differential next to the integral sign. Oct 10, 2015 at 17:42

It follows from the chain rule,

$$\frac{d}{dt} = \frac{d\theta}{dt} \frac{d}{d\theta} = \dot{\theta} \frac{d}{d\theta},$$

$$\ddot{\theta} = \dot{\theta}\frac{d}{d\theta} \dot{\theta} = \frac12 \frac{d}{d\theta} \left( \dot{\theta}^2 \right).$$

I didn't like the above too much as an undergraduate because it looks like ana abuse of notation. One way to think about it is if the path is monotonic, then I can parameterize the derivative in terms of the value of $\theta$, i.e., it is possible to write $\dot{\theta}=g(\theta)$.

Another way of thinking about it is a change of variable in integration. We can change $t\rightarrow \theta(t)$ so long as $\theta$ is monotonic.

$$\int \ddot{\theta} dt \rightarrow \int \ddot{\theta} \dot{\theta} d\theta = \int \frac12 \frac{d}{dt}(\dot{\theta})^2 d\theta$$

• Question: is $\frac {dy}{dx} = \frac {d}{dx} y$ ? Oct 10, 2015 at 18:45
• @user32882, yes that's right. Oct 10, 2015 at 19:08