Fourier series

A sound repeats every few milliseconds but its trace is no sine curve. Which sines and cosines add up to it, and how much of each?

Where you are 6 in Systems and transforms

Why this exists

In an organ builder’s workshop, Mei and Isaac hold a pressure sensor at the mouth of a reed pipe. The trace repeats every few milliseconds, but it is no sine curve: the brass tongue of the reed lets in a sharp puff of air once per cycle. The ear hears a fundamental pitch with overtones at two, three, four times its frequency. How much of each is in the trace?

The same question sits inside this course. For y'' + \omega_0^2 y = f(t), Undetermined coefficients handles a forcing \cos \omega t, and superposition handles finite sums of them. A periodic forcing with corners or jumps, written as a sum of sines and cosines, could be handled one term at a time.

Orthogonal bases and projection onto a subspace finds such weights in \mathbb{R}^n: with an orthogonal basis, each weight is one dot product divided by a squared length. Fourier series carry that idea to functions, with an integral over one period as the dot product.

Definition

Throughout, f is a function of t and L > 0. A function is P-periodic when f(t + P) = f(t) for every t. A function given on (-L, L] extends in exactly one way to a 2L-periodic function on the line, its periodic extension.

A function is piecewise continuous on [-L, L] when it is continuous there except at finitely many points, at each of which the one-sided limits f(t^{+}) = \lim_{s \to t^{+}} f(s) and f(t^{-}) = \lim_{s \to t^{-}} f(s) exist and are finite. It is piecewise smooth when f and f' are both piecewise continuous (f' may fail to exist at the exceptional points). A periodic function has these properties when it has them on one period.

For piecewise continuous f and g on [-L, L], the inner product and the norm are

\langle f, g \rangle = \int_{-L}^{L} f(t)\,g(t)\,dt,
\lVert f \rVert = \sqrt{\langle f, f \rangle}.

Like the dot product of Dot product, length and orthogonality in n dimensions, it is symmetric, linear in each slot, and \langle f, f \rangle \ge 0 (Inner products and norms treats such products in general). Two functions are orthogonal when \langle f, g \rangle = 0. The trigonometric system of period 2L is

1,\ \cos\frac{\pi t}{L},\ \sin\frac{\pi t}{L},\ \cos\frac{2\pi t}{L},\ \sin\frac{2\pi t}{L},\ \dots

The Fourier coefficients of a piecewise continuous 2L-periodic f are

a_n = \frac{1}{L}\int_{-L}^{L} f(t)\cos\frac{n\pi t}{L}\,dt \quad (n \ge 0),
b_n = \frac{1}{L}\int_{-L}^{L} f(t)\sin\frac{n\pi t}{L}\,dt \quad (n \ge 1),

and its Fourier series is

\begin{aligned} f(t) \sim \frac{a_0}{2} + \sum_{n=1}^{\infty} \Big( &a_n \cos\frac{n\pi t}{L} \\ &+ b_n \sin\frac{n\pi t}{L} \Big). \end{aligned}

The sign \sim says only that the coefficients come from f; whether the series converges, and to what, is Theorem 6. The partial sum S_N stops at n = N, and the two terms with index n form the nth harmonic. A trigonometric polynomial of degree at most N is a sum

T(t) = \frac{c_0}{2} + \sum_{n=1}^{N}\Big(c_n \cos\frac{n\pi t}{L} + d_n \sin\frac{n\pi t}{L}\Big);

these form a space V_N. Because f is periodic, the integrals may be taken over any interval of length 2L (Exercise 14).

Intuition

Sample f and g at points t_i with spacing \Delta t. The dot product of the sample vectors, times \Delta t, is a Riemann sum for \langle f, g \rangle. So the inner product is a dot product with one coordinate for every t, and orthogonality, length and projection keep their meaning.

The projection of f onto the line through \displaystyle \cos\frac{n\pi t}{L} has weight \displaystyle \langle f, \cos\frac{n\pi t}{L}\rangle divided by \displaystyle \lVert \cos\frac{n\pi t}{L} \rVert^2 = L (Theorem 1), which is a_n. The projection onto 1 has weight \displaystyle \frac{\langle f, 1 \rangle}{\langle 1, 1 \rangle} = \frac{1}{2L}\int_{-L}^{L} f\,dt, the average of f, which is \displaystyle \frac{a_0}{2}: that is why a_0 carries the \displaystyle \frac12. The partial sum S_N is the projection of f onto V_N, its closest trigonometric polynomial (Theorem 3).

The figure shows the reed puff of Example 2. Away from the jumps, S_{25} hugs the function far better than S_3. At each jump the series converges to the midpoint, and just beside it S_{25} overshoots.

