Why does this equality hold?
$\sin x - \sin y = 2 \cos(\frac{x+y}{2}) \sin(\frac{x-y}{2})$.
My professor was saying that since
(i) $\sin(A+B)=\sin A \cos B+ \sin B \cos A$
and
(ii) $\sin(A-B) = \sin A \cos B - \sin B \cos A$
we just let $A=\frac{x+y}{2}$ and $B=\frac{x-y}{2}$. But I tried to write this out and could not figure it out. Any help would be appreciated
The main trick is here:
\begin{align} \color{red} {x = {x+y\over2} + {x-y\over2}}\\[1em] \color{blue}{y = {x+y\over2} - {x-y\over2}} \end{align}
(You may evaluate the right-hand sides of them to verify that these strange equations are correct.)
Substituting the right-hand sides for $\color{red}x$ and $\color{blue}y,\,$ you will obtain
\begin{align} \sin \color{red} x - \sin \color{blue }y = \sin \left(\color{red}{{x+y\over2} + {x-y\over2} }\right) - \sin \left(\color{blue }{{x+y\over2} - {x-y\over2}} \right) \\[1em] \end{align}
All the rest is then only a routine calculation:
\begin{align} \require{enclose} &= \sin \left({x+y\over2}\right) \cos\left( {x-y\over2} \right) + \sin \left({x-y\over2}\right) \cos\left( {x+y\over2} \right)\\[1em] &-\left[\sin \left({x+y\over2}\right) \cos\left( {x-y\over2} \right) - \sin \left({x-y\over2}\right) \cos\left( {x+y\over2} \right)\right]\\[3em] &= \enclose{updiagonalstrike}{\sin \left({x+y\over2}\right) \cos\left( {x-y\over2} \right)} + \sin \left({x-y\over2}\right) \cos\left( {x+y\over2} \right)\\[1em] &-\enclose{updiagonalstrike}{\sin \left({x+y\over2}\right) \cos\left( {x-y\over2} \right)} + \sin \left({x-y\over2}\right) \cos\left( {x+y\over2} \right) \\[3em] &=2\sin \left({x-y\over2}\right) \cos\left( {x+y\over2} \right)\\ \end{align}