girgit.org

Trigonometric Functions

Turning sums into products and back

{ "view": [-2.1, 2.1, -0.45, 2.1], "equal": true, "grid": false, "labels": false, "params": {"x": {"min": 0, "max": 3.1416, "value": 2.0, "label": "x", "fmt": "deg", "play": true, "period": 10}, "y": {"min": 0, "max": 3.1416, "value": 0.6, "label": "y", "fmt": "deg"}}, "items": [ {"curve": ["cos(t)", "sin(t)"], "t": [0, 3.1416], "color": "dim"}, {"seg": [[0, 0], ["2.1*cos((x+y)/2)", "2.1*sin((x+y)/2)"]], "color": "dim", "dash": true, "width": 1}, {"seg": [["cos(x)", "sin(x)"], ["cos(x)+cos(y)", "sin(x)+sin(y)"]], "color": "dim", "dash": true, "width": 1.5}, {"seg": [["cos(y)", "sin(y)"], ["cos(x)+cos(y)", "sin(x)+sin(y)"]], "color": "dim", "dash": true, "width": 1.5}, {"seg": [[0, 0], ["cos(x)+cos(y)", 0]], "color": "c", "width": 5}, {"seg": [[0, 0], ["cos(x)+cos(y)", "sin(x)+sin(y)"]], "color": "d", "width": 3.5, "arrow": true}, {"seg": [[0, 0], ["cos(x)", "sin(x)"]], "color": "ink", "width": 2.5, "arrow": true}, {"seg": [[0, 0], ["cos(y)", "sin(y)"]], "color": "ink", "width": 2.5, "arrow": true}, {"text": "cos x + cos y", "at": ["(cos(x)+cos(y))/2", -0.32], "anchor": "middle", "color": "c"}, {"text": "2 cos((x − y)/2)", "at": ["cos(x)+cos(y)", "sin(x)+sin(y)"], "dy": -14, "anchor": "middle", "color": "d"}, {"point": ["cos(x)", "sin(x)"], "label": "P", "drag": {"param": "x", "by": "angle"}}, {"point": ["cos(y)", "sin(y)"], "label": "Q", "drag": {"param": "y", "by": "angle"}} ], "read": ["cos x + cos y = {cos(x)+cos(y)|3}", "2 cos((x + y)/2) cos((x − y)/2) = {2*cos((x+y)/2)*cos((x-y)/2)|3}"] }

The big ideaAdding and subtracting the sum and difference formulas lets you turn a sum of two sines or cosines into a product, and a product back into a sum.

In simple words

Sometimes a problem has two waves added together and you want them multiplied, because multiplied things cancel neatly in fractions. Other times you have them multiplied and want them added, because added things are easier to handle. These eight formulas are the switch between the two.

Where they come from

Write the four sum and difference formulas one under another:

\[ \begin{aligned} \cos(x + y) &= \cos x \cos y - \sin x \sin y \quad &(1) \\ \cos(x - y) &= \cos x \cos y + \sin x \sin y &(2) \\ \sin(x + y) &= \sin x \cos y + \cos x \sin y &(3) \\ \sin(x - y) &= \sin x \cos y - \cos x \sin y &(4) \end{aligned} \]

Add and subtract them in pairs. In each case one product cancels and the other doubles:

  • (1) + (2): \( \cos(x + y) + \cos(x - y) = 2\cos x \cos y \)
  • (1) − (2): \( \cos(x + y) - \cos(x - y) = -2\sin x \sin y \)
  • (3) + (4): \( \sin(x + y) + \sin(x - y) = 2\sin x \cos y \)
  • (3) − (4): \( \sin(x + y) - \sin(x - y) = 2\cos x \sin y \)

Read from right to left, these are the product-to-sum formulas.