−2 −1 0 1 2 3 4 5 0 1 2
Figure 1The reed puff of Example 2 (dashed), with S_3 (gray) and S_{25} (ink). At each jump the series converges to the midpoint, marked by a dot; beside each jump S_{25} still overshoots.

Results

Theorem 1 (orthogonality). For integers m, n \ge 0,

\begin{aligned} &\int_{-L}^{L} \cos\frac{m\pi t}{L}\cos\frac{n\pi t}{L}\,dt \\ &\qquad = \begin{cases} 0, & m \ne n, \\ L, & m = n \ge 1, \\ 2L, & m = n = 0, \end{cases} \end{aligned}

for integers m, n \ge 1,

\begin{aligned} &\int_{-L}^{L} \sin\frac{m\pi t}{L}\sin\frac{n\pi t}{L}\,dt \\ &\qquad = \begin{cases} 0, & m \ne n, \\ L, & m = n, \end{cases} \end{aligned}

and \displaystyle \int_{-L}^{L} \cos\frac{m\pi t}{L}\sin\frac{n\pi t}{L}\,dt = 0 for all m \ge 0 and n \ge 1. So the trigonometric system is an orthogonal set.

Theorem 2 (the coefficients are forced). If f is a trigonometric polynomial T as above, then a_n = c_n and b_n = d_n for n \le N, and a_n = b_n = 0 for n > N. The same holds when f is the sum of a trigonometric series that converges uniformly on [-L, L].

Theorem 3 (best approximation and Bessel’s inequality). Let f be piecewise continuous and 2L-periodic. Among all trigonometric polynomials T of degree at most N, the partial sum S_N alone gives the smallest \lVert f - T \rVert, and

\begin{aligned} \lVert f - S_N \rVert^2 &= \lVert f \rVert^2 \\ &\quad - L\Big(\frac{a_0^2}{2} + \sum_{n=1}^{N}(a_n^2 + b_n^2)\Big). \end{aligned}

Hence \sum (a_n^2 + b_n^2) converges, and

\frac{a_0^2}{2} + \sum_{n=1}^{\infty}(a_n^2 + b_n^2) \le \frac{1}{L}\int_{-L}^{L} f(t)^2\,dt.

Theorem 4 (even and odd functions). If f is even, then b_n = 0 and \displaystyle a_n = \frac{2}{L}\int_0^L f(t)\cos\frac{n\pi t}{L}\,dt: a cosine series. If f is odd, then a_n = 0 and \displaystyle b_n = \frac{2}{L}\int_0^L f(t)\sin\frac{n\pi t}{L}\,dt: a sine series. A function given only on (0, L) has a sine series, from its odd extension, and a cosine series, from its even extension: its half-range expansions.

Theorem 5 (coefficients of a derivative). Let f be continuous, 2L-periodic and piecewise smooth, and let \alpha_n, \beta_n be the Fourier coefficients of f'. Then \alpha_0 = 0 and, for n \ge 1,

\alpha_n = \frac{n\pi}{L}\,b_n, \qquad \beta_n = -\frac{n\pi}{L}\,a_n,

which is what differentiating the series term by term would give.

Theorem 6 (convergence). Let f be 2L-periodic and piecewise smooth. At every t the Fourier series of f converges, and its sum is

\frac{f(t^{+}) + f(t^{-})}{2},

which is f(t) wherever f is continuous. If f is continuous everywhere, the convergence is uniform. For every piecewise continuous f, equality holds in Bessel’s inequality (Parseval’s identity).

Theorem 6 is stated without proof, except its uniform part (Example 5). The rest is proved in a first course in real analysis, with the Dirichlet kernel; Pointwise and uniform convergence holds the limit theory it needs.

Why it is true

Theorem 1. For an integer k \ne 0,

\int_{-L}^{L}\cos\frac{k\pi t}{L}\,dt = \frac{L}{k\pi}\Big[\sin\frac{k\pi t}{L}\Big]_{-L}^{L} = 0,

because \sin(\pm k\pi) = 0; for k = 0 the integral is 2L. The identity \displaystyle \cos A \cos B = \frac12\big(\cos(A - B) + \cos(A + B)\big) turns the product of cosines into two such integrals, with k = m - n and k = m + n. If m \ne n, both k are nonzero and the integral is 0. If m = n \ge 1, only k = 0 contributes, giving \displaystyle \frac12 \cdot 2L = L; if m = n = 0 the integrand is 1. The sine case uses \displaystyle \sin A \sin B = \frac12\big(\cos(A - B) - \cos(A + B)\big) the same way (Exercise 16). Finally \displaystyle \cos\frac{m\pi t}{L}\sin\frac{n\pi t}{L} is even times odd, so odd, and an odd function integrates to 0 over [-L, L].

