B8 - Sums of trigonometric series

B8 - Sums of trigonometric series

A sum of sines can be hidden inside a much simpler geometric series of complex numbers. You will sum finite complex geometric series, extract their real or imaginary parts, and handle the special cases where the common ratio is one. The distinction between a finite sum and a sum to infinity will stay explicit throughout.

Finite complex geometric series

How can four nonzero complex terms add to zero? Consider 1+i+i2+i31+\mathrm{i}+\mathrm{i}^2+\mathrm{i}^3. Consecutive terms are multiplied by i\mathrm{i}, and their directions make four successive quarter-turns. The terms are 1,i,−1,−i1,\mathrm{i},-1,-\mathrm{i}, which cancel.

A geometric series has a constant multiplier, called its common ratio. The familiar finite-sum argument uses only addition and multiplication, so it works for complex ratios too. For Sn=a+aq+⋯+aqn−1S_n=a+aq+\cdots+aq^{n-1}, subtracting qSnqS_n cancels the middle terms:

(1−q)Sn=a−aqn(1-q)S_n=a-aq^n

Finite geometric sum

For a positive integer nn, complex first term aa and complex ratio q≠1q\ne1,

Sn=∑k=0n−1aqk=a(1−qn)1−qS_n=\sum_{k=0}^{n-1}aq^k=\frac{a(1-q^n)}{1-q}

There is no restriction on ∣q∣|q| for this finite sum. The formula is in the formula booklet.

The denominator is the only obstruction in this formula: when q=1q=1, calculate nn copies of aa directly. We will return to this case in the last part.

At q=0q=0, read the original terms as a,0,0,…a,0,0,\ldots, so every nonempty finite sum is aa. The first term is aa directly; there is no need to evaluate 000^0.

Worked example 1: a unit-modulus ratio

Question. Find 1+i+i2+i31+\mathrm{i}+\mathrm{i}^2+\mathrm{i}^3 using a geometric-sum formula.

Plan. Use first term 11, ratio i\mathrm{i}, and four terms.

S4=1−i41−iq≠1=1−11−ii4=1=0\begin{aligned} S_4&=\frac{1-\mathrm{i}^4}{1-\mathrm{i}} && q\ne1\\ &=\frac{1-1}{1-\mathrm{i}} && \mathrm{i}^4=1\\ &=0 \end{aligned}

Answer. 00.

Check. Direct summation gives 1+i−1−i=01+\mathrm{i}-1-\mathrm{i}=0. The four term-vectors form a closed square when placed head to tail.

[DIAGRAM: asset_name: Four terms make a closed path; asset_slug: aqa7367-geometric-square; caption: Adding 1, i, minus 1 and minus i head to tail returns to zero; description: An equal-scale Argand diagram shows a head-to-tail square path from zero to 1, then to 1 plus i, then to i, and back to zero. Four arrows are labelled 1, i, minus 1 and minus i. A note distinguishes the four nonzero terms from their zero sum and states that consecutive term directions turn through pi over two.]
Adding 1, i, minus 1 and minus i head to tail returns to zero

Now change only the magnitude of the ratio, from i\mathrm{i} to 2i2\mathrm{i}. The finite-sum formula still works even though the terms grow.

Worked example 2: a ratio larger than one in modulus

Question. Find 1+2i+(2i)2+(2i)31+2\mathrm{i}+(2\mathrm{i})^2+(2\mathrm{i})^3.

Plan. Apply the same four-term formula, then simplify the complex quotient.

S4=1−(2i)41−2ifinite geometric sum=−151−2i(2i)4=16=−15(1+2i)5multiply by the conjugate=−3−6i\begin{aligned} S_4&=\frac{1-(2\mathrm{i})^4}{1-2\mathrm{i}} && \text{finite geometric sum}\\ &=\frac{-15}{1-2\mathrm{i}} && (2\mathrm{i})^4=16\\ &=\frac{-15(1+2\mathrm{i})}{5} && \text{multiply by the conjugate}\\ &=-3-6\mathrm{i} \end{aligned}

