Help on proving a trigonometric identity involving cot and half angles Prove: $\cot\frac{x+y}{2}=-\left(\frac{\sin x-\sin y}{\cos x-\cos y}\right)$.
My original idea was to do this:
$\cot\frac{x+y}{2}$ = $\frac{\cos\frac{x+y}{2}}{\sin\frac{x+y}{2}}$, then substitute in the formulas for $\cos\frac{x+y}{2}$ and $\sin\frac{x+y}{2}$, but that became messy very quickly.
Did I have the correct original idea, but overthink it, or is there any easier way? Hints only, please.

You should know the following factorisation formulae:


*

*$\sin p +\sin q= 2\sin\dfrac{p+q}2 \cos\dfrac{p-q}2$

*$\sin p-\sin q= 2\sin\dfrac{p-q}2 \cos\dfrac{p+q}2$

*$\cos p +\cos q= 2\cos\dfrac{p+q}2 \cos\dfrac{p-q}2$

*$\cos p-\cos q= -2\sin\dfrac{p+q}2 \sin\dfrac{p-q}2$
(They're derived from : \begin{align*}
&\sin(a+b)+\sin(a-b)= 2\sin a \cos b &&
\sin(a+b)-\sin(a-b)= 2\sin b \cos a\\
&\cos(a+b)+\cos(a-b)= 2\cos a \cos b&&
\cos(a+b)-\cos(a-b)= -2\sin a \sin b
\end{align*} by setting $p=a+b$, $q=a-b$.)
