M5.3.8 Chapter 8

Combining sin and cos

What do I get when I add a sine wave and a cosine wave?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

  • Write 3 sin x + 4 cos x as 5 sin(x + α)
  • Find the largest value of 3 sin x + 4 cos x

Waves in nature often add together: two sounds, two tides, two light beams. If a sine wave and a cosine wave have the same period, their sum is again a single wave of the same period. We want to write it in harmonic form, a single sine R sin(x + α), because then its greatest value, its shape and its solutions are easy to read.

A graph with the x axis named x (radians) from 0 to 2π and a y axis from −6 to 6 named y. A dashed wave named 3 sin x, a second dashed wave named 4 cos x, and a solid wave named sum that peaks at 5 at x = 0.644. A dot with guide lines marks the peak.0π/2π3π/22π−6−4−20246x (radians)y3 sin x4 cos xsum
The two dashed waves, 3 sin x and 4 cos x, add up to the solid wave. It is a sine wave of the same period, with a peak of 5.

Suppose we want a sin x + b cos x ≡ R sin(x + α), where R is positive. Expand the right side with sin(A + B) = sin A cos B + cos A sin B. We get R sin x cos α + R cos x sin α. This is (R cos α) sin x + (R sin α) cos x.

Both sides are equal for every x, so the numbers in front of sin x agree, and so do those in front of cos x. So R cos α = a and R sin α = b. Square and add: R²cos²α + R²sin²α = a² + b², so R² = a² + b². Divide: (R sin α)/(R cos α) = b/a, so tan α = b/a.

A right angled triangle with two sides labelled 3 and 4 and the hypotenuse labelled R. The angle α is marked opposite the side 4.34Rα
R cos α = a and R sin α = b, so a and b are the two shorter sides of a right angled triangle with hypotenuse R. Here a = 3 and b = 4.

The method is: find R = √(a² + b²), then find α from R cos α = a and R sin α = b. When a and b are both positive, α is acute and tan α = b/a gives it directly. Always keep R positive. Always check the signs of cos α and sin α, because tan α = b/a alone cannot tell the quadrant.

Worked example

Write 3 sin x + 4 cos x in the form R sin(x + α), with R > 0 and α acute, and give α in radians to 3 decimal places.

  1. Match 3 sin x + 4 cos x with R sin(x + α) = R cos α sin x + R sin α cos x.
  2. So R cos α = 3 and R sin α = 4.
  3. Square and add: R² = 3² + 4² = 25.
  4. Since R is positive, R = 5.
  5. Divide: tan α = 4/3. Both R cos α and R sin α are positive, so α is acute.
  6. In radian mode, α = tan⁻¹(4/3) = 0.9273, which is 0.927 to 3 decimal places.
  7. So 3 sin x + 4 cos x = 5 sin(x + 0.927).
  8. Check at x = 0: the left side is 4. The right side is 5 sin 0.9273 = 5 × 0.8 = 4. They agree.

Answer: R = 5 and α = 0.927

The greatest and least values come straight from the form. sin(x + α) lies between −1 and 1. So R sin(x + α) lies between −R and R. The greatest value of a sin x + b cos x is R = √(a² + b²), and the least is −R. For 3 sin x + 4 cos x these are 5 and −5. The greatest value is reached when x + α = π/2.

So the greatest value is 5, reached when x + 0.9273 = π/2. That gives x = π/2 − 0.9273 = 0.6435, which agrees with the peak in the first graph. Note that the greatest value is not 3 + 4 = 7. Adding the amplitudes would need both waves to peak at once, and they do not.

When b is negative, or a is negative, take care. R cos α = a and R sin α = b still hold. The signs of a and b tell the quadrant. For −3 sin x + 4 cos x, R cos α = −3 is negative and R sin α = 4 is positive. So α is in the second quadrant, not the fourth where the calculator puts tan⁻¹(−4/3).

A circle with centre O and axes named x and y. A point P in the second quadrant is on a ray from O with an arc from the positive x axis labelled α. Dashed lines from P run to the axes and are labelled cos α and sin α.xycos αsin ααPO
For −3 sin x + 4 cos x, cos α = −3/5 and sin α = 4/5. This point is in the second quadrant, so α = 2.214, not −0.927.

