<s>[INST] If $x_1, x_2$ are roots of $a\cos x+b\sin x+c=0$ for $x_1+x_2\ne 2k\pi$ show that $\sin(x_1+x_2)=\frac{2ab}{a^2+b^2}.$ If $x_1, x_2$ are roots of $a\cos x+b\sin x+c=0$ for $x_1+x_2≠2kπ$ show that $\sin(x_1+x_2)=\frac{2ab}{a^2+b^2}$
What I've done till now:
$$a\cos x_1+b\sin x+c-(a\cos x_2+b\sin x_2+c)=0$$
$a\cos x_1+b\sin x_1-a\cos x_2-b\sin x_2=0$
$a(\cos x_1-\cos x_2)+b(\sin x_1-\sin x_2)=0$
$a(-2\sin(\frac{x_1+x_2}{2})\sin(\frac{x_1-x_2}{2}))+b(2\sin(\frac{x_1-x_2}{2})\cos(\frac{x_1+x_2}{2}))=0$
$-a\sin(\frac{x_1+x_2}{2})+b(\frac{\cos x_1+x_2}{2})=0$
That's it. Does anyone know how to solve this?
 [/INST] Just rewrite this equation in terms of complex exponentials:
$$\frac{a-bi}{2}e^{ix}+\frac{a+bi}{2}e^{-ix}+c=0$$
Setting $z=a+bi$ one can rewrite the equation as a quadratic in $w=e^{ix}$
$$\bar{z}w^2+cw+z=0$$
From Vieta's formulae we know that the product of the two roots of the equation is
$$w_1w_2=e^{i(x_1+x_2)}=\frac{z}{\bar{z}}$$
which, upon separating real and imaginary parts yields
$$\cos(x_1+x_2)=\frac{a^2-b^2}{a^2+b^2}~,~\sin(x_1+x_2)=\frac{2ab}{a^2+b^2}$$
</s>