Harmonic Form

Type a and b (a fraction or a root such as √3 is fine) and pick the form the question asks for. The triangle matches R cos α and R sin α to the coefficients, the graph adds the two dashed waves into one, and typing c solves a sin x + b cos x = c in an interval.

Amplitude R=a2+b2R=\sqrt{a^{2}+b^{2}}
As a sine asin⁡x+bcos⁡x=Rsin⁡(x+α)tan⁡α=ba\begin{aligned}&a\sin x+b\cos x=R\sin(x+\alpha)\\&\tan\alpha=\frac{b}{a}\end{aligned}
As a cosine asin⁡x+bcos⁡x=Rcos⁡(x−α)tan⁡α=ab\begin{aligned}&a\sin x+b\cos x=R\cos(x-\alpha)\\&\tan\alpha=\frac{a}{b}\end{aligned}
Loading interactive simulation...

Lesson

The theory — Harmonic Form

The harmonic form writes a sin x + b cos x as a single wave, R sin(x ± α) or R cos(x ± α), with R > 0.

Where the formula comes from

  1. Expand the target form with the compound-angle formula, so it too reads as a multiple of sin x plus a multiple of cos x.
    Rsin⁡(x+α)=Rcos⁡α sin⁡x+Rsin⁡α cos⁡xR\sin(x+\alpha)=R\cos\alpha\,\sin x+R\sin\alpha\,\cos x
  2. Match the coefficients. The coefficient of sin x and the coefficient of cos x give R cos α and R sin α, with the signs the form puts on them.
    Rcos⁡α=a,Rsin⁡α=bR\cos\alpha=a,\qquad R\sin\alpha=b
  3. Square and add for R, divide for α. cos²α + sin²α = 1 gives R; the quotient gives tan α, and the signs of R cos α and R sin α say which quadrant α is in.
    R2(cos⁡2α+sin⁡2α)=a2+b2 ⇒ R=a2+b2,tan⁡α=baR^{2}(\cos^{2}\alpha+\sin^{2}\alpha)=a^{2}+b^{2}\ \Rightarrow\ R=\sqrt{a^{2}+b^{2}},\qquad\tan\alpha=\frac{b}{a}
  4. Read the wave. A sine or cosine lies between −1 and 1, so the expression lies between −R and R, reaching R where the bracket is 90° (sine) or 0° (cosine).
    −R≤asin⁡x+bcos⁡x≤R-R\le a\sin x+b\cos x\le R
  5. Solve a sin x + b cos x = c as an equation in the bracket. In the form R sin(x + α) it is sin(x + α) = c/R, with the bracket's interval shifted by α; the other forms work the same way with their own function and sign. When |c| > R there is no solution.
    asin⁡x+bcos⁡x=c ⇒ sin⁡(x+α)=cRa\sin x+b\cos x=c\ \Rightarrow\ \sin(x+\alpha)=\frac{c}{R}