A simpler way for a negative b is to use R sin(x − α) with α acute. Then R sin(x − α) = R cos α sin x − R sin α cos x. So R cos α = a and R sin α = −b, and both are positive when a > 0 and b < 0. The next example does this.

Worked example

Write 8 sin x − 15 cos x in the form R sin(x − α), with R > 0 and α acute. Give α in radians to 3 decimal places.

  1. Expand R sin(x − α) = R cos α sin x − R sin α cos x. Match with 8 sin x − 15 cos x.
  2. So R cos α = 8 and R sin α = 15.
  3. Square and add: R² = 8² + 15² = 64 + 225 = 289.
  4. So R = 17.
  5. tan α = 15/8, and both R cos α and R sin α are positive, so α is acute.
  6. In radian mode, α = tan⁻¹(15/8) = 1.0808, which is 1.081.
  7. So 8 sin x − 15 cos x = 17 sin(x − 1.081).

Answer: R = 17 and α = 1.081

A right angled triangle with two sides labelled 8 and 15 and the hypotenuse labelled R. The angle α is marked opposite the side 15.158Rα
For 8 sin x − 15 cos x, the sides are 8 and 15, and R = 17. The angle α has tan α = 15/8.

Now equations. To solve a sin x + b cos x = c, write the left side as R sin(x + α). Then solve sin(x + α) = c/R. This needs |c| ≤ R, because a sine is never more than 1. If |c| is more than R, there are no solutions. Then change the interval: if 0 ≤ x ≤ 2π, then x + α lies between α and 2π + α.

Worked example

Solve 3 sin x + 4 cos x = 2 for 0 ≤ x ≤ 2π. Give the answers to 3 decimal places.

  1. We know 3 sin x + 4 cos x = 5 sin(x + 0.9273). So the equation is 5 sin(x + 0.9273) = 2.
  2. Divide by 5: sin(x + 0.9273) = 0.4.
  3. This is possible, since 0.4 is between −1 and 1.
  4. Let θ = x + 0.9273. Then 0 ≤ x ≤ 2π gives 0.9273 ≤ θ ≤ 2π + 0.9273 = 7.2105.
  5. sin⁻¹ 0.4 = 0.4115. In the second quadrant θ = π − 0.4115 = 2.7301. Adding 2π to 0.4115 gives 6.6947.
  6. The others are outside: 0.4115 is less than 0.9273, and 2.7301 + 2π = 9.0133 is more than 7.2105. So θ = 2.7301 or θ = 6.6947.
  7. Subtract 0.9273 from each. First, x = 2.7301 − 0.9273 = 1.8028.
  8. Second, x = 6.6947 − 0.9273 = 5.7674.
  9. To 3 decimal places, x = 1.803 or x = 5.767.
  10. Check x = 1.803: 3 sin 1.803 + 4 cos 1.803 = 3 × 0.9732 + 4 × (−0.2301) = 2.919 − 0.920 = 1.999, close to 2.

Answer: x = 1.803 or x = 5.767

A graph with the x axis named x (radians) from 0 to 2π and a y axis from −6 to 6 named y. A wave named f(x), which is 3 sin x + 4 cos x, crosses a dashed line at height 2 at two dots, at x = 1.803 and x = 5.767.0π/2π3π/22π−6−4−20246x (radians)yf(x)
The wave y = 3 sin x + 4 cos x (called f(x) here) cuts the line y = 2 twice between 0 and 2π.

Worked example

Write √3 sin x + cos x in the form R sin(x + α) with α in radians as a multiple of π. Hence solve √3 sin x + cos x = 1 for 0 ≤ x ≤ 2π. Give exact answers.

  1. Match with R cos α sin x + R sin α cos x. So R cos α = √3 and R sin α = 1.
  2. R² = 3 + 1 = 4, so R = 2.
  3. tan α = 1/√3, and both are positive, so α is acute. tan 30° = 1/√3, so α = π/6.
  4. So √3 sin x + cos x = 2 sin(x + π/6).
  5. The equation becomes 2 sin(x + π/6) = 1, so sin(x + π/6) = 1/2.
  6. Let θ = x + π/6. Then 0 ≤ x ≤ 2π gives π/6 ≤ θ ≤ 2π + π/6 = 13π/6.
  7. sin θ = 1/2 gives θ = π/6, 5π/6 and 13π/6 in this interval. All three are inside, including both ends.
  8. Subtract π/6: x = 0, x = 5π/6 − π/6 = 4π/6 = 2π/3, and x = 13π/6 − π/6 = 2π.

