Showing that $a \sin x \pm b \cos y =\sqrt{q^2+r^2}\;\sin\left(\frac{x\pm y}{2}+\arctan\frac{r}{q}\right)$

80 Views Asked by At

I'm having trouble showing this formula, can you give me a hand? $$a \sin x \pm b \cos y =\sqrt{q^2+r^2}\;\sin\left(\frac{x\pm y}{2}+\arctan\frac{r}{q}\right)$$ where $$q=(a+b)\cos\frac{x\mp y}{2}$$ $$r=(a-b)\sin\frac{x\mp y}{2}$$ This is the point where I arrived,by extending the right side $$a \left[\cos\frac{x∓y}{2}\sin\frac{x±y}{2}+\sin\frac{x∓y}{2}\cos\frac{x±y}{2} \right]+$$ $$b\left[\cos\frac{x\mp y}{2}\sin\frac{x±y}{2}-\sin\frac{x∓y}{2}\cos\frac{x±y}{2} \right]$$