Catto / Topic Map · Calculus I Level 1
Calculus I · 120 h · Topic 10 of 10

Series

Adding infinitely many terms can give a finite number. That idea makes it possible to represent functions as infinite polynomials and signals as sums of sinusoids.

Convergence Tests Power series Taylor Fourier

01First, sequences

A sequence is an infinite ordered list of numbers: a₁, a₂, a₃, … All that matters about it is its long-run behavior: whether it approaches a number —converges— or not.

SequenceBehaviorWhere it appears
an = 1/nConverges to 0Error of a numerical method
an = rnConverges to 0 if |r| < 1; diverges if |r| > 1Amplitude of each bounce of a signal on a mismatched line
an = (−1)nOscillates: does not convergeA system on the edge of instability
an = (1 + 1/n)nConverges to eContinuous compounding, exponential charging

02Adding infinitely many terms

A series is the sum of all the terms of a sequence. You cannot “add up to infinity”, so it is defined through its partial sums: you add n terms and study the limit of that new sequence.

\[ S_n = \sum_{k = 1}^n a_k \quad \sum_{k = 1}^{\infty} a_k = \lim_{n \to \infty} S_n \] If that limit exists and is finite, the series converges and its value is that limit. If not, it diverges.
The geometric series, the one most used
\[ \sum_{k = 0}^{\infty} r^k = \frac{1}{1 -r} \quad \operatorname{if} \; | r | \lt 1 \]

With r = 1/2: 1 + 1/2 + 1/4 + 1/8 + … = 2. Infinitely many terms, a finite result. With |r| ≥ 1 the series diverges: each term contributes as much as the previous one or more.

The harmonic series is deceptive

The terms of 1 + 1/2 + 1/3 + 1/4 + … tend to zero, and yet the series diverges: the sum grows without bound, only very slowly (to get past 20 you need more than 200 million terms). The general term tending to zero is necessary but not sufficient.

03Convergence tests

TestWhat to look atConclusion
General termlim anIf it does not tend to 0, it diverges. If it tends to 0, it says nothing
ComparisonAnother known seriesSmaller than a convergent one: converges. Larger than a divergent one: diverges
Ratio (D’Alembert)\( L = \lim \left| \dfrac{a_{n+1}}{a_n} \right| \)\( L < 1 \) converges; \( L > 1 \) diverges; \( L = 1 \) is inconclusive
Root (Cauchy)\( L = \lim \sqrt[n]{|a_n|} \)Same as the previous one
Integral\( \displaystyle\int_1^{\infty} f(x) \, dx \) with f positive and decreasingThe series and the integral share the same fate
Leibniz (alternating)|an| decreasing with limit 0Converges, and the error is less than the first neglected term

The integral test settles p-series, Σ1/np, in one stroke: they converge if p > 1 and diverge if p ≤ 1. That is why Σ1/n² converges —to π²/6— and the harmonic series, with p = 1, does not.

Lab · partial sums

Each point is a partial sum. You can see right away whether they approach a value or escape.

04Power series and Taylor series

A power series is an infinite sum of terms cn(x − a)n: an “infinite polynomial”. It converges inside an interval centered at a, whose radius of convergence is computed with the ratio test.

When the coefficients are chosen from the derivatives of a function —cn = f(n)(a)/n!— you get the Taylor series, which is the Taylor polynomial taken to infinity:

\[ \begin{array}{c} e^x = 1 + x + \frac{x^2}{2 !} + \frac{x^3}{3 !} + \cdots \quad \text{for all x }\\ \operatorname{sin} x = x -\frac{x^3}{3 !} + \frac{x^5}{5 !} -\cdots \\ \frac{1}{1 -x} = 1 + x + x^2 + x^3 + \cdots \quad \text{only if |x| < 1 }\end{array} \]
Euler’s formula, which arrives from here

Replacing x by jθ in the series for ex and separating the real and imaginary parts, the series for the cosine and the sine appear exactly: ejθ = cos θ + j·sin θ. From this comes all of the phasor notation used to solve alternating current, and the reason a complex exponential describes a rotation.

05A first look at Fourier

Taylor builds functions by adding powers. Fourier builds periodic signals by adding sinusoids: a fundamental and its harmonics, each with its own amplitude.