Answer: x = 0, 2π/3 or 2π

A graph with the x axis named x (radians) from 0 to 2π and a y axis from −3 to 3 named y. A wave named f(x), which is √3 sin x + cos x, has a peak of 2. A dashed line at height 1 meets it at three dots, at x = 0, 2π/3 and 2π.02π/34π/32π−202x (radians)yf(x)
The wave y = √3 sin x + cos x has greatest value 2. The line y = 1 meets it at x = 0, 2π/3 and 2π, including both ends of the interval.

The same idea works for other forms. a sin x + b cos x can also be written R cos(x − β), because cos(x − β) = cos x cos β + sin x sin β. Then R cos β = b and R sin β = a. The cosine form is neat when the question asks for R cos(x ± α). Whichever form is asked for, R is the same and equals √(a² + b²).

Worked example

Write 12 cos x + 35 sin x in the form R cos(x − α), with R > 0 and α acute. Give α in radians to 3 decimal places.

  1. Expand R cos(x − α) = R cos x cos α + R sin x sin α. Match with 12 cos x + 35 sin x.
  2. So R cos α = 12 and R sin α = 35.
  3. Square and add: R² = 12² + 35² = 144 + 1225 = 1369.
  4. So R = 37.
  5. tan α = 35/12, and both R cos α and R sin α are positive, so α is acute.
  6. In radian mode, α = tan⁻¹(35/12) = 1.240499..., which is 1.240 to 3 decimal places.
  7. So 12 cos x + 35 sin x = 37 cos(x − 1.240).

Answer: R = 37 and α = 1.240

See it three ways

With things

Two people push a swing, one at the back and one at the side, at the same rhythm. The swing moves as if one person were pushing in the in-between direction with a combined strength. That combined strength is R, and the direction is α.

As a picture

A right angled triangle with two sides labelled 3 and 4 and the hypotenuse labelled R. The angle α is marked opposite the side 4.34Rα

In words

The two coefficients are the sides of a right angled triangle. R is its hypotenuse and α is its angle.

In symbols

a sin x + b cos x = R sin(x + α), R = √(a² + b²), tan α = b/a, R cos α = a, R sin α = b.

Try it

Check the greatest value

You need: a calculator, a pencil.

  1. Work out 3 sin x + 4 cos x for x = 0, 0.2, 0.4, 0.6, 0.8 and 1.0 radians. Use radian mode.
  2. Look for the greatest value in your list and note which x gives it.
  3. Is any value bigger than 5?
  4. Compare with 5 sin(x + 0.927) at the same x values.

What you will see: The values rise to 5.00 near x = 0.6 and then fall. None is bigger than 5. The values of 5 sin(x + 0.927) match the first list.

If you cannot try it, this is what happens.
A table with the heads x and 3 sin x + 4 cos x. The rows read 0: 4.00. 0.2: 4.52. 0.4: 4.85. 0.6: 5.00. 0.8: 4.94. 1.0: 4.69.x3 sin x + 4 cos x04.000.24.520.44.850.65.000.84.941.04.69

A wrong idea many people have

The greatest value of 3 sin x + 4 cos x is 3 + 4 = 7, because each part is at most as big as its number.

Why it feels right: Each wave reaches its own greatest value, and adding greatest values seems to give the greatest total.

The test that breaks it: At x = π/2, sin x = 1 but cos x = 0, so the total is 3. At x = 0, sin x = 0 and cos x = 1, so the total is 4. The two waves never peak together, so 7 is never reached.

What is true: The greatest value is R = √(3² + 4²) = 5. In general it is √(a² + b²), which is less than a + b whenever both a and b are positive.

A wrong idea many people have

For −3 sin x + 4 cos x, tan α = −4/3, so α = tan⁻¹(−4/3) = −0.927.

Why it feels right: The calculator gives an answer for tan⁻¹ of any number, and the algebra for tan α = b/a is correct.

