I've managed to locate the problem, It happens when I leave a blank line between the begin equation command and the actual equation:
\documentclass[12pt,a4paper,twoside,openright,titlepage]{book}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\ddot{\theta} + {\dfrac{g}{l}}\sin(\theta) = 0
\end{equation}
\end{document}
It happens whether I'm using the book or article document class. It might have to do with the amsmath package but that's not the whole problem.
Since when I use \frac
instead of \dfrac
and do not include the amsmath package the character with the \ddot
does appear but the equation is not centered and the number of the equation is not right aligned.
When using the article document class, the error is slightly different, the equation does not appear centered but the number of the equation appears on the same line yet without any spaces after the end of the equation.
In summary: Do not leave a blank line after beginning the equation environment whether you are using \frac
or \dfrac
.