Answer. −3−6i-3-6\mathrm{i}.

Check. The actual terms are 1,2i,−4,−8i1,2\mathrm{i},-4,-8\mathrm{i}. Their real and imaginary parts sum to −3-3 and −6-6.

An infinite geometric series is a different question: it asks whether the partial sums approach a finite limit. For a nonzero first term, this happens exactly when ∣q∣<1|q|<1. The booklet then gives S∞=a/(1−q)S_\infty=a/(1-q). If ∣q∣≥1|q|\ge1, the nonzero terms do not even tend to zero, so the series cannot converge. If a=0a=0, every term is zero for any ratio; that is a trivial exception. In particular, a finite series with ratio eiθ\mathrm{e}^{\mathrm{i}\theta} can be summed even though its corresponding nonzero infinite series does not converge.

Watch out

Do not reject a finite geometric sum because ∣q∣≥1|q|\ge1. The condition ∣q∣<1|q|<1 belongs to the nontrivial sum to infinity, not the finite-sum formula.

Change the ratio’s magnitude once more.

Extracting real and imaginary parts

Euler’s definition turns the real part of an exponential into a cosine and its imaginary part into a sine. Adding complex numbers adds each component separately, so one complex geometric sum can give two trigonometric sums.

For example,

eiθ+e3iθ=(cos⁡θ+cos⁡3θ)+i(sin⁡θ+sin⁡3θ)\mathrm{e}^{\mathrm{i}\theta}+\mathrm{e}^{3\mathrm{i}\theta} =(\cos\theta+\cos3\theta)+\mathrm{i}(\sin\theta+\sin3\theta)

For the odd-angle sums, use

Z=eiθ+e3iθ+⋯+e(2n−1)iθZ=\mathrm{e}^{\mathrm{i}\theta}+\mathrm{e}^{3\mathrm{i}\theta}+\cdots+\mathrm{e}^{(2n-1)\mathrm{i}\theta}

There are nn terms, the first term is eiθ\mathrm{e}^{\mathrm{i}\theta}, and the ratio is e2iθ\mathrm{e}^{2\mathrm{i}\theta}. This ratio equals one exactly when θ\theta is an integer multiple of π\pi. For now assume sin⁡θ≠0\sin\theta\ne0.

To simplify the quotient, pair opposite angles:

1−e2ix=eix(e−ix−eix)=−2ieixsin⁡x1-\mathrm{e}^{2\mathrm{i}x} =\mathrm{e}^{\mathrm{i}x}(\mathrm{e}^{-\mathrm{i}x}-\mathrm{e}^{\mathrm{i}x}) =-2\mathrm{i}\mathrm{e}^{\mathrm{i}x}\sin x

The last equality follows from eix−e−ix=2isin⁡x\mathrm{e}^{\mathrm{i}x}-\mathrm{e}^{-\mathrm{i}x}=2\mathrm{i}\sin x. These rearrangements are derived identities, not separately supplied trigonometric-sum formulae.

There is another useful way to extract a sine sum. Put u=eiθu=\mathrm{e}^{\mathrm{i}\theta}. De Moivre gives 2isin⁡((2k+1)θ)=u2k+1−u−(2k+1)2\mathrm{i}\sin((2k+1)\theta)=u^{2k+1}-u^{-(2k+1)}. Summing these equalities gives

2iS=(u+u3+⋯+u2n−1)−(u−1+u−3+⋯+u−(2n−1))2\mathrm{i}S=(u+u^3+\cdots+u^{2n-1}) -(u^{-1}+u^{-3}+\cdots+u^{-(2n-1)})

The brackets are geometric series with ratios u2u^2 and u−2u^{-2}. This difference is the algebraic version of taking the imaginary part; it also shows how to express a trigonometric sum as two geometric series.

Worked example 3: the cosine sum

Question. For positive integer nn and sin⁡θ≠0\sin\theta\ne0, show that

cos⁡θ+cos⁡3θ+⋯+cos⁡(2n−1)θ=sin⁡(nθ)cos⁡(nθ)sin⁡θ\cos\theta+\cos3\theta+\cdots+\cos(2n-1)\theta =\frac{\sin(n\theta)\cos(n\theta)}{\sin\theta}

