# Math Help - How do you obtain this formula?

1. ## How do you obtain this formula?

I saw this in my textbook that asin(x)+bcos(x) can be written as Rsin(x+@). And there is a similar formula for cosine as well. It also says that R2=a2+b2. How and why do we obtain these relations? And what about putting in some variations like putting powers on the trig functions. In the textbook these types of questions continually keep cropping up like: convert 3sin(x)+2cos(x) in the form Rsin(x+@). Can you explain how doing it by using double angle or addition formulae of trig functions, if possible. Or what if we have to convert it to Rcos(x+@).Or if there are powers on trig functions.

2. ## Re: How do you obtain this formula?

Let $f \left( x \right)=a \sin x+b \cos x$
Divide both members by $\sqrt{a^2+b^2}$:
$\frac{f \left( x \right)}{\sqrt{a^2+b^2}}=\frac{a}{\sqrt{a^2+b^2}}\ sin x+\frac{b}{\sqrt{a^2+b^2}}\cos x$
We have that $\left(\frac{a}{\sqrt{a^2+b^2}}\right)^2+\left( \frac{b}{\sqrt{a^2+b^2}}\right)^2=1$ and $\frac{a}{\sqrt{a^2+b^2}}, \ \frac{b}{\sqrt{a^2+b^2}}\in \left[ -1,1\right]$.
Then $\exists \phi\in \mathcal{R}$ such as $\cos\phi = \frac{a}{\sqrt{a^2+b^2}}$ and $\sin\phi = \frac{b}{\sqrt{a^2+b^2}}$
So $\frac{f\left( x \right)}{\sqrt{a^2+b^2}}=\sin x\cos\phi+\sin\phi\cos x=\sin\left(x+\phi\right)$
and $f \left( x \right)=\sqrt{a^2+b^2}\sin\left(x+\phi\right)$
If we note $R^2=a^2+b^2$ then $a\sin x+b\cos x=R\sin\left(x+\phi\right)$