{ "view": [-0.2, 6.5, -2.3, 2.3], "aspect": 0.55, "grid": false, "ticks": {"x": "pi/2", "y": 1, "xunit": "pi"}, "params": {"m": {"min": 1, "max": 6, "value": 5, "step": 1, "label": "m", "digits": 0}, "n": {"min": 1, "max": 6, "value": 3, "step": 1, "label": "n", "digits": 0}}, "items": [ {"fn": "sin((m+n)*x)", "color": "dim", "width": 1}, {"fn": "sin((m-n)*x)", "color": "dim", "width": 1}, {"fn": "2*sin(m*x)*cos(n*x)", "color": "d", "width": 5}, {"fn": "sin((m+n)*x)+sin((m-n)*x)", "color": "ink", "width": 1.5, "dash": true} ], "read": ["2 sin {m|0}x cos {n|0}x = sin {m+n|0}x + sin({m-n|0}x)"] }

Try it: add two waves of nearly the same speed and see what the sum looks like.

Sum to product

Now rename the angles. Let \( x + y = \theta \) and \( x - y = \phi \). Adding and subtracting, \( x = \dfrac{\theta + \phi}{2} \) and \( y = \dfrac{\theta - \phi}{2} \). Put these into the four lines above. Since \( \theta \) and \( \phi \) can be any real numbers, we may call them \( x \) and \( y \) again:

Sum to product

  • \( \cos x + \cos y = 2\cos \dfrac{x + y}{2} \cos \dfrac{x - y}{2} \)
  • \( \cos x - \cos y = -2\sin \dfrac{x + y}{2} \sin \dfrac{x - y}{2} \)
  • \( \sin x + \sin y = 2\sin \dfrac{x + y}{2} \cos \dfrac{x - y}{2} \)
  • \( \sin x - \sin y = 2\cos \dfrac{x + y}{2} \sin \dfrac{x - y}{2} \)

Product to sum

  • \( 2\cos x \cos y = \cos(x + y) + \cos(x - y) \)
  • \( -2\sin x \sin y = \cos(x + y) - \cos(x - y) \)
  • \( 2\sin x \cos y = \sin(x + y) + \sin(x - y) \)
  • \( 2\cos x \sin y = \sin(x + y) - \sin(x - y) \)
{ "view": [-1.8, 1.8, -0.4, 1.4], "equal": true, "grid": false, "labels": false, "params": {"x": {"min": 0, "max": 3.1416, "value": 2.2, "label": "x", "fmt": "deg"}, "y": {"min": 0, "max": 3.1416, "value": 0.7, "label": "y", "fmt": "deg"}}, "items": [ {"curve": ["cos(t)", "sin(t)"], "t": [0, 3.1416], "color": "dim"}, {"seg": [[0, 0], ["1.3*cos((x+y)/2)", "1.3*sin((x+y)/2)"]], "color": "dim", "dash": true, "width": 1.5}, {"text": "half-sum line", "at": ["1.3*cos((x+y)/2)", "1.3*sin((x+y)/2)"], "dx": 6, "dy": -4, "color": "dim"}, {"seg": [[0, 0], ["cos(x)", "sin(x)"]], "color": "ink", "width": 2}, {"seg": [[0, 0], ["cos(y)", "sin(y)"]], "color": "ink", "width": 2}, {"seg": [["cos(y)", "sin(y)"], ["cos(x)", "sin(x)"]], "color": "e", "width": 3.5, "arrow": true}, {"seg": [["cos(y)", -0.2], ["cos(x)", -0.2]], "color": "c", "width": 4, "arrow": true}, {"seg": [["cos(x)", "sin(x)"], ["cos(x)", -0.2]], "color": "dim", "dash": true, "width": 1}, {"seg": [["cos(y)", "sin(y)"], ["cos(y)", -0.2]], "color": "dim", "dash": true, "width": 1}, {"text": "cos x − cos y", "at": ["(cos(x)+cos(y))/2", -0.34], "anchor": "middle", "color": "c"}, {"point": ["cos(x)", "sin(x)"], "label": "P", "drag": {"param": "x", "by": "angle"}}, {"point": ["cos(y)", "sin(y)"], "label": "Q", "drag": {"param": "y", "by": "angle"}} ], "read": ["cos x − cos y = {cos(x)-cos(y)|3}", "−2 sin((x + y)/2) sin((x − y)/2) = {-2*sin((x+y)/2)*sin((x-y)/2)|3}"] }

A pattern to remember the sum-to-product list: the first factor always uses the half-sum \( \tfrac{x + y}{2} \), the second the half-difference \( \tfrac{x - y}{2} \). Cos plus cos gives cos cos; sin plus sin gives sin cos; sin minus sin gives cos sin; and cos minus cos gives sin sin with a minus sign in front.

Worked example

  1. \( \cos 75^\circ + \cos 15^\circ = 2\cos 45^\circ \cos 30^\circ = 2 \cdot \tfrac{1}{\sqrt{2}} \cdot \tfrac{\sqrt{3}}{2} = \sqrt{\tfrac{3}{2}} = \tfrac{\sqrt{6}}{2} \).
  2. \( \sin 75^\circ - \sin 15^\circ = 2\cos 45^\circ \sin 30^\circ = 2 \cdot \tfrac{1}{\sqrt{2}} \cdot \tfrac{1}{2} = \tfrac{1}{\sqrt{2}} \).
  3. \( \cos 80^\circ + \cos 40^\circ - \cos 20^\circ \): the first two give \( 2\cos 60^\circ \cos 20^\circ = \cos 20^\circ \). So the whole thing is 0.
  4. Product to sum: \( 2\sin 5x \cos 3x = \sin 8x + \sin 2x \).
{ "view": [-0.4, 1.95, -0.42, 1.55], "equal": true, "grid": false, "labels": false, "items": [ {"curve": ["cos(t)", "sin(t)"], "t": [0, 1.5708], "color": "dim"}, {"seg": [["cos(75*pi/180)", "sin(75*pi/180)"], ["cos(75*pi/180)+cos(15*pi/180)", "sin(75*pi/180)+sin(15*pi/180)"]], "color": "dim", "dash": true, "width": 1.5}, {"seg": [["cos(15*pi/180)", "sin(15*pi/180)"], ["cos(75*pi/180)+cos(15*pi/180)", "sin(75*pi/180)+sin(15*pi/180)"]], "color": "dim", "dash": true, "width": 1.5}, {"seg": [[0, 0], ["cos(75*pi/180)", "sin(75*pi/180)"]], "color": "ink", "width": 2.5, "arrow": true}, {"seg": [[0, 0], ["cos(15*pi/180)", "sin(15*pi/180)"]], "color": "ink", "width": 2.5, "arrow": true}, {"seg": [[0, 0], ["cos(75*pi/180)+cos(15*pi/180)", "sin(75*pi/180)+sin(15*pi/180)"]], "color": "d", "width": 3.5, "arrow": true}, {"seg": [[0, 0], ["sqrt(6)/2", 0]], "color": "c", "width": 5}, {"seg": [["sqrt(6)/2", 0], ["sqrt(6)/2", "sqrt(6)/2"]], "color": "dim", "dash": true, "width": 1}, {"angle": [0, 0], "from": 0, "to": "pi/4", "r": 0.3, "color": "d", "label": "45°"}, {"text": "75°", "at": ["1.08*cos(75*pi/180)", "1.08*sin(75*pi/180)"], "anchor": "middle"}, {"text": "15°", "at": ["1.12*cos(15*pi/180)", "1.12*sin(15*pi/180)"], "dy": 4}, {"text": "√3", "at": [0.55, 0.78], "anchor": "end", "color": "d"}, {"text": "√6/2 ≈ 1.22", "at": ["sqrt(6)/4", -0.24], "anchor": "middle", "color": "c"} ] }

Worked example

Prove that \( \dfrac{\sin 3x + \sin x}{\cos 3x + \cos x} = \tan 2x \).

  1. Top: \( \sin 3x + \sin x = 2\sin \tfrac{3x + x}{2} \cos \tfrac{3x - x}{2} = 2\sin 2x \cos x \).
  2. Bottom: \( \cos 3x + \cos x = 2\cos 2x \cos x \).
  3. Divide: the \( 2\cos x \) cancels, leaving \( \dfrac{\sin 2x}{\cos 2x} = \tan 2x \).

This is the typical use: sums do not cancel, but once they become products, common factors do.

{ "view": [-0.2, 3.35, -4, 4], "aspect": 0.62, "grid": false, "ticks": {"x": "pi/4", "y": 1, "xunit": "pi"}, "items": [ {"vline": "pi/4", "color": "dim", "dash": true, "width": 1}, {"vline": "3*pi/4", "color": "dim", "dash": true, "width": 1}, {"fn": "(sin(3*x)+sin(x))/(cos(3*x)+cos(x))", "color": "d", "width": 5, "label": "left side", "labelAt": 0.35}, {"fn": "tan(2*x)", "color": "ink", "width": 1.5, "dash": true, "label": "tan 2x", "labelAt": 2.6}, {"point": ["pi/2", 0], "color": "e"}, {"text": "0/0 here", "at": ["pi/2", 0], "dx": -10, "dy": -10, "anchor": "end", "color": "e"} ] }

Don't mix these up

  • \( \cos x - \cos y \) has a minus in front: \( -2\sin\tfrac{x + y}{2}\sin\tfrac{x - y}{2} \). Check: for \( x \lt y \) in \( (0, \pi) \), \( \cos x \gt \cos y \), and the formula gives a positive answer only because of that minus.
  • The order \( x - y \) matters in the difference formulas. Swapping \( x \) and \( y \) changes the sign of \( \tfrac{x - y}{2} \).
  • Product to sum has no halves; sum to product has halves.

Try it. (a) Write \( \sin 7x - \sin 3x \) as a product. (b) Write \( 2\cos 4x \cos 2x \) as a sum. (c) Show that \( \dfrac{\cos 5x + \cos 3x}{\sin 5x - \sin 3x} = \cot x \).

Answer
(a) \( 2\cos 5x \sin 2x \). (b) \( \cos 6x + \cos 2x \). (c) Top \( = 2\cos 4x \cos x \), bottom \( = 2\cos 4x \sin x \); cancel \( 2\cos 4x \) to get \( \tfrac{\cos x}{\sin x} = \cot x \).

Just remember

Eight formulas, but only one idea: write \( \sin(A + B) \) and \( \sin(A - B) \) (or the cos pair) one under the other, add or subtract, and put \( A = \tfrac{x + y}{2} \), \( B = \tfrac{x - y}{2} \). That takes under a minute. The hooks are for speed and for catching sign slips.

Sum to product: the pairs
"Sin-cos, cos-sin, cos-cos, minus sin-sin", for sin + sin, sin − sin, cos + cos, cos − cos, said like a train announcement. First factor: the half-sum; second: the half-difference.
Why the minus in \( \cos x - \cos y \)
Test \( x = 0 \), \( y = 90^\circ \): \( 1 - 0 = 1 \). The formula gives \( -2\sin 45^\circ \sin(-45^\circ) = +1 \) only with the minus in front.
Product to sum: no halves
\( 2\cos x\cos y = \cos(x - y) + \cos(x + y) \) and \( 2\sin x\sin y = \cos(x - y) - \cos(x + y) \). Hook: "sin times sin loses the sum". Check with \( x = y \): \( 2\sin^2 x = 1 - \cos 2x \), the double-angle formula you already know.

Words to know

Sum-to-product formula
Writes \( \sin x \pm \sin y \) or \( \cos x \pm \cos y \) as a product.
Product-to-sum formula
Writes \( 2\sin x \cos y \) and similar products as a sum or difference.
Half-sum
\( \tfrac{x + y}{2} \), the angle in the first factor.
Half-difference
\( \tfrac{x - y}{2} \), the angle in the second factor.