Problems solved in full

  1. The standard form, R sin(x + α) 2 steps

    Write 3 sin x + 4 cos x in the form R sin(x + α), with R > 0 and 0° < α < 90°.

    Open this problem in the tool

    1. Expand the form and match the coefficients of sin x and cos x:

      Rsin⁡(x+α)=Rcos⁡α sin⁡x+Rsin⁡α cos⁡x ⇒ Rcos⁡α=3,Rsin⁡α=4R\sin(x+\alpha)=R\cos\alpha\,\sin x+R\sin\alpha\,\cos x\ \Rightarrow\ R\cos\alpha=3,\quad R\sin\alpha=4
    2. Square and add, then divide:

      R=32+42=5,tan⁡α=43,α=53.13∘R=\sqrt{3^{2}+4^{2}}=5,\qquad\tan\alpha=\frac{4}{3},\quad\alpha=53{.}13^{\circ}

    Answer

    3 sin x + 4 cos x = 5 sin(x + 53.13°).

    3sin⁡x+4cos⁡x=5sin⁡(x+53.13∘)3\sin x+4\cos x=5\sin(x+53{.}13^{\circ})
  2. An exact form with a root, R cos(x − α) 2 steps

    Write sin x + √3 cos x in the form R cos(x − α), giving R and α exactly.

    Open this problem in the tool

    Show solution
    1. Expand R cos(x − α) and match:

      Rcos⁡(x−α)=Rcos⁡α cos⁡x+Rsin⁡α sin⁡x ⇒ Rcos⁡α=3,Rsin⁡α=1R\cos(x-\alpha)=R\cos\alpha\,\cos x+R\sin\alpha\,\sin x\ \Rightarrow\ R\cos\alpha=\sqrt{3},\quad R\sin\alpha=1
    2. Square and add, then divide. tan α = 1/√3 is a special value:

      R=3+1=2,tan⁡α=13,α=30∘R=\sqrt{3+1}=2,\qquad\tan\alpha=\frac{1}{\sqrt{3}},\quad\alpha=30^{\circ}

    Answer

    sin x + √3 cos x = 2 cos(x − 30°).

    sin⁡x+3cos⁡x=2cos⁡(x−30∘)\sin x+\sqrt{3}\cos x=2\cos(x-30^{\circ})
  3. A minus sign, R sin(x − α) 2 steps

    Write 5 sin x − 12 cos x in the form R sin(x − α), with R > 0 and 0° < α < 90°.

    Open this problem in the tool

    Show solution
    1. The minus in the form takes the minus in the expression, so R sin α comes out positive:

      Rsin⁡(x−α)=Rcos⁡α sin⁡x−Rsin⁡α cos⁡x ⇒ Rcos⁡α=5,Rsin⁡α=12R\sin(x-\alpha)=R\cos\alpha\,\sin x-R\sin\alpha\,\cos x\ \Rightarrow\ R\cos\alpha=5,\quad R\sin\alpha=12
    2. Square and add, then divide:

      R=25+144=13,tan⁡α=125,α=67.38∘R=\sqrt{25+144}=13,\qquad\tan\alpha=\frac{12}{5},\quad\alpha=67{.}38^{\circ}

    Answer

    5 sin x − 12 cos x = 13 sin(x − 67.38°). Choosing R sin(x + α) would have forced α = −67.38°.

    5sin⁡x−12cos⁡x=13sin⁡(x−67.38∘)5\sin x-12\cos x=13\sin(x-67{.}38^{\circ})
  4. Maximum, minimum and where they fall 2 steps

    Find the maximum and minimum of 3 sin x + 4 cos x for 0° ≤ x < 360°, where each occurs, and hence the greatest value of 1/(10 + 3 sin x + 4 cos x).

    Open this problem in the tool

    Show solution
    1. From the first problem, 3 sin x + 4 cos x = 5 sin(x + 53.13°), and a sine runs from −1 to 1:

      sin⁡(x+53.13∘)=1: x=36.87∘,sin⁡(x+53.13∘)=−1: x=216.87∘\sin(x+53{.}13^{\circ})=1:\ x=36{.}87^{\circ},\qquad\sin(x+53{.}13^{\circ})=-1:\ x=216{.}87^{\circ}
    2. The fraction is greatest where its denominator is least, at the minimum of the wave:

      110+3sin⁡x+4cos⁡x≤110−5=15\frac{1}{10+3\sin x+4\cos x}\le\frac{1}{10-5}=\frac{1}{5}

    Answer

    Maximum 5 at x = 36.87°, minimum −5 at x = 216.87°; the greatest value of the fraction is 1/5, at x = 216.87°.

    max⁡=5,min⁡=−5,max⁡110+3sin⁡x+4cos⁡x=15\max=5,\quad\min=-5,\quad\max\frac{1}{10+3\sin x+4\cos x}=\frac{1}{5}
  5. Solving a sin x + b cos x = c 3 steps

    Solve 3 sin x + 4 cos x = 2 for 0° ≤ x < 360°.

    Open this problem in the tool

    Show solution
    1. Write the left side in harmonic form and divide by R:

      5sin⁡(x+53.13∘)=2 ⇒ sin⁡(x+53.13∘)=0.45\sin(x+53{.}13^{\circ})=2\ \Rightarrow\ \sin(x+53{.}13^{\circ})=0{.}4
    2. As x runs over the interval, the bracket x + 53.13° runs from 53.13° to 413.13°. The principal value and its partner in that range:

      x+53.13∘=180∘−23.58∘=156.42∘,x+53.13∘=360∘+23.58∘=383.58∘x+53{.}13^{\circ}=180^{\circ}-23{.}58^{\circ}=156{.}42^{\circ},\qquad x+53{.}13^{\circ}=360^{\circ}+23{.}58^{\circ}=383{.}58^{\circ}
    3. Subtract 53.13° from each:

      x=103.29∘,x=330.45∘x=103{.}29^{\circ},\qquad x=330{.}45^{\circ}

    Answer

    x = 103.29° or x = 330.45° (to 2 decimal places).

    x=103.29∘, 330.45∘x=103{.}29^{\circ},\ 330{.}45^{\circ}
  6. When there is no solution 2 steps

    Show that sin x + cos x = 2 has no solution.

    Open this problem in the tool

    Show solution
    1. Write the left side in harmonic form:

      sin⁡x+cos⁡x=2sin⁡(x+45∘)\sin x+\cos x=\sqrt{2}\sin(x+45^{\circ})
    2. A sine never exceeds 1, so the left side never exceeds √2:

      −2≤2sin⁡(x+45∘)≤2≈1.4142<2-\sqrt{2}\le\sqrt{2}\sin(x+45^{\circ})\le\sqrt{2}\approx1{.}4142<2

    Answer

    sin x + cos x ≤ √2 ≈ 1.4142 < 2 for every x, so the equation has no solution.

    sin⁡x+cos⁡x≤2<2\sin x+\cos x\le\sqrt{2}<2
  7. A model: the deepest water in a harbour 2 steps

    The depth of water in a harbour is D = 6 + 3 sin(30t)° + 4 cos(30t)° metres, t hours after midnight. Find the greatest depth and the first time after midnight it occurs.

    Open this problem in the tool

    Show solution
    1. Put x = 30t. The varying part is the familiar wave:

      D=6+5sin⁡(x+53.13∘),x=30tD=6+5\sin(x+53{.}13^{\circ}),\qquad x=30t
    2. It is largest, 5, when x = 36.87°, so:

      Dmax⁡=6+5=11,30t=36.87∘ ⇒ t=1.229D_{\max}=6+5=11,\qquad 30t=36{.}87^{\circ}\ \Rightarrow\ t=1{.}229

    Answer

    The greatest depth is 11 m, first at about 1.23 hours, 1:14 a.m.

    Dmax⁡=11 m,t≈1.23 hD_{\max}=11\ \mathrm{m},\qquad t\approx1{.}23\ \mathrm{h}