Theorem 2. The inner product of f with \displaystyle \cos\frac{m\pi t}{L}, m \ge 1, splits by linearity into 2N + 1 integrals, and by Theorem 1 all vanish except the one from \displaystyle c_m\cos\frac{m\pi t}{L}, which is c_m L (there is none if m > N). So \displaystyle a_m = \frac1L\langle f, \cos\frac{m\pi t}{L}\rangle = c_m. With m = 0 the surviving term is \displaystyle \frac{c_0}{2}\cdot 2L, so a_0 = c_0, and the sines give b_m = d_m the same way. A uniformly convergent series times a bounded function is still uniformly convergent and may be integrated term by term (Pointwise and uniform convergence; Representing functions as power series for power series), so the same computation works.

Theorem 3. First, f - S_N is orthogonal to all of V_N: for 1 \le m \le N, Theorem 1 gives \displaystyle \langle S_N, \cos\frac{m\pi t}{L} \rangle = a_m L, which is \displaystyle \langle f, \cos\frac{m\pi t}{L} \rangle, and likewise for the sines and for 1. Now let T \in V_N. Since S_N - T \in V_N, the pieces of f - T = (f - S_N) + (S_N - T) are orthogonal, and expanding \langle f - T, f - T \rangle by linearity kills the cross term:

\lVert f - T \rVert^2 = \lVert f - S_N \rVert^2 + \lVert S_N - T \rVert^2.

If T \ne S_N, then S_N - T is continuous and not identically zero (Theorem 2), so its square has positive integral and \lVert f - T \rVert > \lVert f - S_N \rVert. With T = 0 the identity reads \lVert f \rVert^2 = \lVert f - S_N \rVert^2 + \lVert S_N \rVert^2, and Theorem 1, which makes every cross term integrate to 0, gives

\lVert S_N \rVert^2 = \frac{a_0^2}{4}\cdot 2L + \sum_{n=1}^{N}(a_n^2 + b_n^2)L.

That is the formula. Its left side is at least 0, so the partial sums of the nonnegative series \sum (a_n^2 + b_n^2) are bounded by \displaystyle \frac{1}{L}\lVert f \rVert^2 - \frac{a_0^2}{2}; the series converges, and the bound passes to the limit.

Theorem 4. If f is even, \displaystyle f(t)\cos\frac{n\pi t}{L} is even and \displaystyle f(t)\sin\frac{n\pi t}{L} is odd. The odd integrand gives b_n = 0, and for the even one \int_{-L}^{L} = 2\int_0^L. The odd case is Exercise 15, and the half-range statements follow because the extensions are odd and even.

Theorem 5. Write \displaystyle c(t) = \cos\frac{n\pi t}{L} and \displaystyle s(t) = \sin\frac{n\pi t}{L}. Let -L = t_0 < t_1 < \dots < t_k = L include every point where f' fails to exist or jumps. On each [t_{j-1}, t_j], integration by parts (Integration by parts) gives

\int_{t_{j-1}}^{t_j} f'c\,dt = \Big[f c\Big]_{t_{j-1}}^{t_j} + \frac{n\pi}{L}\int_{t_{j-1}}^{t_j} f s\,dt.

Summing over j, the brackets telescope because f is continuous, leaving f(L)\cos n\pi - f(-L)\cos(-n\pi) = 0, since f(L) = f(-L). Dividing by L gives \displaystyle \alpha_n = \frac{n\pi}{L}b_n. With s in place of c, the brackets vanish at \pm L because \sin(\pm n\pi) = 0, and \displaystyle s' = \frac{n\pi}{L}c gives \displaystyle \beta_n = -\frac{n\pi}{L}a_n. Finally \displaystyle \alpha_0 = \frac1L\big(f(L) - f(-L)\big) = 0.

Worked examples

Example 1

A tone with three harmonics

A test tone in the workshop is f(t) = 8\sin^3 t + 6\cos^2 t, with L = \pi. Find its Fourier series.

Solution

Identities turn the cube and the square into harmonics. From \sin 3t = 3\sin t - 4\sin^3 t, 8\sin^3 t = 6\sin t - 2\sin 3t, and from \cos 2t = 2\cos^2 t - 1, 6\cos^2 t = 3 + 3\cos 2t. So

f(t) = 3 + 6\sin t + 3\cos 2t - 2\sin 3t,

a trigonometric polynomial, and by Theorem 2 this is its Fourier series: a_0 = 6 (the constant 3 is \displaystyle \frac{a_0}{2}), a_2 = 3, b_1 = 6, b_3 = -2, and every other coefficient is 0. No integral was needed.

Example 2

The reed’s puff of air

