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

Consider the function

${\displaystyle f(x)=a\sin(x)+b\cos(x)}$

We shall show that this is a sinusoidal wave, and find its amplitude and phase.

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 ArgumentEdit

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

${\displaystyle g(\theta )=a_{1}\sin(\theta +\lambda _{1})+a_{2}\sin(\theta +\lambda _{2})}$

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

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

If we now draw a line ${\displaystyle {\overline {AB}}}$  of length ${\displaystyle a_{2}}$  at angle ${\displaystyle \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 ${\displaystyle B}$  . The line ${\displaystyle {\overline {OB}}}$  does not change in length as we change ${\displaystyle \theta }$  , because the lengths of ${\displaystyle {\overline {OA}}}$  and ${\displaystyle {\overline {AB}}}$  and the angle between them do not change. All that happens is that the triangle ${\displaystyle \Delta OBC}$  rotates about O. In particular ${\displaystyle {\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 ${\displaystyle {\overline {OB}}}$  and the phase is ${\displaystyle \lambda _{1}+\angle BOA}$  .

## Algebraic ArgumentEdit

The algebraic argument is essentially an algebraic translation of the insights from the geometric argument. We're also in the special case that ${\displaystyle \lambda _{1}=0}$ and ${\displaystyle \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 ${\displaystyle \lambda _{1}+\angle BOA}$  and the 'x' plays the role of ${\displaystyle \theta }$  .

We define the angle y by ${\displaystyle \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

${\displaystyle \sin(y)={\frac {b}{\sqrt {a^{2}+b^{2}}}}}$  and ${\displaystyle \cos(y)={\frac {a}{\sqrt {a^{2}+b^{2}}}}}$  .
 Check this Check that ${\displaystyle \sin ^{2}(x)+\cos ^{2}(x)=1}$  as expected.
{\displaystyle {\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)\\\end{aligned}}}  ,

which is (drum roll) a sine wave of amplitude ${\displaystyle {\sqrt {a^{2}+b^{2}}}}$  and phase 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: ${\displaystyle 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 ${\displaystyle \triangle OBC}$  is not a right triangle. What additional trig formulas did you need?