Plan. Sum ZZ geometrically, simplify the exponential quotient, then take its real part.

Z=eiθ(1−e2niθ)1−e2iθfirst term and ratio=eiθ(−2ieniθsin⁡nθ)−2ieiθsin⁡θfactor the half-angles=eniθsin⁡nθsin⁡θsin⁡θ≠0\begin{aligned} Z&=\frac{\mathrm{e}^{\mathrm{i}\theta}(1-\mathrm{e}^{2n\mathrm{i}\theta})}{1-\mathrm{e}^{2\mathrm{i}\theta}} && \text{first term and ratio}\\ &=\frac{\mathrm{e}^{\mathrm{i}\theta}(-2\mathrm{i}\mathrm{e}^{n\mathrm{i}\theta}\sin n\theta)}{-2\mathrm{i}\mathrm{e}^{\mathrm{i}\theta}\sin\theta} && \text{factor the half-angles}\\ &=\mathrm{e}^{n\mathrm{i}\theta}\frac{\sin n\theta}{\sin\theta} && \sin\theta\ne0 \end{aligned}

The sine quotient is real, so the real part is cos⁡(nθ)sin⁡(nθ)/sin⁡θ\cos(n\theta)\sin(n\theta)/\sin\theta.

Answer. The required cosine sum is sin⁡(nθ)cos⁡(nθ)/sin⁡θ\sin(n\theta)\cos(n\theta)/\sin\theta.

Check. For n=2n=2, the addition identity gives cos⁡θ+cos⁡3θ=2cos⁡2θcos⁡θ\cos\theta+\cos3\theta=2\cos2\theta\cos\theta. The derived expression gives the same result because sin⁡2θ=2sin⁡θcos⁡θ\sin2\theta=2\sin\theta\cos\theta.

Keep the same series and change only the component you read. No new geometric summation is necessary.

Worked example 4: the matching sine sum

Question. For positive integer nn and sin⁡θ≠0\sin\theta\ne0, show that

sin⁡θ+sin⁡3θ+⋯+sin⁡(2n−1)θ=sin⁡2(nθ)sin⁡θ\sin\theta+\sin3\theta+\cdots+\sin(2n-1)\theta =\frac{\sin^2(n\theta)}{\sin\theta}

Plan. Use the imaginary part of the same geometric sum ZZ.

Z=eniθsin⁡nθsin⁡θthe geometric sum above=sin⁡nθcos⁡nθsin⁡θ+isin⁡2nθsin⁡θEuler’s definitionIm⁡(Z)=sin⁡2nθsin⁡θtake the coefficient of i\begin{aligned} Z&=\mathrm{e}^{n\mathrm{i}\theta}\frac{\sin n\theta}{\sin\theta} && \text{the geometric sum above}\\ &=\frac{\sin n\theta\cos n\theta}{\sin\theta} +\mathrm{i}\frac{\sin^2 n\theta}{\sin\theta} && \text{Euler’s definition}\\ \operatorname{Im}(Z)&=\frac{\sin^2 n\theta}{\sin\theta} && \text{take the coefficient of }\mathrm{i} \end{aligned}

Answer. The required sine sum is sin⁡2(nθ)/sin⁡θ\sin^2(n\theta)/\sin\theta.

Check. For n=2n=2, the addition identity gives sin⁡θ+sin⁡3θ=2sin⁡2θcos⁡θ=4sin⁡θcos⁡2θ\sin\theta+\sin3\theta=2\sin2\theta\cos\theta=4\sin\theta\cos^2\theta. The derived expression sin⁡2(2θ)/sin⁡θ\sin^2(2\theta)/\sin\theta simplifies to the same form.

This explains the useful surprise: a long trigonometric sum can be the shadow of a short complex fraction. For angles with another constant step, identify that step in the exponential ratio instead of automatically using e2iθ\mathrm{e}^{2\mathrm{i}\theta}.

Watch out