With t in milliseconds, Mei models the pressure at the reed by f(t) = 2 for 0 < t < 1 and f(t) = 0 on the rest of (-2, 2], repeated with period 4. Find its Fourier series, the sum of the series at t = 0 and t = 1, and from it the sum \displaystyle 1 - \frac13 + \frac15 - \cdots.

Solution

Here L = 2 and f is 2 on (0, 1) and 0 on the rest of the period, so the factor \displaystyle \frac1L = \frac12 cancels the height 2:

\begin{aligned} a_0 &= \int_0^1 dt = 1, \\ a_n &= \int_0^1 \cos\tfrac{n\pi t}{2}\,dt = \tfrac{2}{n\pi}\sin\tfrac{n\pi}{2}, \\ b_n &= \int_0^1 \sin\tfrac{n\pi t}{2}\,dt = \tfrac{2}{n\pi}\Big(1 - \cos\tfrac{n\pi}{2}\Big). \end{aligned}

The constant \displaystyle \frac{a_0}{2} = \frac12 is the average pressure. The first harmonics are

\begin{aligned} f(t) \sim \tfrac12 &+ \tfrac{2}{\pi}\Big(\cos\tfrac{\pi t}{2} + \sin\tfrac{\pi t}{2}\Big) \\ &+ \tfrac{2}{\pi}\sin \pi t \\ &+ \tfrac{2}{3\pi}\Big(\!-\cos\tfrac{3\pi t}{2} + \sin\tfrac{3\pi t}{2}\Big) + \cdots \end{aligned}

The function is piecewise smooth, so by Theorem 6 the series converges to f(t) wherever f is continuous. At t = 0 the one-sided limits are 0 and 2, so it converges to 1, and likewise at t = 1. At t = 0 every sine is 0 and every cosine is 1:

1 = \frac12 + \sum_{n=1}^{\infty}\frac{2}{n\pi}\sin\frac{n\pi}{2}.

Since \displaystyle \sin\frac{n\pi}{2} is 0 for even n and runs 1, -1, 1, \dots for n = 1, 3, 5, \dots, this says \displaystyle \frac{2}{\pi}\big(1 - \frac13 + \frac15 - \cdots\big) = \frac12, so \displaystyle 1 - \frac13 + \frac15 - \cdots = \frac{\pi}{4}. The coefficients shrink only like \displaystyle \frac1n, which is why the partial sums in the figure converge slowly.

Example 3

A triangle wave, and two sums from it

The organ’s tremulant makes the wind pressure rise and fall in a triangle wave, f(t) = |t| on (-2, 2], extended with period 4. Find its Fourier series, then use Theorem 6 and Parseval’s identity to find \displaystyle \sum_{n \text{ odd}} \frac{1}{n^2} and \displaystyle \sum_{n=1}^{\infty}\frac{1}{n^4}.

Solution

The function is even, so by Theorem 4 it has a cosine series. With L = 2, \displaystyle a_0 = \frac{2}{2}\int_0^2 t\,dt = 2, and integration by parts with u = t gives

\begin{aligned} a_n &= \int_0^2 t\cos\tfrac{n\pi t}{2}\,dt \\ &= \Big[\tfrac{2t}{n\pi}\sin\tfrac{n\pi t}{2}\Big]_0^2 - \tfrac{2}{n\pi}\int_0^2 \sin\tfrac{n\pi t}{2}\,dt \\ &= \tfrac{4}{n^2\pi^2}\big((-1)^n - 1\big). \end{aligned}

So \displaystyle a_n = -\frac{8}{n^2\pi^2} for odd n and a_n = 0 for even n \ge 2:

f(t) \sim 1 - \frac{8}{\pi^2}\sum_{n \text{ odd}} \frac{1}{n^2}\cos\frac{n\pi t}{2}.

The triangle wave is continuous and piecewise smooth, so by Theorem 6 the series converges to f(t) at every t, uniformly; already S_1 is close (second figure). The coefficients fall like \displaystyle \frac{1}{n^2}, against \displaystyle \frac1n for the jumps of Example 2.

At t = 0: \displaystyle 0 = 1 - \frac{8}{\pi^2}\sum_{n \text{ odd}}\frac{1}{n^2}, so \displaystyle \sum_{n \text{ odd}}\frac{1}{n^2} = \frac{\pi^2}{8}.

For Parseval’s identity, \displaystyle \frac{1}{L}\int_{-L}^{L} f^2\,dt = \frac12\int_{-2}^{2} t^2\,dt = \frac83 and \displaystyle \frac{a_0^2}{2} = 2, so

2 + \frac{64}{\pi^4}\sum_{n \text{ odd}}\frac{1}{n^4} = \frac83,