Supplementary problems, answers only

  1. Write 2 cos x − 3 sin x in the form R cos(x + α), with R > 0 and 0° < α < 90°.

    Show answer

    √13 cos(x + 56.31°)

    2cos⁡x−3sin⁡x=13cos⁡(x+56.31∘)2\cos x-3\sin x=\sqrt{13}\cos(x+56{.}31^{\circ})
  2. Write 7 cos x − 24 sin x in the form R cos(x + α), and give its maximum value.

    Show answer

    25 cos(x + 73.74°), maximum 25

    7cos⁡x−24sin⁡x=25cos⁡(x+73.74∘),max⁡=257\cos x-24\sin x=25\cos(x+73{.}74^{\circ}),\quad\max=25
  3. Solve √3 sin x − cos x = 1 for 0° ≤ x < 360°.

    Show answer

    x = 60° or x = 180°

    x=60∘, 180∘x=60^{\circ},\ 180^{\circ}
  4. Write 2 sin θ − 1.5 cos θ in the form R sin(θ − α), with α in radians to 3 decimal places.

    Show answer

    2.5 sin(θ − 0.644)

    2sin⁡θ−1.5cos⁡θ=2.5sin⁡(θ−0.644)2\sin\theta-1{.}5\cos\theta=2{.}5\sin(\theta-0{.}644)
  5. Find the least value of 5 sin x − 12 cos x + 20.

    Show answer

    7

    5sin⁡x−12cos⁡x+20≥20−13=75\sin x-12\cos x+20\ge20-13=7
  6. Solve 2 cos x − 3 sin x = 1 for 0° ≤ x < 360°.

    Show answer

    x = 17.59° or x = 229.79°

    x=17.59∘, 229.79∘x=17{.}59^{\circ},\ 229{.}79^{\circ}

3 sin x + 4 cos x peaks at 5, not 7

Press 3 sin x + 4 cos x. The dashed waves reach 3 and 4, but a quarter-turn apart: where sin x is at its top, cos x is passing through zero. Their sum is a single wave, and its height is 5, the hypotenuse of a 3-4-5 triangle. The reason is that a sin x + b cos x is the dot product of (a, b) with (sin x, cos x), a unit vector that turns as x does. A dot product with a unit vector is largest when the two point the same way, and then it equals the length of (a, b), √(a² + b²). Here that happens at x = 36.87°, where (sin x, cos x) = (0.6, 0.8), which is (3, 4) scaled down by 5. Two waves of the same period always add to one wave of that period, which is why R and α exist at all.

The swapped arctangent belongs to the other form

The commonest slip in these questions is tan α = a/b where the form wanted b/a. Press 3 sin x + 4 cos x and switch between R sin(x + α) and R cos(x − α): α moves from 53.13° to 36.87°, and the solid curve does not move at all. Both answers are right, 5 sin(x + 53.13°) and 5 cos(x − 36.87°), because a sine is a cosine a quarter-turn late and 53.13° + 36.87° = 90°. So the swapped arctangent is the correct α for the other form, and the only mistake is answering a question that was not asked. When neither coefficient is zero, their signs fix which forms give an acute α: two when both are positive, one when exactly one is negative, none when both are.

A tide table is R and α, thirty-seven times over

NOAA predicts the tide at The Battery, at the southern tip of Manhattan, by adding 37 cosine curves, its harmonic constituents, each listed as an amplitude and a phase. The largest, M2, the principal lunar semidiurnal tide, has amplitude 0.671 m and turns at 28.984104° an hour, so it repeats every 12.42 hours. The constants come from measured water levels: a month of them covers most of the lunar and solar cycles, and it takes a year to see all 37. An amplitude and a phase is the harmonic form of a sine part plus a cosine part, the step this page does, and it is what lets a constituent be read at a glance: M2 alone lifts the water 0.671 m above its mean and drops it 0.671 m below.

Learning path

Trigonometric identities and equations

References (2)