# 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?

-

## marked as duplicate by user26486, Chappers, Najib Idrissi, user26857, user73985Jun 1 at 14:05

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
@DonAntonio: Yes dear Don. It is my wrong using of notation. I'll fix. Sorry for being Lazy in typing. –  Babak S. Jul 16 '13 at 10:20
Are there no easier solutions? –  71GA Jul 16 '13 at 10:51
@71GA: I don't know :) But there is a great comment above under question. Follow that. –  Babak S. Jul 16 '13 at 10:53

HINT:

We can also utilize Weierstrass substitution (1, 2), which will convert the given equation to a Quadratic equation in $\tan \frac x2$

-