# Trigonometry/Simplifying a sin(x) + b cos(x)

Consider the function

$f(x)=a\sin(x)+b\cos(x)$ We shall show that this is a sinusoidal wave

$f(x)=A\sin(x+\phi )$ and find that the amplitud is $A={\sqrt {a^{2}+b^{2}}}$ and the phase $\phi =\arctan {\frac {b}{a}}$ To make things a little simpler, we shall assume that a and b are both positive numbers. This isn't necessary, and after studying this section you may like to think what would happen if either of a or b is zero or negative.

## Geometric Argument

We'll first use a geometric argument that actually shows a more general result, that:

$g(\theta )=a_{1}\sin(\theta +\lambda _{1})+a_{2}\sin(\theta +\lambda _{2})$ is a sinusoidal wave. Since we can set $\lambda _{1}=0^{\circ }\ ,\ \lambda _{2}=90^{\circ }$ the result we are trying for with $f$ follows as a special case.

We use the 'unit circle' definition of sine. $a_{1}\sin(\theta +\lambda _{1})$ is the y coordinate of a line of length $a_{1}$ at angle $\theta +\lambda _{1}$ to the x axis, from O the origin, to a point A.

If we now draw a line ${\overline {AB}}$ of length $a_{2}$ at angle $\theta +\lambda _{2}$ (where that angle is measure relative to a line parallel to the x axis), its y coordinate is the sum of the two sines.

However, there is another way to look at the y coordinate of point $B$ . The line ${\overline {OB}}$ does not change in length as we change $\theta$ , because the lengths of ${\overline {OA}}$ and ${\overline {AB}}$ and the angle between them do not change. All that happens is that the triangle $\Delta OBA$ rotates about O. In particular ${\overline {OB}}$ rotates about O.

This then brings us back to a 'unit circle' like definition of a sinusoidal function. The amplitude is the length of ${\overline {OB}}$ and the phase is $\lambda _{1}+\angle BOA$ .

## Algebraic Argument

The algebraic argument is essentially an algebraic translation of the insights from the geometric argument. We're also in the special case that $\lambda _{1}=0$ and $\angle OAB=90^{\circ }$ . The x's and y's in use in this section are now no longer coordinates. The 'y' is going to play the role of $\lambda _{1}+\angle BOA$ and the 'x' plays the role of $\theta$ .

We define the angle y by $\tan(y)={\frac {b}{a}}$ .

By considering a right-angled triangle with the short sides of length a and b, you should be able to see that

$\sin(y)={\frac {b}{\sqrt {a^{2}+b^{2}}}}$ and $\cos(y)={\frac {a}{\sqrt {a^{2}+b^{2}}}}$ .
 Check this Check that $\sin ^{2}(x)+\cos ^{2}(x)=1$ as expected.
{\begin{aligned}f(x)&=a\sin(x)+b\cos(x)\\&={\sqrt {a^{2}+b^{2}}}\left({\frac {a}{\sqrt {a^{2}+b^{2}}}}\sin(x)+{\frac {b}{\sqrt {a^{2}+b^{2}}}}\cos(x)\right)\\&={\sqrt {a^{2}+b^{2}}}{\Big (}\sin(x)\cos(y)+\cos(x)\sin(y){\Big )}\\&={\sqrt {a^{2}+b^{2}}}\sin(x+y)\\&=A\sin(x+\phi )\end{aligned}} ,

which is (drum roll) a sine wave of amplitude $A={\sqrt {a^{2}+b^{2}}}$ and phase $\phi =y$ .

 Check this Check each step in the formula. What trig formulae did we use?
 The more general case Can you do the full algebraic version for the more general case: $g(\theta )=a_{1}\sin(\theta +\lambda _{1})+a_{2}\sin(\theta +\lambda _{2})$ using the geometric argument as a hint? It is quite a bit harder because $\triangle OBC$ is not a right triangle. What additional trig formulas did you need?