\[ v (t) = a_0 + \sum_{n = 1}^{\infty} \left[ a_n \cos (n \omega t) + b_n \operatorname{sin} (n \omega t) \right] \] The coefficients are computed with integrals over one period: they are the coordinates of the signal in the basis of sines and cosines.
Lab · synthesizing a wave from harmonics

Raise the number of harmonics and watch the wave take shape. Below, the spectrum: the amplitude of each one.

This explains in one stroke why a square wave needs bandwidth: if the circuit does not let the high harmonics through, the edges are rounded. And why, even if you add a hundred harmonics, near the jump there remains an overshoot of almost 9% of the height of the jump: this is the Gibbs phenomenon, which never goes away. The complete topic is in signals and Fourier.

06Series in electronics

  • Spectrum of a signal. What a spectrum analyzer shows are the Fourier coefficients. You can see it in the instrument simulator.
  • Harmonic distortion. THD is defined from the coefficients: it is the ratio between the RMS value of all the harmonics and that of the fundamental.
  • Multiple reflections. On a transmission line mismatched at both ends, the signal bounces back and forth and each round trip is multiplied by Γ₁Γ₂: the total sum is a geometric series.
  • Computing functions on a microcontroller. Without a floating-point unit, the sine and the logarithm are computed with truncated series expansions, choosing how many terms according to the required precision.
  • Convergence of an algorithm. The error of an iterative method tending to zero like a geometric progression is what guarantees that the program terminates.

07In the lab

Exercise 1 · Convergence by hand

Decide whether Σ1/(n² + 1), Σn/(2n + 1) and Σ1/2n converge, justifying with the test used. Check with the partial sums lab.

Exercise 2 · Bandwidth and edges

Apply a 1 kHz square wave to a low-pass filter with variable cutoff frequency. Observe how the edges become rounded as harmonics are cut off, and relate it to the synthesis in the lab.

Exercise 3 · A series on a microcontroller

Program the sine with its Taylor series truncated at 3, 5 and 7 terms and compare the error against the library function, for angles from 0 to π/2. Also measure how many clock cycles each version takes.

08Common mistakes

  • Concluding that a series converges because an → 0. The harmonic series is the counterexample.
  • Using the geometric series formula with |r| ≥ 1.
  • Applying the ratio test when it gives 1 and drawing a conclusion anyway.
  • Forgetting the radius of convergence of a power series and using it outside it.
  • Believing that adding more harmonics makes the Gibbs overshoot disappear: it narrows, but its height stays the same.
  • Confusing the sum of the series with the general term.

09Self-assessment

What is 1 + 1/3 + 1/9 + 1/27 + …?

Geometric with r = 1/3: 1/(1 − 1/3) = 3/2.

Does Σ 1/n1.5 converge?

Yes: it is a p-series with p = 1.5 > 1.

And Σ n/(n + 1)?

No: the general term tends to 1, not to 0. It diverges.

Apply the ratio test to Σ 1/n!.

an+1/an = 1/(n + 1) → 0 < 1: it converges. Its sum is e − 1 if it starts at n = 1.

What harmonics does a symmetric square wave have?

Only the odd ones, with amplitude proportional to 1/n. That is why its spectrum decays slowly and it needs a lot of bandwidth.

Where does ejθ = cos θ + j sin θ come from?

From replacing x by jθ in the exponential series: the even terms give the cosine series and the odd ones give the sine series multiplied by j.

10Further reading

  • James Stewart. Single Variable Calculus: Early Transcendentals. 7th ed. (Spanish edition, “Cálculo de una variable. Trascendentes tempranas”), Cengage Learning, 2012. Chapter 11 covers sequences, series, tests and power series with many examples.
  • Tom M. Apostol. Calculus, Volume 1. 2nd ed. (Spanish edition, “Calculus, volumen 1”), Reverté. The tests proved, and the relation between series and improper integrals.
  • Alan V. Oppenheim and Alan S. Willsky. Signals and Systems. 2nd ed. (Spanish edition, “Señales y sistemas”), Prentice Hall, 1998. The natural continuation: Fourier series and transform applied to signals and circuits.
Development of the topic “Series” of Calculus I (Level 1), based on the curriculum of the UTN Electronic Engineering program, 2023 curriculum — Ordinance No. 1849 of the UTN Higher Council. Back to the Topic Map · catto.ar