Differential Equations › Section H · Boundary value problems and Fourier series › Topic H.7

Convergence of Fourier series

So far we have written an equals sign between a function and its Fourier series without asking whether the infinite sum really adds up to the function. This topic answers that: where the series converges to f, what it does at jumps, and when it may be differentiated term by term.

Does the series equal the function?

Earlier topics already hinted that the answer is "not everywhere". The sine series of 1 on \([0, L]\) gave 0 at both ends, and the half ramp of "Full Fourier series" had a periodic extension that jumps at \(x = \pm\pi\). An infinite sum of continuous functions can converge to something discontinuous, and at a jump it has to pick a value. The theorems below settle exactly what happens, for a large and practical class of functions. They are stated without proof, as is usual at this level, but each one can be checked against the examples we already have.

Piecewise smooth functions

A function \(f\) is piecewise smooth on \([-L, L]\) if the interval splits into finitely many pieces on each of which \(f\) and \(f'\) are continuous, with finite one-sided limits of both at the ends of each piece. So the only discontinuities allowed are finitely many jumps, and the graph may also have finitely many corners. Steps, ramps, square waves and the half ramp are all piecewise smooth. A function such as \(\frac{1}{x}\), which blows up, is not. We write \(f(a^-)\) and \(f(a^+)\) for the limits from the left and from the right at a point \(a\).

The convergence theorem

Let \(f\) be piecewise smooth on \([-L, L]\), and let \(\tilde{f}\) be its periodic extension, repeated every \(2L\). Then the Fourier series of \(f\) converges at every \(x\), and its sum is: \(\tilde{f}(x)\) wherever \(\tilde{f}\) is continuous; and

\frac{1}{2}\left[\tilde{f}(x^-) + \tilde{f}(x^+)\right]

the mean of the left and right limits, wherever \(\tilde{f}\) jumps. Inside \((-L, L)\) the extension equals \(f\), so the series equals \(f\) at every point of continuity there. At \(x = \pm L\) the two copies meet, and the series gives \(\frac{1}{2}[f(L^-) + f(-L^+)]\), which equals \(f(L)\) only when the ends match.

Worked example: the half ramp

Take \(f = 0\) on \([-\pi, 0)\) and \(f = x\) on \([0, \pi]\), whose series is

\frac{\pi}{4} - \frac{2}{\pi}\sum_{n \text{ odd}}\frac{\cos nx}{n^2} + \sum_{n=1}^{\infty}\frac{(-1)^{n+1}\sin nx}{n}

1. At \(x = 0\), \(f\) is continuous, so the series gives 0. 2. At \(x = \pi\), the extension jumps from \(f(\pi^-) = \pi\) to \(f(-\pi^+) = 0\), so the series gives \(\frac{\pi}{2}\). 3. At \(x = \frac{3\pi}{2}\), periodicity gives \(\tilde{f}(\frac{3\pi}{2}) = f(-\frac{\pi}{2}) = 0\). 4. A bonus: at \(x = \pi\) every sine is 0 and \(\cos n\pi = -1\) for odd \(n\), so \(\frac{\pi}{4} + \frac{2}{\pi}\sum_{n \text{ odd}}\frac{1}{n^2} = \frac{\pi}{2}\), which gives

1 + \frac{1}{9} + \frac{1}{25} + \cdots = \frac{\pi^2}{8}

Worked example: a square wave

The sine series of 1 on \([0, \pi]\) is \(\frac{4}{\pi}\sum_{n \text{ odd}}\frac{\sin nx}{n}\), and it represents the odd extension, a square wave equal to \(-1\) on \((-\pi, 0)\) and 1 on \((0, \pi)\). 1. On \(0 < x < \pi\), the extension is continuous, so the series converges to 1. 2. At \(x = 0\), it jumps from \(-1\) to 1, so the series gives \(\frac{-1 + 1}{2} = 0\), matching the fact that every term vanishes there. 3. At \(x = \pi\), it jumps from 1 to \(-1\), again giving 0. 4. At \(x = \frac{\pi}{2}\), \(\sin\frac{n\pi}{2}\) alternates \(1, -1, 1, \dots\) over odd \(n\), so \(1 = \frac{4}{\pi}(1 - \frac{1}{3} + \frac{1}{5} - \cdots)\), which says \(1 - \frac{1}{3} + \frac{1}{5} - \cdots = \frac{\pi}{4}\).

Sine and cosine series

A sine or cosine series is the full series of an extension, so the theorem carries over. For \(f\) piecewise smooth on \([0, L]\), the sine series converges to the odd extension. It is continuous and equals \(f\) on all of \([0, L]\) provided \(f\) is continuous there with \(f(0) = 0\) and \(f(L) = 0\); otherwise the odd extension jumps at an end and the series gives 0 there. The cosine series converges to the even extension, and because reflection creates no jumps, it equals \(f\) on all of \([0, L]\), ends included, whenever \(f\) is continuous there. So \(x(L - x)\) passes the sine test, \(x\) passes only the cosine test, and 1 passes the cosine test, being its own one-term cosine series.

The Gibbs phenomenon

Near a jump, partial sums do not settle down gently. They overshoot on each side by about 9% of the size of the jump, and adding more terms does not remove the overshoot; it only squeezes it closer to the jump. For the square wave between \(-1\) and 1, the jump is 2, and once more than a few terms are used the partial sums peak near 1.18: with 26 odd terms the peak is about 1.179, and with 501 it is still about 1.179. This does not contradict the theorem, because at each fixed \(x\) the sums do converge; the peak simply moves towards the jump. Engineers see the effect as ringing near sharp edges in filtered signals and compressed images.

Term-by-term differentiation

Differentiating a series term by term is safe only when its extension is continuous. The full series of \(f\) may be differentiated term by term, giving the series of \(f'\), if \(f\) is continuous, \(f'\) is piecewise smooth and \(f(-L) = f(L)\). A cosine series needs \(f\) continuous with \(f'\) piecewise smooth, and gives the sine series of \(f'\). A sine series also needs \(f(0) = f(L) = 0\), and gives the cosine series of \(f'\). Integration is gentler: the series of a piecewise smooth \(f\) may always be integrated one term at a time; the integrated series converges to the integral of \(f\), though it need not be a Fourier series itself.

Worked example: differentiate or not?

Take \(f(x) = x\) on \([0, L]\). 1. Its cosine series

\frac{L}{2} - \frac{4L}{\pi^2}\sum_{n \text{ odd}}\frac{1}{n^2}\cos\frac{n\pi x}{L}

qualifies, since \(x\) is continuous. 2. Differentiating gives \(\frac{4}{\pi}\sum_{n \text{ odd}}\frac{1}{n}\sin\frac{n\pi x}{L}\). 3. That is exactly the sine series of 1, and indeed \(f' = 1\). 4. Its sine series does not qualify, because \(f(L) = L \ne 0\). 5. Differentiating \(\frac{2L}{\pi}\sum\frac{(-1)^{n+1}}{n}\sin\frac{n\pi x}{L}\) anyway gives \(2\sum(-1)^{n+1}\cos\frac{n\pi x}{L}\), whose terms do not shrink to 0, so it diverges for every \(x\). The jump in the odd extension is the culprit.

Common mistakes to avoid

First, assuming the series equals \(f(L)\) at \(x = L\); it gives the average of \(f(L^-)\) and \(f(-L^+)\) for a full series. Second, averaging the function values on either side far from the jump instead of the one-sided limits at it. Third, expecting the Gibbs overshoot to shrink as terms are added. Fourth, differentiating a series term by term when the extension has a jump, as with the sine series of \(x\). Fifth, forgetting that outside the original interval the series follows the extension, not the formula for \(f\).

Key takeaways

For piecewise smooth \(f\), the Fourier series converges everywhere: to the periodic extension where it is continuous, and to \(\frac{1}{2}[\tilde{f}(x^-) + \tilde{f}(x^+)]\) at jumps, including at \(x = \pm L\) when \(f(-L) \ne f(L)\). A sine series equals \(f\) on \([0, L]\) if \(f\) is continuous and zero at both ends; a cosine series needs only continuity. Partial sums overshoot jumps by about 9% of the jump, the Gibbs phenomenon. Term-by-term differentiation needs a continuous extension; term-by-term integration is always allowed.

Flashcards

Flashcard

Piecewise smooth

f and f′ continuous on finitely many pieces, with finite one-sided limits

Only jumps and corners allowed.

Test your understanding

Question 1 of 5

The Fourier series of f(x) = x on [−π, π] converges to what value at x = π?

Question 2 of 5

f(x) = −1 on [−1, 0) and f(x) = 3 on [0, 1]. Its Fourier series converges to what value at x = 0?

Question 3 of 5

For which function does the sine series on [0, L] converge to f at every point of [0, L], ends included?

Question 4 of 5

Partial sums of the Fourier series of a square wave jumping between −1 and 1 peak at about what value near the jump?

Question 5 of 5

Which series may be differentiated term by term?

← Previous topicNext topic →