and \displaystyle \sum_{n \text{ odd}}\frac{1}{n^4} = \frac{\pi^4}{96}. If \displaystyle S = \sum_{n=1}^{\infty}\frac{1}{n^4}, the even terms add to \displaystyle \sum_{k=1}^{\infty} \frac{1}{(2k)^4} = \frac{S}{16}, so the odd terms add to \displaystyle \frac{15S}{16} = \frac{\pi^4}{96} and \displaystyle S = \frac{\pi^4}{90}.

−6 −4 −2 0 2 4 6 0 1 2
Figure 2The triangle wave of Example 3 and its partial sum \displaystyle S_1 = 1 - \frac{8}{\pi^2}\cos\frac{\pi t}{2} (dashed). With no jumps, one harmonic already comes close.
Example 4

A periodic forcing, one harmonic at a time

Isaac models a weight on a spring inside the tremulant by y'' + 2y = f(t), where y is a function of t and f is the triangle wave of Example 3. Find the 4-periodic solution, show it is the only one, and compare its first two harmonics with those of f.

Solution

For one term A\cos\omega t with \omega^2 \ne 2, the trial y = C\cos\omega t of Undetermined coefficients gives (2 - \omega^2)C = A, and the constant term 1 gives \displaystyle y = \frac12. Here \displaystyle \omega = \frac{n\pi}{2} with n odd, and \displaystyle \frac{n^2\pi^2}{4} = 2 would need \displaystyle n = \frac{2\sqrt2}{\pi}, not an integer, so no harmonic is resonant. With \displaystyle A = -\frac{8}{\pi^2 n^2}, superposition gives

y_p(t) = \frac12 + \sum_{n \text{ odd}} c_n\cos\frac{n\pi t}{2},
c_n = \frac{32}{\pi^2 n^2(n^2\pi^2 - 8)}.

The infinite sum is a solution: c_n is of order \displaystyle \frac{1}{n^4}, so the twice-differentiated terms have coefficients of order \displaystyle \frac{1}{n^2}, and by the Weierstrass M-test the series for y_p, y_p' and y_p'' converge uniformly, which allows term-by-term differentiation (Pointwise and uniform convergence). Then y_p'' + 2y_p is the series of f, which equals f by Example 3.

Any other solution differs from y_p by \displaystyle R\cos(\sqrt2\,t - \delta) (Combining a sine and a cosine into one wave), whose periods for R \ne 0 are \displaystyle k\cdot\frac{2\pi}{\sqrt2}; period 4 would need \displaystyle k = \frac{2\sqrt2}{\pi} \approx 0.90, not a positive integer. So y_p is unique.

The first harmonic of f has amplitude \displaystyle \frac{8}{\pi^2} \approx 0.811; in y_p it becomes c_1 \approx 1.734. The third drops from \displaystyle \frac{8}{9\pi^2} \approx 0.090 to c_3 \approx 0.00446. The frequency \displaystyle \frac{\pi}{2} lies nearest the natural frequency \displaystyle \sqrt2, so the spring turns the triangle wave into nearly a pure sinusoid.

Example 5

Proof: continuous and piecewise smooth gives uniform convergence

Prove that if f is continuous, 2L-periodic and piecewise smooth, then \sum_{n=1}^{\infty}\big(|a_n| + |b_n|\big) converges, and the Fourier series converges to f uniformly on the whole line.

Solution

Let \alpha_n, \beta_n be the coefficients of the piecewise continuous f'. By Theorem 5, \displaystyle |a_n| = \frac{L}{n\pi}|\beta_n| and \displaystyle |b_n| = \frac{L}{n\pi}|\alpha_n| for n \ge 1. Write \gamma_n = |\alpha_n| + |\beta_n|. For each N, the Cauchy-Schwarz inequality in \mathbb{R}^N (Dot product, length and orthogonality in n dimensions), applied to the vectors with entries \displaystyle \frac1n and \gamma_n, gives

\begin{aligned} \sum_{n=1}^{N}\big(|a_n| + |b_n|\big) &= \frac{L}{\pi}\sum_{n=1}^{N}\frac{\gamma_n}{n} \\ &\le \frac{L}{\pi}\Big(\sum_{n=1}^{N}\frac{1}{n^2}\Big)^{1/2} \\ &\qquad \cdot \Big(\sum_{n=1}^{N}\gamma_n^2\Big)^{1/2}. \end{aligned}

Since 2|\alpha_n||\beta_n| \le \alpha_n^2 + \beta_n^2, each \gamma_n^2 \le 2(\alpha_n^2 + \beta_n^2), and Bessel’s inequality for f' bounds \sum(\alpha_n^2 + \beta_n^2) by \displaystyle \frac1L\lVert f' \rVert^2. With \displaystyle \sum \frac{1}{n^2} convergent, the partial sums of the nonnegative series \sum(|a_n| + |b_n|) are bounded, so it converges.

