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(x -text{arctan2}( b //, a) )

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(alpha + beta ) = sin alpha cos beta + cos alpha sin beta

cos(alpha - beta) = 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(x - theta) = 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(r, theta) to rectangular coordinates, here (a,b). So our task is to turn (a,b) 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 = (r cos theta)^2 + (r sin theta)^2 = r^2(cos^2 theta + sin^2 theta) = r^2

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

sin theta = b/r

cos theta = a/r

tan theta = b/a

theta = text{arctan2}( b //, a)

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(x - theta)

a cos x + b sin x = sqrt{a^2 + b^2} cos(x -text{arctan2}( b //, a) )