The test that breaks it: Put α = −0.927 back: R cos α = 5 × 0.6 = 3 and R sin α = 5 × (−0.8) = −4. We needed −3 and 4. Both signs are wrong.

What is true: tan α = b/a gives the angle but loses the quadrant. Use R cos α = a and R sin α = b. Here cos α = −3/5 and sin α = 4/5, which puts α in the second quadrant: α = π − 0.927 = 2.214.

A wrong idea many people have

To solve 3 sin x + 4 cos x = 2 for 0 ≤ x ≤ 2π, solve sin(x + 0.927) = 0.4 and use 0 ≤ x + 0.927 ≤ 2π.

Why it feels right: The interval for x is 0 to 2π, and the bracket looks like a plain x.

The test that breaks it: Take x = 5.767, which is a solution. Then x + 0.927 = 6.694, which is more than 2π = 6.283. A search only up to 2π would miss it.

What is true: The bracket x + α runs from α to 2π + α. Solve for x + α in that whole interval, then subtract α from each answer.

Key words

harmonic form
the form R sin(x + α), which is a single wave equal to a sin x + b cos x.

Back to your guess

The answer is B: The sum of 3 sin x and 4 cos x is a wave with a greatest value of 5.

The sum is a wave with greatest value 5. The two parts do not reach their tops at the same time: 3 sin x peaks at π/2 and 4 cos x peaks at 0. So the total never reaches 3 + 4 = 7. It is a single sine wave with amplitude √(3² + 4²) = 5, shifted sideways.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. Write 7 sin x + 24 cos x as R sin(x + α). What is R?

    Tap your answer.
    1. Not this one. You added 7 and 24. R is the hypotenuse of a right angled triangle with sides 7 and 24, so R = √(49 + 576). Go to M5.3.8. Try another.

    2. Not this one. You subtracted: 24 − 7 = 17. R² = 7² + 24², with a plus sign, because R sin α and R cos α are squared and added. Go to M5.3.8. Try another.

    3. Yes, that is right. R² = a² + b² = 7² + 24² = 49 + 576 = 625, so R = 25. The sides 7, 24 and 25 make a right angled triangle.

    4. Not this one. You multiplied 7 and 24. R comes from the squares: R² = 49 + 576 = 625. Go to M5.3.8. Try another.

    See the answer

    25

    R² = a² + b² = 7² + 24² = 49 + 576 = 625, so R = 25. The sides 7, 24 and 25 make a right angled triangle.

    • If you chose A: You added 7 and 24. R is the hypotenuse of a right angled triangle with sides 7 and 24, so R = √(49 + 576). Go to M5.3.8.
    • If you chose B: You subtracted: 24 − 7 = 17. R² = 7² + 24², with a plus sign, because R sin α and R cos α are squared and added. Go to M5.3.8.
    • If you chose D: You multiplied 7 and 24. R comes from the squares: R² = 49 + 576 = 625. Go to M5.3.8.
  2. What is the greatest value of 9 sin x + 12 cos x?

    Tap your answer.
    1. Not this one. That is 9 + 12. The two waves do not peak at the same time, so the sum of the numbers is too big. Go to M5.3.8. Try another.

    2. Not this one. That is the larger coefficient. The two waves together reach more than either does alone. Go to M5.3.8. Try another.

    3. Not this one. That is 12 − 9. The greatest value is √(a² + b²), not the difference. Go to M5.3.8. Try another.

    4. Yes, that is right. The greatest value is R = √(9² + 12²) = √(81 + 144) = √225 = 15.

    See the answer

    15

    The greatest value is R = √(9² + 12²) = √(81 + 144) = √225 = 15.

    • If you chose A: That is 9 + 12. The two waves do not peak at the same time, so the sum of the numbers is too big. Go to M5.3.8.
    • If you chose B: That is the larger coefficient. The two waves together reach more than either does alone. Go to M5.3.8.
    • If you chose C: That is 12 − 9. The greatest value is √(a² + b²), not the difference. Go to M5.3.8.
  3. Write −5 sin x + 12 cos x as R sin(x + α). In which quadrant is α?

    Tap your answer.
    1. Yes, that is right. R cos α = −5 is negative and R sin α = 12 is positive. cos is negative and sin is positive in the second quadrant. A calculator would give tan⁻¹(−12/5) = −1.176, in the fourth quadrant, so the quadrant must be corrected.

    2. Not this one. In the first quadrant both R cos α and R sin α are positive. Here R cos α = −5 is negative. Go to M5.3.8. Try another.

    3. Not this one. In the third quadrant both are negative. Here R sin α = 12 is positive. Go to M5.3.8. Try another.

    4. Not this one. In the fourth quadrant cos is positive and sin is negative, which is the other way round. Here R cos α = −5 and R sin α = 12. Go to M5.3.8. Try another.

    See the answer

    The second quadrant

    R cos α = −5 is negative and R sin α = 12 is positive. cos is negative and sin is positive in the second quadrant. A calculator would give tan⁻¹(−12/5) = −1.176, in the fourth quadrant, so the quadrant must be corrected.

    • If you chose B: In the first quadrant both R cos α and R sin α are positive. Here R cos α = −5 is negative. Go to M5.3.8.
    • If you chose C: In the third quadrant both are negative. Here R sin α = 12 is positive. Go to M5.3.8.
    • If you chose D: In the fourth quadrant cos is positive and sin is negative, which is the other way round. Here R cos α = −5 and R sin α = 12. Go to M5.3.8.
  4. A learner writes 3 sin x + 4 cos x = 7 sin(x + α). What is wrong?

    Tap your answer.
    1. Not this one. R does not come from a product. R² = a² + b² comes from squaring and adding R cos α = a and R sin α = b. Go to M5.3.8. Try another.

    2. Yes, that is right. R² = 3² + 4² = 25, so R = 5. The wave is never above 5. The value 7 would need both waves to peak together, but they peak at different values of x.

    3. Not this one. Both forms exist, but R is the same in either. The error is the value 7. Go to M5.3.8. Try another.

    See the answer

    R is √(3² + 4²) = 5, not 3 + 4.

    R² = 3² + 4² = 25, so R = 5. The wave is never above 5. The value 7 would need both waves to peak together, but they peak at different values of x.

    • If you chose A: R does not come from a product. R² = a² + b² comes from squaring and adding R cos α = a and R sin α = b. Go to M5.3.8.
    • If you chose C: Both forms exist, but R is the same in either. The error is the value 7. Go to M5.3.8.
  5. How many solutions does 3 sin x + 4 cos x = 6 have for 0 ≤ x ≤ 2π?

    Tap your answer.
    1. Not this one. A line at height 6 would cut the wave twice if its peak were above 6. But the greatest value is 5. Go to M5.3.8. Try another.

    2. Not this one. One solution would need the line to touch the peak exactly, at height 5. Here the line is at 6, above the peak. Go to M5.3.8. Try another.

    3. Not this one. There are only two solutions in each cycle even when a solution exists, and here the line is above the peak. Go to M5.3.8. Try another.

    4. Yes, that is right. The greatest value of 3 sin x + 4 cos x is R = 5. A wave that never rises above 5 cannot equal 6. So there are no solutions.

    See the answer

    0

    The greatest value of 3 sin x + 4 cos x is R = 5. A wave that never rises above 5 cannot equal 6. So there are no solutions.

    • If you chose A: A line at height 6 would cut the wave twice if its peak were above 6. But the greatest value is 5. Go to M5.3.8.
    • If you chose B: One solution would need the line to touch the peak exactly, at height 5. Here the line is at 6, above the peak. Go to M5.3.8.
    • If you chose C: There are only two solutions in each cycle even when a solution exists, and here the line is above the peak. Go to M5.3.8.
  6. From an earlier chapter

    Which is the correct expansion of cos(A + B)?

    Tap your answer.
    1. Yes, that is right. cos(A + B) = cos A cos B − sin A sin B. Test with A = B = 90°: cos 180° = −1, and cos 90° cos 90° − sin 90° sin 90° = 0 − 1 = −1.

    2. Not this one. cos does not distribute over a sum. At A = B = 90° it gives 0 + 0 = 0, but cos 180° = −1. Go to M5.3.7. Try another.

    3. Not this one. That is cos(A − B). For a sum, the sign in the middle is a minus. Go to M5.3.7. Try another.

    4. Not this one. That is sin(A + B). The cosine of a sum has products of two cosines and of two sines. Go to M5.3.7. Try another.

    See the answer

    cos A cos B − sin A sin B

    cos(A + B) = cos A cos B − sin A sin B. Test with A = B = 90°: cos 180° = −1, and cos 90° cos 90° − sin 90° sin 90° = 0 − 1 = −1.

    • If you chose B: cos does not distribute over a sum. At A = B = 90° it gives 0 + 0 = 0, but cos 180° = −1. Go to M5.3.7.
    • If you chose C: That is cos(A − B). For a sum, the sign in the middle is a minus. Go to M5.3.7.
    • If you chose D: That is sin(A + B). The cosine of a sum has products of two cosines and of two sines. Go to M5.3.7.
  7. Write 5 sin x + 12 cos x in the form R sin(x + α), with R > 0 and α acute. Give α in radians to 3 decimal places.

    See the answer

    R = 13 and α = 1.176

    R cos α = 5 and R sin α = 12. So R² = 25 + 144 = 169 and R = 13. tan α = 12/5, and both are positive, so α is acute: α = tan⁻¹(12/5) = 1.17601, which is 1.176. So 5 sin x + 12 cos x = 13 sin(x + 1.176).

  8. Solve √3 sin x − cos x = 1 for 0° ≤ x ≤ 360°.

    See the answer

    x = 60° or x = 180°

    Write √3 sin x − cos x as R sin(x − α): R cos α = √3 and R sin α = 1, so R = 2 and α = 30°. The equation is 2 sin(x − 30°) = 1, so sin(x − 30°) = 1/2. The angle x − 30° runs from −30° to 330°. In this range sin θ = 1/2 gives θ = 30° and 150°. So x = 60° and x = 180°.

  9. The displacement of a mass on a spring is x = 9 sin t + 40 cos t centimetres, t seconds after the start. Find the greatest displacement, and the first time it is reached. Give the time to 3 decimal places.

    See the answer

    41 cm at t = 0.221 s

    x = R sin(t + α) with R cos α = 9 and R sin α = 40. So R = √(81 + 1600) = 41, and α = tan⁻¹(40/9) = 1.3495. The greatest displacement is R = 41 cm. It is reached when t + α = π/2, so t = π/2 − 1.3495 = 0.2213. To 3 decimal places, t = 0.221.

  10. Solve 4 sin x + 3 cos x = 2 for 0° ≤ x ≤ 360°. Give the answers to 1 decimal place.

    See the answer

    x = 119.6° or x = 346.7°

    R cos α = 4 and R sin α = 3, so R = 5 and α = tan⁻¹(3/4) = 36.87°. The equation is 5 sin(x + 36.87°) = 2, so sin(x + 36.87°) = 0.4. The angle θ = x + 36.87° runs from 36.87° to 396.87°. sin⁻¹ 0.4 = 23.58°, so θ = 180° − 23.58° = 156.42° or θ = 360° + 23.58° = 383.58°. Both are in the interval. Then x = 156.42° − 36.87° = 119.55° or 119.6°, and x = 383.58° − 36.87° = 346.71° or 346.7°.

  11. Find the greatest value of 4 + 5 sin x + 12 cos x.

    See the answer

    17

    The part 5 sin x + 12 cos x has greatest value R = √(25 + 144) = 13. Adding 4 lifts the whole wave, so the greatest value is 4 + 13 = 17.

  12. Find the greatest value of 20/(7 + 3 sin x + 4 cos x).

    See the answer

    10

    The bottom is 7 + 3 sin x + 4 cos x. Its least value is 7 − 5 = 2, because 3 sin x + 4 cos x has least value −5. The fraction is greatest when the bottom is least, so the greatest value is 20 ÷ 2 = 10.

Keep it

Copy this into your exercise book.

a sin x + b cos x = R sin(x + α). R = √(a² + b²). R cos α = a, R sin α = b. Greatest value R. Solve: sin(x + α) = c/R in the interval shifted by α. Needs |c| ≤ R.

Draw: A right angled triangle with sides a and b, hypotenuse R and angle α.

Reading with a child? A short page for the adult: what this chapter teaches and three questions to ask.

No internet tomorrow? Save the whole book as one file (903 KB). It opens on any phone.