<s>[INST] Simplify trigonometric expression $\frac{1 - \cos A + \cos B - \cos(A + B)}{1 + \cos A - \cos B - \cos(A + B)}$ 
Simplify
  $$\frac{1 - \cos A + \cos B - \cos(A + B)}{1 + \cos A - \cos B - \cos(A + B)}$$

How can I simplify this trigonometric expression? 
Can you explain it if possible?
 [/INST] Writing $A=2x,B=2y$ and using 
http://mathworld.wolfram.com/ProsthaphaeresisFormulas.html
$$\dfrac{1-\cos2(x+y)}{\cos2x-\cos2y}=\dfrac{2\sin^2(x+y)}{-2\sin(x+y)\sin(x-y)}=\dfrac{\sin(x+y)}{-\sin(x-y)}$$
assuming $\sin(x+y)\ne0$
Use https://www.qc.edu.hk/math/Junior%20Secondary/Componendo%20et%20Dividendo.htm
</s>