A Sum of Cosines Is a Geometric Series—Could You Believe It?

Written by

in

Consider the innocent-looking sum

S = cosx + cos2x + cos3x + ⋯ + cosnx.

At first glance, there is nothing geometric about it. The terms are cosines, not powers of a common ratio.

But there is a geometric series hiding inside.

The Key Idea

Euler’s formula says

eix = cosx + isinx.

Therefore, the real part of eikx is coskx. Hence

S = Re ( eix + e2ix + e3ix + ⋯ + enix ) .

Now look carefully at the expression inside the parentheses. It is a geometric series!

Its first term is eix, and its common ratio is also eix.

Sum the Geometric Series

Using the finite geometric-series formula,

eix + e2ix + ⋯ + enix = eix 1 − enix 1 − eix .

This already proves that our trigonometric sum comes from a geometric series. But we can simplify it further.

A Useful Identity

For any real number t,

1 − eit = −2i eit/2 sin ( t2 ) .

Apply this identity to both the numerator and denominator. After cancellation, we obtain

eix + e2ix + ⋯ + enix = sin ( nx2 ) sin ( x2 ) e i (n+1)x 2 .

Now take the real part. Since the real part of eiθ is cosθ, we arrive at

cosx + cos2x + ⋯ + cosnx = sin ( nx2 ) cos ( (n+1)x 2 ) sin ( x2 ) .

So the final formula is

cosx + cos2x + ⋯ + cosnx = sin ( nx2 ) cos ( (n+1)x 2 ) sin ( x2 ) .

This formula applies whenever sin(x/2)≠0. If x is a multiple of 2π, every cosine equals 1, so the original sum is simply n.

There Is Geometry Behind the Geometric Series

The connection is even more interesting than the algebra suggests.

Each complex number

eikx = coskx + isinkx

can be viewed as a vector of length 1 making an angle kx with the positive horizontal axis.

Thus the vectors

eix , e2ix , e3ix , … , enix

all have the same length, and each successive vector is obtained by rotating the previous one through exactly the same angle x.

Place these vectors head-to-tail. They form a turning polygonal chain. Their vector sum is

eix + e2ix + ⋯ + enix.

And what is the horizontal component of this vector?

Exactly

cosx + cos2x + ⋯ + cosnx.

So our sum of cosines really does have a geometric meaning.

And the Sines Come for Free

The imaginary part of exactly the same geometric series gives another classical identity:

sinx + sin2x + ⋯ + sinnx = sin ( nx2 ) sin ( (n+1)x 2 ) sin ( x2 ) .

One geometric series has given us two trigonometric identities.

The Takeaway

A sum such as

cosx + cos2x + ⋯ + cosnx

does not look remotely like a geometric series.

But complex numbers reveal what is hidden:

trigonometric sum → complex exponentials → geometric series → closed formula.

Sometimes the hardest part of a problem is not doing the calculation. It is recognizing what the calculation really is.


Another Unexpected Side of Trigonometry

Writing a sum of cosines as part of a geometric series reveals algebra hidden inside trigonometry. There is another beautiful example of this idea in the historical problem of actually computing sines and cosines.

Long before electronic calculators, Newton developed infinite series that turned sin ⁡ (x) and cos ⁡ (x) into expressions that could be evaluated using arithmetic.

Continue exploring: How Newton Computed Sines and Cosines Without a Calculator

Leave a Reply

Your email address will not be published. Required fields are marked *