For every t, the nth harmonic is at most |a_n| + |b_n| in absolute value, so by the Weierstrass M-test the Fourier series converges uniformly on the line. By Theorem 6 its sum at t is \displaystyle \frac{f(t^+) + f(t^-)}{2} = f(t), because f is continuous.

Boundaries

  • The coefficients need integrals that exist: \displaystyle f(t) = \frac1t on (-1, 1] is not piecewise continuous and has no Fourier series in this sense.
  • Continuity alone does not give convergence: some continuous periodic functions have Fourier series that diverge at a point.
  • Changing f at finitely many points changes no coefficient, so the series ignores the value of f at a jump, and \lVert f \rVert = 0 does not force f = 0 everywhere.
  • Near a jump the convergence is never uniform, since a uniform limit of continuous functions is continuous. Beside each jump S_N overshoots by a fixed fraction of the jump, a little under a tenth, that does not shrink as N grows (the Gibbs phenomenon, in the first figure).
  • Term-by-term differentiation needs Theorem 5’s hypotheses. Differentiating Example 2’s series gives, at t = 0, the terms \displaystyle 1 - \cos\frac{n\pi}{2}, which do not tend to 0, so the result diverges there.

Where this goes next

The trigonometric system is a set of eigenfunctions: y'' + \lambda y = 0 with y(-L) = y(L) and y'(-L) = y'(L) has nonzero solutions exactly when \displaystyle \lambda = \big(\frac{n\pi}{L}\big)^2, namely \displaystyle \cos\frac{n\pi t}{L} and \displaystyle \sin\frac{n\pi t}{L}, orthogonal like the eigenvectors of a symmetric matrix (Eigenvalues and eigenvectors). Separation of variables for the heat and wave equations, beyond this course, expands initial data in such eigenfunctions with exactly these coefficient formulas. With the The complex exponential and logarithm, each pair \cos, \sin merges into e^{in\pi t/L}. A function that is not periodic needs all frequencies at once: the Fourier transform, a relative of the The Laplace transform.

Exercises

Coefficients

  1. Find the Fourier series of the 2\pi-periodic function f(t) = 4\sin t\cos 2t.
  2. Let f(t) = 0 for -1 < t \le 0 and f(t) = t for 0 < t \le 1, extended with period 2. Find a_0, a_n and b_n.
  3. Find the Fourier series of the 2-periodic extension of f(t) = t^2, -1 < t \le 1.
  4. Find the Fourier series of f(t) = |\sin t|, taking L = \pi.
  5. Find the sine series of f(t) = 1 - t on 0 < t < 1.
  6. Find the cosine series of f(t) = 1 - t on 0 < t < 1, and compare how fast its coefficients shrink with those of Exercise 5.

Convergence, sums and equations

  1. For the function of Exercise 2, find the sum of its Fourier series at t = 0, \displaystyle t = \frac12, t = 1 and t = 3.
  2. Use Exercise 3 at t = 0 and at t = 1 to find \displaystyle \sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2} and \displaystyle \sum_{n=1}^{\infty}\frac{1}{n^2}.
  3. Use Exercise 4 at \displaystyle t = \frac{\pi}{2} to find \displaystyle \sum_{k=1}^{\infty}\frac{(-1)^k}{4k^2 - 1}.
  4. Apply Parseval’s identity to the odd extension in Exercise 5 to find \displaystyle \sum_{n=1}^{\infty}\frac{1}{n^2} a second way.
  5. Let g be the even extension in Exercise 6. Find \lVert g - S_1 \rVert^2 exactly and to three significant figures.
  6. With g as in Exercise 11, find the 2-periodic solution of y'' + 5y = g(t), give the coefficient of \cos \pi t to three significant figures, and explain why there is only one such solution.
  7. For which \omega_0 > 0 does y'' + \omega_0^2\,y = |\sin t| have no 2\pi-periodic solution? Use Exercise 4 and Theorem 5.

Proofs

  1. Let f be 2L-periodic and piecewise continuous. Prove that \int_c^{c+2L} f(t)\,dt = \int_{-L}^{L} f(t)\,dt for every real c.
  2. Prove the odd case of Theorem 4.
  3. Prove the sine case of Theorem 1.
  4. Prove that a_n \to 0 and b_n \to 0 for every piecewise continuous 2L-periodic f.
  5. For a trigonometric polynomial T with coefficients c_n, d_n as in Theorem 2, prove that \displaystyle \lVert T \rVert^2 = L\big(\frac{c_0^2}{2} + \sum_{n=1}^{N}(c_n^2 + d_n^2)\big), and deduce that if T(t) = 0 for all but finitely many t in [-L, L], every coefficient is 0.
  6. Let f be 2L-periodic and piecewise smooth, with f(t_0^{+}) \ne f(t_0^{-}) at some t_0. Prove that \sum_{n=1}^{\infty}\big(|a_n| + |b_n|\big) diverges.
  7. Prove that \lVert f - S_N \rVert never increases as N grows.
Answers
  1. f(t) = 2\sin 3t - 2\sin t: b_1 = -2, b_3 = 2, all other coefficients 0. By \displaystyle \sin A\cos B = \frac12\big(\sin(A + B) + \sin(A - B)\big), 4\sin t\cos 2t = 2\sin 3t + 2\sin(-t), and Theorem 2 applies.
  2. \displaystyle a_0 = \frac12, \displaystyle a_n = \frac{(-1)^n - 1}{n^2\pi^2}, \displaystyle b_n = \frac{(-1)^{n+1}}{n\pi}. With L = 1, a_0 = \int_0^1 t\,dt, and by parts \displaystyle \int_0^1 t\cos n\pi t\,dt = \frac{\cos n\pi - 1}{n^2\pi^2} and \displaystyle \int_0^1 t\sin n\pi t\,dt = -\frac{\cos n\pi}{n\pi}.
  3. \displaystyle t^2 \sim \frac13 + \sum_{n=1}^{\infty}\frac{4(-1)^n}{n^2\pi^2}\cos n\pi t. The function is even, so b_n = 0; \displaystyle a_0 = 2\int_0^1 t^2\,dt = \frac23, and a_n = 2\int_0^1 t^2\cos n\pi t\,dt, by parts twice.
  4. \displaystyle |\sin t| \sim \frac{2}{\pi} - \frac{4}{\pi}\sum_{k=1}^{\infty}\frac{\cos 2kt}{4k^2 - 1}. The function is even, \displaystyle a_0 = \frac{2}{\pi}\int_0^\pi \sin t\,dt = \frac{4}{\pi}, and \displaystyle \sin t\cos nt = \frac12\big(\sin(1 + n)t + \sin(1 - n)t\big) gives \displaystyle a_n = \frac{2(1 + (-1)^n)}{\pi(1 - n^2)} for n \ne 1, while \displaystyle a_1 = \frac1\pi\int_0^\pi \sin 2t\,dt = 0. So odd n give 0 and \displaystyle a_{2k} = -\frac{4}{\pi(4k^2 - 1)}.
  5. \displaystyle 1 - t \sim \sum_{n=1}^{\infty}\frac{2}{n\pi}\sin n\pi t on 0 < t < 1. By parts, \displaystyle \int_0^1 (1 - t)\sin n\pi t\,dt = \frac{1}{n\pi} (the boundary term at t = 0; the remaining \int_0^1 \cos n\pi t\,dt is 0), and b_n is twice this.
  6. \displaystyle 1 - t \sim \frac12 + \sum_{n \text{ odd}}\frac{4}{n^2\pi^2}\cos n\pi t: a_0 = 2\int_0^1 (1 - t)\,dt = 1 and \displaystyle a_n = \frac{2(1 - (-1)^n)}{n^2\pi^2}. These shrink like \displaystyle \frac{1}{n^2}, against \displaystyle \frac1n in Exercise 5, since the even extension 1 - |t| is continuous and the odd one jumps at t = 0.
  7. 0, \displaystyle \frac12, \displaystyle \frac12, \displaystyle \frac12. At t = 0 both one-sided limits are 0; at \displaystyle t = \frac12 the function is continuous with value \displaystyle \frac12; at t = 1 the limits are 1 and f(-1^{+}) = 0; and t = 3 is t = 1 moved one period.
  8. \displaystyle \frac{\pi^2}{12} and \displaystyle \frac{\pi^2}{6}. The extension is continuous, so the series equals t^2 on [-1, 1]. At t = 0: \displaystyle 0 = \frac13 + \frac{4}{\pi^2}\sum\frac{(-1)^n}{n^2}. At t = 1, where \cos n\pi = (-1)^n: \displaystyle 1 = \frac13 + \frac{4}{\pi^2}\sum\frac{1}{n^2}.
  9. \displaystyle \frac12 - \frac{\pi}{4}. The function is continuous, and at \displaystyle t = \frac\pi2, \cos k\pi = (-1)^k gives \displaystyle 1 = \frac2\pi - \frac4\pi\sum\frac{(-1)^k}{4k^2 - 1}, so the sum is \displaystyle \big(\frac2\pi - 1\big)\frac\pi4.
  10. \displaystyle \frac{\pi^2}{6}. The odd extension h has every a_n = 0 and \displaystyle \int_{-1}^{1} h^2\,dt = 2\int_0^1 (1 - t)^2\,dt = \frac23, so \displaystyle \sum\frac{4}{n^2\pi^2} = \frac23.
  11. \displaystyle \frac16 - \frac{16}{\pi^4} \approx 0.00241. By Theorem 3 with L = 1: \displaystyle \lVert g \rVert^2 = \frac23, a_0 = 1, \displaystyle a_1 = \frac{4}{\pi^2}, b_1 = 0, so \displaystyle \lVert g - S_1 \rVert^2 = \frac23 - \big(\frac12 + \frac{16}{\pi^4}\big).
  12. \displaystyle y_p = \frac{1}{10} + \sum_{n \text{ odd}} C_n\cos n\pi t with \displaystyle C_n = \frac{4}{n^2\pi^2(5 - n^2\pi^2)}; the coefficient of \cos\pi t is \displaystyle \frac{4}{\pi^2(5 - \pi^2)} \approx -0.0832. A term A\cos n\pi t gives \displaystyle \frac{A}{5 - n^2\pi^2}\cos n\pi t, never resonant as n^2\pi^2 > 5; coefficients of order \displaystyle \frac{1}{n^4} justify the sum as in Example 4. Another solution differs by \displaystyle R\cos(\sqrt5\,t - \delta), which with R \ne 0 has period 2 only if \displaystyle \frac{\sqrt5}{\pi} \approx 0.71 is a positive integer.
  13. Exactly \omega_0 = 2, 4, 6, \dots. A 2\pi-periodic solution y has y'' continuous, so Theorem 5 applies to y and y', and comparing cosine coefficients gives (\omega_0^2 - n^2)A_n = a_n, with A_n those of y. If \omega_0 = 2k, then n = 2k gives \displaystyle 0 = a_{2k} = -\frac{4}{\pi(4k^2 - 1)}, a contradiction. Otherwise \displaystyle A_0 = \frac{a_0}{\omega_0^2} and \displaystyle A_{2k} = \frac{a_{2k}}{\omega_0^2 - 4k^2} give a solution, as in Example 4.
  14. Split \int_c^{c+2L} f\,dt = \int_c^{L} f\,dt + \int_L^{c+2L} f\,dt (oriented integrals). In the second, t = u + 2L and periodicity give \int_{-L}^{c} f(u)\,du; the pieces add to \int_{-L}^{L} f\,dt.
  15. Let f be odd. Then \displaystyle f(t)\cos\frac{n\pi t}{L} is odd and \displaystyle f(t)\sin\frac{n\pi t}{L} is even, as a product of two odd functions. For odd g, t = -u gives \int_{-L}^{0} g\,dt = -\int_0^L g\,du, so \int_{-L}^{L} g = 0 and a_n = 0; for even g it gives \int_{-L}^{L} g = 2\int_0^L g, so \displaystyle b_n = \frac{2}{L}\int_0^L f(t)\sin\frac{n\pi t}{L}\,dt.
  16. Use \displaystyle \sin A\sin B = \frac12\big(\cos(A - B) - \cos(A + B)\big) with \displaystyle A = \frac{m\pi t}{L}, \displaystyle B = \frac{n\pi t}{L}, m, n \ge 1. As m + n \ne 0, the second cosine integrates to 0 over [-L, L], as in the proof of Theorem 1. If m \ne n so does the first, giving 0; if m = n the first is 1, giving \displaystyle \frac12 \cdot 2L = L.
  17. By Theorem 3, \sum(a_n^2 + b_n^2) converges, so its terms tend to 0, and \displaystyle |a_n|, |b_n| \le \sqrt{a_n^2 + b_n^2}.
  18. Expand \langle T, T \rangle by linearity. By Theorem 1, products of two different functions of the system integrate to 0, and the squares give \displaystyle \frac{c_0^2}{4}\cdot 2L, c_n^2 L and d_n^2 L, which add to the formula. If T = 0 except at finitely many points, T^2 integrates to 0, so the nonnegative terms \displaystyle \frac{c_0^2}{2}, c_n^2, d_n^2 add to 0 and each is 0.
  19. Suppose the series converged. By the Weierstrass M-test the Fourier series would converge uniformly, and its sum g, a uniform limit of continuous functions, would be continuous (Pointwise and uniform convergence). By Theorem 6, g = f at every t \ne t_0 near t_0, since f has finitely many discontinuities per period. Then f(t_0^{+}) = \lim_{t \to t_0^{+}} g(t) = g(t_0), and likewise f(t_0^{-}) = g(t_0), a contradiction.
  20. S_N lies in V_N \subseteq V_{N+1}, and by Theorem 3, S_{N+1} is the point of V_{N+1} closest to f, so \lVert f - S_{N+1} \rVert \le \lVert f - S_N \rVert.
math.wiki · updated 2026-11-17 · CC-BY-SA-4.0