# Obtain the formula of the half angle - Question

I have a question regarding the answer of @Sandy G of the following one: Procedure for obtaining the formulas of the half angle

I'm trying to do the same but for other formula:

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\begin{alignat*}{2}
-\cos^2 \left( \dfrac{\alpha}{2}\right) &+\sin^2 \left( \dfrac{\alpha}{2}\right) &&=-\cos \alpha \\
\cos^2 \left( \dfrac{\alpha}{2}\right) &+\sin^2 \left( \dfrac{\alpha}{2}\right) &&=1\\[-1ex]
&\rlap{\rule{5.1cm}{.5pt}} \\[-1ex]
2&\sin^2 \left( \dfrac{\alpha}{2}\right)&&= 1-\cos \alpha \Rightarrow \sin^2 \left( \dfrac{\alpha}{2}\right)=\dfrac{1-\cos \alpha}{2}\Rightarrow \sin \left( \dfrac{\alpha}{2}\right) = \pm \sqrt{\dfrac{1-\cos \alpha}{2}}
\end{alignat*}
\end{document}

The result is:

But the line is offset to the left and the $2\sin^2$ if it could be glued to the equal symbol....

• Look closer to your & placements. And please edit your question to give a full MWE. Feb 20, 2023 at 9:19
• @SebGlav, I tried to play with the positions of the &, but I didn't succeed. Feb 20, 2023 at 10:29