2

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: enter image description here

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

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

1 Answer 1

2

You could pad it with some hspace for a quick and dirty fix:

\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]
    &\hspace{4.7em}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}

sin half angle derivation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .