Summing a Series with De Moivre

A cosine sum with a geometric one inside.

Two sums with no common ratio

Take C = 1 + cos θ + cos 2θ + … + cos nθ and S = sin θ + sin 2θ + … + sin nθ. The angle goes up by θ each term, but neither sum is geometric: to be geometric, each term would have to be the one before it times the same number.

At θ = 30°, cos 60° ÷ cos 30° ≈ 0.577, but cos 90° ÷ cos 60° = 0. The ratio changes from one term to the next, so the formula for a geometric sum cannot be used on C, or on S, alone.

Pair them into one complex sum

Add C to i times S, term by term. The terms pair off: C + iS = 1 + (cos θ + i sin θ) + (cos 2θ + i sin 2θ) + … + (cos nθ + i sin nθ).

Let z = cos θ + i sin θ. By De Moivre’s theorem, zᵏ = cos kθ + i sin kθ for every whole number k, so each bracket is a power of z, and C + iS = 1 + z + z² + … + zⁿ. That sum is geometric: each term is the one before it times z.

realimaginary1zz²z³C + iS

The terms 1, z, z² and z³ at θ = 30°, laid head to tail. Each has length 1 and turns 30° from the one before. The gold arrow is their sum, C + iS: its real part is C = 1 + cos 30° + cos 60° + cos 90° ≈ 2.366, and its imaginary part is S ≈ 2.366.

Sum it as a geometric series

A geometric series with first term 1 and ratio z has the sum 1 + z + z² + … + zⁿ = (1 − zⁿ⁺¹)/(1 − z), as long as z ≠ 1. There are n + 1 terms, from z⁰ up to zⁿ, so the power on top is n + 1.

So C + iS = (1 − zⁿ⁺¹)/(1 − z), and zⁿ⁺¹ = cos((n + 1)θ) + i sin((n + 1)θ) by De Moivre again.

Split the quotient into its parts

C is the real part of the quotient and S is its imaginary part. To read them off, write the top and the bottom in polar form.

Use the double-angle formulas 1 − cos θ = 2sin²(θ/2) and sin θ = 2sin(θ/2) cos(θ/2). Then 1 − z = 2sin²(θ/2) − 2i sin(θ/2) cos(θ/2) = −2i sin(θ/2) [cos(θ/2) + i sin(θ/2)]. Multiply out the right side to check: −2i sin(θ/2) cos(θ/2) − 2i² sin²(θ/2) = 2sin²(θ/2) − 2i sin(θ/2) cos(θ/2).

The top works the same way with (n + 1)θ in place of θ: 1 − zⁿ⁺¹ = −2i sin((n + 1)θ/2) [cos((n + 1)θ/2) + i sin((n + 1)θ/2)].

Divide. The −2i cancels, and dividing the two brackets subtracts their angles: (n + 1)θ/2 − θ/2 = nθ/2. So C + iS = [sin((n + 1)θ/2) / sin(θ/2)] × [cos(nθ/2) + i sin(nθ/2)].

The first factor is real, so the parts can be read off: C = sin((n + 1)θ/2) cos(nθ/2) / sin(θ/2) and S = sin((n + 1)θ/2) sin(nθ/2) / sin(θ/2).

Checks

At θ = 60° with n = 2: C = 1 + cos 60° + cos 120° = 1 + 1/2 − 1/2 = 1. The formula gives sin 90° cos 60° ÷ sin 30° = 1 × 1/2 ÷ 1/2 = 1. And S = sin 60° + sin 120° = √3, while the formula gives sin 90° sin 60° ÷ sin 30° = (√3/2) / (1/2) = √3.

At θ = 30° with n = 3, the sum drawn above: C = sin 60° cos 45° ÷ sin 15° ≈ 0.866 × 0.707 / 0.259 ≈ 2.366, and term by term C = 1 + √3/2 + 1/2 + 0 = (3 + √3)/2 ≈ 2.366.

At θ = 90° every term cancels

At θ = 90°, z = cos 90° + i sin 90° = i. With n = 3 the sum is 1 + i + i² + i³ = 1 + i − 1 − i = 0, and the formula agrees: (1 − i⁴)/(1 − i) = (1 − 1)/(1 − i) = 0.

The real parts give C = 1 + cos 90° + cos 180° + cos 270° = 1 + 0 − 1 + 0 = 0, and the imaginary parts give S = 0 + 1 + 0 − 1 = 0. In the closed form, sin((n + 1)θ/2) = sin 180° = 0, so both C and S are 0.

realimaginary1ii²i³

At θ = 90° the terms 1, i, i² and i³, laid head to tail, go round a square and end where they started, at 0.

When z = 1

The geometric formula needs z ≠ 1. At θ = 0°, or any whole number of turns, z = 1 and 1 − z = 0. Then every term is 1, so C = n + 1 and S = 0, found by counting rather than by the formula.

At θ = 120° with n = 2, z is the cube root of 1 called ω, and the sum is 1 + ω + ω² = 0. The closed form gives sin 180° = 0 on top, so C = 0 and S = 0, as The Roots of Unity found.

The usual mistakes

Building the series from z = cos θ alone. Its powers are cos²θ, cos³θ and so on, and cos²θ is not cos 2θ: at θ = 30°, cos²30° = 0.75 but cos 60° = 0.5. Only the whole of cos θ + i sin θ has zᵏ = cos kθ + i sin kθ.

Taking C from the imaginary part. C has no i beside it in C + iS, so C is the real part and S is the imaginary part.

Putting zⁿ on top. The sum runs from z⁰ to zⁿ, which is n + 1 terms, so the top is 1 − zⁿ⁺¹.

Forgetting the leading 1. At θ = 90°, 1 + cos 90° + cos 180° + cos 270° is 0, not −1: the first term is cos 0° = 1, and it cancels cos 180° = −1.

Practice Summing a Series with De Moivre in the app