For eiθ+e3iθ+⋯+e(2n−1)iθ\mathrm{e}^{\mathrm{i}\theta}+\mathrm{e}^{3\mathrm{i}\theta}+\cdots+\mathrm{e}^{(2n-1)\mathrm{i}\theta}, the ratio is e2iθ\mathrm{e}^{2\mathrm{i}\theta} and there are nn terms. The final exponent is not the number of terms.

Use the sine result with fresh angles.

The ratio-one case

A denominator of zero in a derived formula does not mean that the original finite sum is undefined. It means that the division used in deriving that formula is unavailable.

For q=1q=1, the original geometric series is simply a+a+⋯+aa+a+\cdots+a, so Sn=naS_n=na. For the odd-angle complex sum, q=e2iθ=1q=\mathrm{e}^{2\mathrm{i}\theta}=1 when θ=mπ\theta=m\pi, with mm an integer. Each term is then

e(2k+1)imπ=(−1)m\mathrm{e}^{(2k+1)\mathrm{i}m\pi}=(-1)^m

There are nn copies of this same real number. Consequently the cosine sum is n(−1)mn(-1)^m, while the sine sum is zero. This directly handles every angle excluded by sin⁡θ≠0\sin\theta\ne0.

Worked example 5: all angles are zero

Question. Find C=∑k=04cos⁡((2k+1)θ)C=\sum_{k=0}^{4}\cos((2k+1)\theta) and S=∑k=04sin⁡((2k+1)θ)S=\sum_{k=0}^{4}\sin((2k+1)\theta) when θ=0\theta=0.

Plan. Return to the five actual terms instead of dividing by sin⁡0\sin0.

C=1+1+1+1+1=5cos⁡0=1S=0+0+0+0+0=0sin⁡0=0\begin{aligned} C&=1+1+1+1+1=5 && \cos0=1\\ S&=0+0+0+0+0=0 && \sin0=0 \end{aligned}

Answer. C=5C=5 and S=0S=0.

Check. The complex first term and ratio are both 11, so Z=5Z=5. Its real and imaginary parts are 55 and 00.

Change only θ\theta, from zero to π\pi. The ratio is still one, but the first term changes sign.

Worked example 6: all cosine terms are minus one

Question. Find the same five-term sums when θ=π\theta=\pi.

Plan. Evaluate the sines and cosines of odd multiples of π\pi.

C=cos⁡π+cos⁡3π+⋯+cos⁡9π=−5five copies of −1S=sin⁡π+sin⁡3π+⋯+sin⁡9π=0five zero terms\begin{aligned} C&=\cos\pi+\cos3\pi+\cdots+\cos9\pi=-5 && \text{five copies of }-1\\ S&=\sin\pi+\sin3\pi+\cdots+\sin9\pi=0 && \text{five zero terms} \end{aligned}

Answer. C=−5C=-5 and S=0S=0.

Check. The complex series has first term −1-1, ratio 11, and five terms, so Z=5(−1)=−5Z=5(-1)=-5.

The opening sum 1+i+i2+i31+\mathrm{i}+\mathrm{i}^2+\mathrm{i}^3 was a different case: its ratio was i≠1\mathrm{i}\ne1, so the finite geometric formula applied and gave zero. Cancellation and an invalid denominator are separate issues.

Watch out

0/00/0 is not zero. If a trigonometric-sum formula gives 0/00/0, return to the original finite terms and evaluate the excluded case directly.

Keep the ratio-one situation and change the angle and term count.

Quick Recap

  • A finite complex GP has sum a(1−qn)/(1−q)a(1-q^n)/(1-q) when q≠1q\ne1, with no modulus restriction.
  • For a nonzero first term, the infinite geometric series converges only when ∣q∣<1|q|<1.
  • Real and imaginary parts of exponential sums give cosine and sine sums.
  • When q=1q=1, sum the repeated terms directly: Sn=naS_n=na.

Four nonzero terms can sum to zero because their directions cancel: 1+i+i2+i3=01+\mathrm{i}+\mathrm{i}^2+\mathrm{i}^3=0.