What is \( \cos 5x - \cos x \) as a product?

  1. \( 2\sin 3x \sin 2x \)
  2. \( -2\sin 3x \sin 2x \)
  3. \( 2\cos 3x \cos 2x \)

What is \( 2\sin 3x \cos x \) as a sum?

  1. \( \sin 4x + \sin 2x \)
  2. \( \cos 4x + \cos 2x \)
  3. \( \sin 2x + \sin x \)

What is the value of \( \sin 50^\circ + \sin 10^\circ - \cos 20^\circ \)?

  1. \( \cos 20^\circ \)
  2. 0
  3. \( \sin 60^\circ \)

Deep dive · optional

Multiplying by adding: the trick before logarithms

Why a product of two cosines falls apart into a sum, how astronomers in the 1580s used exactly that to multiply huge numbers, and why two nearly equal notes throb. Not needed for the exam, but it is the best reason these formulas exist.

  1. The roots
  2. The story
  3. See it
  4. Solve it
  5. Connect it

The roots: turn y round and half the formula cancels

  1. Why can \( \cos x\cos y \) be written as a sum?Because \( \cos(x + y) \) and \( \cos(x - y) \) both contain \( \cos x\cos y \), once with \( -\sin x\sin y \) and once with \( +\sin x\sin y \). Add them and the sine parts cancel, leaving \( 2\cos x\cos y \).
  2. Why do the two sine parts have opposite signs?Because \( x - y \) is \( x + (-y) \), and changing y to −y flips \( \sin y \) but leaves \( \cos y \) alone.
  3. Why does −y flip the sine and not the cosine?The point for −y is the point for y mirrored in the x-axis: the same distance across, the opposite distance up.
  4. And why does that decide sin and cos?Because cos and sin are just the across and the up of the point on the unit circle. That is the bedrock.

There is also a picture that makes sum to product obvious, the one at the top of this page. Add two arrows of length 1 pointing at angles x and y. They form a rhombus, and the diagonal of a rhombus cuts its angle in half, so the sum points along the half-sum \( \tfrac{x + y}{2} \). Its length is twice the shadow of each arrow on that diagonal, \( 2\cos\tfrac{x - y}{2} \). The across part of the sum is then \( 2\cos\tfrac{x - y}{2}\cos\tfrac{x + y}{2} \), and the across part of the sum is also \( \cos x + \cos y \). Same arrow, two descriptions: that is the formula.

The same fact explains beats. Two notes of frequencies \( f_1 \) and \( f_2 \), played together, add to \( 2\cos\left(\pi(f_1 - f_2)t\right)\sin\left(\pi(f_1 + f_2)t\right) \): a fast wave at the average pitch, inside a slow envelope. The loudness swells whenever the envelope reaches a peak or a trough, which happens \( |f_1 - f_2| \) times a second. Musicians use this to tune: as two strings come together, the throbbing slows down.

The story: Hven, 1580

See it

Hand-coloured engraving: a huge brass quarter circle on a wall, an observer at the right sighting a star, an assistant reading a clock and a clerk writing at a tableobserver at the sightbrass arc, in degreesreading the clockwriting it down
Tycho Brahe's great wall quadrant at Uraniborg, engraved in 1598. Every reading it gave had to be multiplied through sines, which is why a shortcut mattered.

Now do what Tycho's assistants did. Pick two numbers. Each becomes a cosine; the product appears as the point halfway between two other cosines.

Solve it

Solve it · by hand, the old way

Multiply \( 0.5 \times 0.866 \) using only the cosine values you know.

Answer
\( 0.5 = \cos 60^\circ \) and \( 0.866 \approx \cos 30^\circ \). Then \( \cos 60^\circ\cos 30^\circ = \tfrac{1}{2}[\cos 30^\circ + \cos 90^\circ] = \tfrac{1}{2}(0.866 + 0) = 0.433 \). Check: \( 0.5 \times 0.866 = 0.433 \).

Solve it · predict the throb

Two tanpura strings ring at 240 Hz and 243 Hz. How many times a second does the sound swell? Many students say 1.5. Why is that wrong?

