How to rewrite $a\sin x+b\cos x$ just using $\sin x$ or $\cos x$?

400 Views Asked by At

For $$\sin (x)+\sqrt{3} \cos (x)$$, we can rewrite it as $$2 \sin \left(x+\frac{\pi }{3}\right)$$.

Is there a formula to represent $$a\sin(x)+b\cos(x)$$ just by using sine or cosine function just as the aforementioned example?

1

There are 1 best solutions below

0
On BEST ANSWER

$a \sin(x) + b\cos(x) = r \sin(x + \theta)$ where $r = \sqrt{a^2 + b^2}$, $a/r = \cos(\theta)$ and $b/r = \sin(\theta)$. Thus if $a > 0$, $\theta = \arcsin(b/r)$ while if $a < 0$, $\theta = \pi - \arcsin(b/r)$ will do.