Find $\cos(\alpha+\beta)$ if $\alpha$, $\beta$ are the roots of the equation $a\cos x+b\sin x=c$ 
If $\alpha$, $\beta$ are the roots of the equation $a\cos x+b\sin x=c$, then prove that $\cos(\alpha+\beta)=\dfrac{a^2-b^2}{a^2+b^2}$

My Attempt
$$
b\sin x=c-a\cos x\implies b^2(1-\cos^2x)=c^2+a^2\cos^2x-2ac\cos x\\
(a^2+b^2)\cos^2x-2ac\cos x+(c^2-b^2)=0\\
\implies\cos^2x-\frac{2ac}{a^2+b^2}\cos x+\frac{c^2-b^2}{a^2+b^2}=0
$$
$$
a\cos\alpha+b\sin\alpha=c\implies a\cos^2\alpha\cos\beta+b\sin\alpha\cos\alpha\cos\beta=c\cos\alpha\cos\beta\\
a\cos\beta+b\sin\beta=c\implies a\sin\alpha\sin\beta\cos\beta+b\sin\alpha\sin^2\beta=c\sin\alpha\sin\beta\\
c\cos(\alpha+\beta)=a\cos\beta+a\sin\alpha\cos\beta.(\sin\beta-\sin\alpha)+b\sin\alpha+b\sin\alpha\cos\beta(\cos\alpha-\cos\beta)\\
$$
I think its getting complicated to solve now. What is the simplest way to solve this kind of problems? 
 A: To begin with, notice that
\begin{align*}
& a\cos(x) + b\sin(x) = c \Longleftrightarrow \frac{a}{\sqrt{a^{2}+b^{2}}}\cos(x) + \frac{b}{\sqrt{a^{2}+b^{2}}}\sin(x) = \frac{c}{\sqrt{a^{2}+b^{2}}}\Longleftrightarrow\\
& \sin(\theta + x) = \frac{c}{\sqrt{a^{2}+b^{2}}}\quad\text{where}\quad \sin(\theta) = \frac{a}{\sqrt{a^{2}+b^{2}}}\,\,\text{and}\,\,\cos(\theta) = \frac{b}{\sqrt{a^{2}+b^{2}}}\\\\
&\therefore \alpha = \arcsin\left(\frac{c}{\sqrt{a^{2}+b^{2}}}\right) - \theta\quad\text{and}\quad\beta = \pi - \arcsin\left(\frac{c}{\sqrt{a^{2}+b^{2}}}\right) - \theta
\end{align*}
Finally, we get
\begin{align*}
\cos(\alpha+\beta) = \cos(\pi-2\theta) = -\cos(2\theta) = 2\sin^{2}(\theta)-1 = \frac{2a^{2}}{a^{2}+b^{2}} - 1 = \frac{a^{2}-b^{2}}{a^{2}+b^{2}}
\end{align*}
A: Setting $z=e^{ix}$, the equation can be rewritten in a quadratic form
$$a\frac{z+z^{-1}}2+b\frac{z-z^{-1}}{2i}=c,$$
$$(a-ib)z^2-2cz+a+ib=0$$
and by Vieta, the product of the roots (in $z$) is
$$\frac{a+ib}{a-ib},$$ giving the identity
$$\cos(\alpha+\beta)+i\sin(\alpha+\beta)=e^{i\alpha}e^{i\beta}=\frac{a^2-b^2}{a^2+b^2}+i\frac{2ab}{a^2+b^2}.$$
A: Guide: $c= a\cos \alpha +b\sin \alpha = a\cos \beta + b\sin \beta \implies a(\cos \alpha -\cos \beta) = b(\sin \beta-\sin \alpha)\implies \dfrac{a^2}{b^2}=\dfrac{(\sin \alpha - \sin \beta)^2}{(\cos \alpha - \cos \beta)^2}=m\implies RHS = \dfrac{m-1}{m+1}=...LHS$
A: Answer in the image. Hopefully it is legible

A: I would like to present you a geometric explanation of what is happening.
If $\xi = \cos x$ and $\eta=\sin x$, then you rewrite your equation as:
$$
  a\xi +b\eta=c,\qquad \xi^2+\eta^2=1.
$$
So you are trying to find intersection points of a line and a circle.

Simple geometry tells us that bisector $AF$ is perpendicular to line $DE$. If $\angle CAD = \alpha$ and $\angle CAE = \beta$, then $\angle CAF=(\alpha+\beta)/2$. On the other hand, coordinates of $F$ are
$$\xi_F = \pm \frac a{\sqrt{a^2+b^2}},\qquad \eta_F=\pm \frac b{\sqrt{a^2+b^2}}$$
because vector $(a,b)$ is normal to line $a\xi +b\eta=c$, and then we scale it so $F$ lies on a unit circle. We also have $\pm$ here, because bisector intersects circle in two points, and which of them is $F$ depends on the value of $c$.
$$\cos(\alpha+\beta)=\cos\left(2\frac{\alpha+\beta}2\right) = \cos^2\frac{\alpha+\beta}2 - \sin^2\frac{\alpha+\beta}2 = \xi_F^2 -\eta_F^2=\frac{a^2-b^2}{a^2+b^2}.$$
Notably, our answer doesn't depend on the choice of the signs, as $(\pm a)^2 = a^2$
