# Solving the trigonometric equation $A\cos x + B\sin x = C$ [duplicate]

I have a simple equation which i cannot solve for $x$:

$$A\cos x + B\sin x = C$$

Could anyone show me how to solve this. Is this a quadratic equation?

• See this answer for the general approach and an example. – Ayman Hourieh Jul 16 '13 at 10:12
• My picture-answer to a related question may be helpful. – Blue Jul 16 '13 at 11:19

$A\cos x+B\sin x=C$ so if $A\neq 0, B\neq 0$ then $$\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}}$$ in which $$\frac{A}{\sqrt{A^2+B^2}}\le1,~~\frac{B}{\sqrt{A^2+B^2}}\le1,~~\frac{C}{\sqrt{A^2+B^2}}\le1$$ This means you can suppose there is a $\xi$ such that $\cos(\xi)=\frac{A}{\sqrt{A^2+B^2}},\sin(\xi)=\frac{B}{\sqrt{A^2+B^2}}$ and so...
• +1 . I think the condition needed here is merely $\,A\neq 0\;\;or\;\;B\neq 0\;$ , though if one of them is zero then the equation is much easier. – DonAntonio Jul 16 '13 at 10:18
We can also utilize Weierstrass substitution (1, 2), which will convert the given equation to a Quadratic equation in $\tan \frac x2$