# How do you use linear combinations to solve trigonometric equations?

##### 1 Answer
Apr 27, 2018

Substitute

$a \cos x + b \sin x = \sqrt{{a}^{2} + {b}^{2}} \cos \left(x - \textrm{\arctan 2} \left(b / , a\right)\right)$

where arctan2 is the two parameter, four quadrant inverse tangent.

#### Explanation:

I've been answering all these old math questions. It's hard to know if anyone reads the answers.

The linear combination of a cosine and a sine of the same angle corresponds to a scaling and a phase shift. Let's explain how that works.

The linear combination of a cosine and a sine of the same angle is an expression of the form:

$a \cos x + b \sin x$

That looks very much like the sum angle formula for sine or the difference angle formula for cosine:

$\sin \left(\alpha + \beta\right) = \sin \alpha \cos \beta + \cos \alpha \sin \beta$

$\cos \left(\alpha - \beta\right) = \cos \alpha \cos \beta + \sin \alpha \sin \beta$

Indeed, we can take our linear combination and transform it into a scaled version of either of these. Pro Tip: When given a choice, prefer cosine to sine.

Let's multiply by a scale factor $r$ and set $\alpha = x , \beta = \theta .$

$r \cos \left(x - \theta\right) = r \cos \theta \cos x + r \sin \theta \sin x$

Matching to our linear combination leads us to want to solve for $r$ and $\theta$:

$a = r \cos \theta$

$b = r \sin \theta$

We've seen this before. It's how we turn turn the polar coordinates $P \left(r , \theta\right)$ to rectangular coordinates, here $\left(a , b\right) .$ So our task is to turn $\left(a , b\right)$ to polar coordinates.

Let's remind ourselves how to do that, perhaps in a bit more detail than usually seen.

Squaring and adding we get

${a}^{2} + {b}^{2} = {\left(r \cos \theta\right)}^{2} + {\left(r \sin \theta\right)}^{2} = {r}^{2} \left({\cos}^{2} \theta + {\sin}^{2} \theta\right) = {r}^{2}$

$r = \sqrt{{a}^{2} + {b}^{2}}$

$\sin \theta = \frac{b}{r}$

$\cos \theta = \frac{a}{r}$

$\tan \theta = \frac{b}{a}$

$\theta = \textrm{\arctan 2} \left(b / , a\right)$

Usually this is written as the regular arctangent, but that's not really right. The regular arctangent only covers two quadrants, and doesn't work on the y axis. This is the two parameter, four quadrant inverse tangent, which returns a valid theta for all real input pairs. The $/ ,$ is deliberate, reminding us there are two separate parameters, and which is which.

So now we're assured $a = r \cos \theta$ and $b = r \sin \theta$ so

$a \cos x + b \sin x = r \cos \theta \cos x + r \sin \theta \sin x = r \cos \left(x - \theta\right)$

$a \cos x + b \sin x = \sqrt{{a}^{2} + {b}^{2}} \cos \left(x - \textrm{\arctan 2} \left(b / , a\right)\right)$