Hint
Write the sum as a product. How often does the slow factor reach its largest size, counting both its peaks and its troughs?
Answer
\( \sin(2\pi \cdot 240t) + \sin(2\pi \cdot 243t) = 2\sin(2\pi \cdot 241.5\,t)\cos(2\pi \cdot 1.5\,t) \). The slow factor \( \cos(2\pi \cdot 1.5\,t) \) has 1.5 cycles a second, but the ear hears loudness, which depends on its size, not its sign. Its size peaks at every peak and every trough: twice per cycle, so 3 swells a second, which is \( 243 - 240 \).

Solve it · a JEE classic

Show that \( \sin 20^\circ \sin 40^\circ \sin 60^\circ \sin 80^\circ = \tfrac{3}{16} \).

Hint
First show \( \sin x\sin(60^\circ - x)\sin(60^\circ + x) = \tfrac{1}{4}\sin 3x \) with product to sum, then put \( x = 20^\circ \).
Answer
\( \sin(60^\circ - x)\sin(60^\circ + x) = \tfrac{1}{2}[\cos 2x - \cos 120^\circ] = \tfrac{1}{2}\cos 2x + \tfrac{1}{4} \). Multiply by \( \sin x \): \( \tfrac{1}{2}\sin x\cos 2x + \tfrac{1}{4}\sin x = \tfrac{1}{4}[\sin 3x - \sin x] + \tfrac{1}{4}\sin x = \tfrac{1}{4}\sin 3x \). With \( x = 20^\circ \): \( \sin 20^\circ\sin 40^\circ\sin 80^\circ = \tfrac{1}{4}\sin 60^\circ = \tfrac{\sqrt{3}}{8} \). Times \( \sin 60^\circ = \tfrac{\sqrt{3}}{2} \) gives \( \tfrac{3}{16} \).

Connect it

Connect it

  • Beats, Physics Ch 14. The swelling sound of two close notes is this page's formula heard: beats, with beat frequency \( |f_1 - f_2| \).
  • Sum formulas, this chapter. All eight formulas are two lines of the sum and difference formulas added or subtracted.
  • Double angles, this chapter. Put \( x = y \) in product to sum and you get \( 2\sin^2 x = 1 - \cos 2x \) and \( 2\cos^2 x = 1 + \cos 2x \): the half-angle forms.
  • Integrals, Class 12. \( \int \sin 3x\cos x\,dx \) has no direct rule, but \( \tfrac{1}{2}\int(\sin 4x + \sin 2x)\,dx \) does: integrals using trig identities.
  • Logarithms. Napier's logarithms (1614) did the same job as prosthaphaeresis, a product turned into a sum, and replaced it within a generation.

Still confused?

Why are there halves in sum to product but none in product to sum?

Product to sum starts from angles x and y and makes x + y and x − y. Sum to product goes the other way: given the sum and difference (call them x and y), the original angles are their average and half-difference, \( \tfrac{x + y}{2} \) and \( \tfrac{x - y}{2} \). The halves come from undoing the adding.

How could astronomers multiply numbers bigger than 1 with cosines?

They moved the decimal point. 309 × 788 becomes 0.309 × 0.788, which is \( \cos\alpha\cos\beta \) for two angles from the table; at the end the decimal point moves back by six places. The widget does the same.

Sources

  1. Tycho Brahe and mathematical techniques, Whipple Museum of the History of Science, University of Cambridge (Wittich's visit 1580; Ursus 1588; Werner; the 1591 manual; cos A cos B).
  2. Paul Wittich, MacTutor History of Mathematics, University of St Andrews.
  3. Prosthaphaeresis, Wikipedia (the four identities; Napier's logarithms 1614; worked example of a multiplication).
  4. Beat (acoustics), Wikipedia (beat frequency = difference; tuning by beats).
  5. Tycho's mural quadrant, from Astronomiae instauratae mechanica (1598), Wikimedia Commons.