<s>[INST] Prove $\sin(\alpha -\beta)+\sin(\alpha-\gamma)+\sin(\beta-\gamma)=4\cos\frac{\alpha-\beta}{2}\sin\frac{\alpha-\gamma}{2}\cos\frac{\beta-\gamma}{2}$ Here is a problem from Gelfand's Trigonometry:

Let $\alpha, \beta, \gamma$ be any angle, show that $$\sin(\alpha -\beta)+\sin(\alpha-\gamma)+\sin(\beta-\gamma)=4\cos\left(\frac{\alpha-\beta}{2}\right)\sin\left(\frac{\alpha-\gamma}{2}\right)\cos\left(\frac{\beta-\gamma}{2}\right).$$

I have tried to worked through this problem but cannot complete it. If I let $A= \alpha -\beta$, $B=\beta-\gamma$ and $C= \beta-\gamma$, and $A+B+C=\pi$ (now $A$, $B$ and $C$ are angles of a triangle), then I could prove the equality. But without this condition, I am stuck.
Could you show me how to complete this exercise?
 [/INST] Use factoring and algebra. Let $\;X:=e^{ix},\;Y:=e^{iy},\;Z:=e^{iz}.\;$
Then the following equations hold
$$\;\sin(x) = \frac{X-X^{-1}}{2i}, \; \cos(x)=\frac{X+X^{-1}}2,\;
    \sin(x-y) = \frac{X^2-Y^2}{2iXY},\; \cos(x-y)=\frac{X^2+Y^2}{2XY}.$$
Summing and factoring these equations using a Computer Algebra System gives the equation
$$ \sin(x\!-\!y) \!+\! \sin(x\!-\!z) \!+\! \sin(y\!-\!z) \!=\!
 \frac{X^2\!-\!Y^2}{2iXY} \!+\! \frac{X^2\!-\!Z^2}{2iXZ} \!+\! \frac{Y^2\!-\!Z^2}{2iYZ} \!=\! \frac{(X\!+\!Y)(X\!-\!Z)(Y\!+\!Z)}{2iXYZ}. $$
$$\textrm{Also now we have}
 \quad\cos\frac{x-y}2 = \frac{X+Y}{2\sqrt{XY}},\quad
    \sin\frac{x-z}2 = \frac{X-Z}{2i\sqrt{XZ}},\quad
    \cos\frac{y-z}2 = \frac{Y+Z}{2\sqrt{YZ}},$$
and the result follows. Of course, trigonometric identities can and have also been used to prove it.
With a slight sign change this more symmetrical trigonometric
identity is also true
$$ \sin(x\!-\!y) \!+\! \sin(y\!-\!z) \!+\! \sin(z\!-\!x)  \!=\!
-4 \sin\frac{x-y}2  \sin\frac{y-z}2  \sin\frac{z-x}2 . $$
</s>