[Tex/LaTex] Problem with equation format when starting equation with \dot and \ddot

equationsmath-mode

I am having problems with equation formatting inside the equation environment when the equations begin with \dot or \ddot

When I write:

\begin{equation}

    \ddot{\theta} + \frac{g}{l}\sin(\theta) = 0

\end{equation}

The theta with the dots in the equation does not appear, the formula begins at the left margin and the number appears on the line below.

I am using the book document class with the ams packages and the spanish babel package as well. I am using pdflatex to compile via Texmaker.

Best Answer

A blank line in a display math environment is always disallowed and certainly produces error messages and, possibly, wrong output.

If you prefer to have space in the input, type

\begin{equation}
%
\ddot{\theta} + {\dfrac{g}{l}}\sin(\theta) = 0 
%
\end{equation}

but never leave a blank line there.

Related Question