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$$
I don't really buy it