Skip to content

Fourier series practice problems with solutions

Type
Practice problems
Problems
19
Levels
Easy · Medium · Hard

This collection of Fourier series problems covers every major topic encountered in undergraduate mathematics and engineering courses: computing Fourier coefficients, recognising even and odd functions, deriving half-range sine and cosine series, applying Parseval’s identity, and using Fourier series to solve partial differential equations such as the heat equation and wave equation. Problems are arranged by conceptual theme and progress from straightforward coefficient calculations to challenging boundary-value problems, giving you a structured path from first principles to advanced applications.

Contents7 sections

Fourier Coefficients and the Euler–Fourier Formulas

Before tackling complex waveforms, you must be confident computing the three Fourier coefficients a0a_0, ana_n, and bnb_n from the Euler–Fourier formulas. The problems below build that fluency on functions defined over a period of 2π2\pi and over a general period 2L2L, covering piecewise-constant, polynomial, and exponential functions.

Problem 1: Square Wave on [−π,π][-\pi, \pi]

Easy

Consider the 2π2\pi-periodic function defined on one period by

f(x)={−1,−π<x<01,0<x≤πf(x) = \begin{cases} -1, & -\pi < x < 0 \\ 1, & 0 < x \leq \pi \end{cases}
  1. Compute all three Fourier coefficients a0a_0, ana_n, and bnb_n.
  2. Write out the full Fourier series and identify which terms are zero and why.
Hint
Because ff is an odd function (f(−x)=−f(x)f(-x) = -f(x)), all cosine coefficients vanish immediately. Focus your integration effort entirely on the sine coefficients bnb_n.
View Solution
Solution to part 1:

Since ff is odd, a0=0a_0 = 0 and an=0a_n = 0 for all n≥1n \geq 1. For bnb_n:

bn=1π∫−ππf(x)sin⁡(nx) dx=2π∫0πsin⁡(nx) dx=2π[−cos⁡(nx)n]0πb_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\sin(nx)\,dx = \frac{2}{\pi}\int_0^{\pi}\sin(nx)\,dx = \frac{2}{\pi}\left[-\frac{\cos(nx)}{n}\right]_0^{\pi} =2nπ(1−cos⁡(nπ))=2nπ(1−(−1)n)= \frac{2}{n\pi}\bigl(1 - \cos(n\pi)\bigr) = \frac{2}{n\pi}\bigl(1 - (-1)^n\bigr) Thus bn=4nπb_n = \dfrac{4}{n\pi} when nn is odd, and bn=0b_n = 0 when nn is even. Solution to part 2: f(x)∼4π∑k=0∞sin⁡ ⁣((2k+1)x)2k+1=4π ⁣(sin⁡x+sin⁡3x3+sin⁡5x5+⋯ )f(x) \sim \frac{4}{\pi}\sum_{k=0}^{\infty}\frac{\sin\!\bigl((2k+1)x\bigr)}{2k+1} = \frac{4}{\pi}\!\left(\sin x + \frac{\sin 3x}{3} + \frac{\sin 5x}{5} + \cdots\right) The series contains only odd-indexed sine terms because ff is odd (no cosines) and the even-indexed sines cancel due to the specific jump symmetry.

Problem 2: Fourier Series of f(x)=xf(x) = x on [−π,π][-\pi, \pi]

Easy

Let f(x)=xf(x) = x on (−π,π)(-\pi, \pi), extended periodically with period 2π2\pi.

  1. Compute the Fourier series of ff.
  2. To what value does the series converge at x=πx = \pi? Explain using the Dirichlet convergence theorem.
Hint
Again, f(x)=xf(x) = x is an odd function on a symmetric interval, so a0=an=0a_0 = a_n = 0. Use integration by parts to evaluate bn=2π∫0πxsin⁡(nx) dxb_n = \frac{2}{\pi}\int_0^{\pi} x\sin(nx)\,dx. At a jump discontinuity the series converges to the average of the left and right limits.
View Solution
Solution to part 1:

Since ff is odd, only sine terms survive. Using integration by parts:

bn=2π∫0πxsin⁡(nx) dx=2π ⁣[−xcos⁡(nx)n+sin⁡(nx)n2]0π=2(−1)n+1nb_n = \frac{2}{\pi}\int_0^{\pi} x\sin(nx)\,dx = \frac{2}{\pi}\!\left[-\frac{x\cos(nx)}{n} + \frac{\sin(nx)}{n^2}\right]_0^{\pi} = \frac{2(-1)^{n+1}}{n} f(x)∼2∑n=1∞(−1)n+1nsin⁡(nx)=2 ⁣(sin⁡x−sin⁡2x2+sin⁡3x3−⋯ )f(x) \sim 2\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin(nx) = 2\!\left(\sin x - \frac{\sin 2x}{2} + \frac{\sin 3x}{3} - \cdots\right) Solution to part 2:

At x=πx = \pi the periodic extension has a jump discontinuity: f(π−)=πf(\pi^-) = \pi and f(π+)=−πf(\pi^+) = -\pi. By the Dirichlet theorem the series converges to

f(π−)+f(π+)2=π+(−π)2=0\frac{f(\pi^-) + f(\pi^+)}{2} = \frac{\pi + (-\pi)}{2} = 0 which is consistent because every sin⁡(nπ)=0\sin(n\pi) = 0.

Problem 3: Fourier Series of f(x)=x2f(x) = x^2 on [−π,π][-\pi, \pi]

Easy

Let f(x)=x2f(x) = x^2 on [−π,π][-\pi, \pi], extended 2π2\pi-periodically.

  1. Find the complete Fourier series of ff.
  2. Substitute an appropriate value of xx to deduce the identity ∑n=1∞1n2=π26\displaystyle\sum_{n=1}^{\infty}\frac{1}{n^2} = \frac{\pi^2}{6}.
Hint
f(x)=x2f(x) = x^2 is even, so bn=0b_n = 0 for all nn. Compute a0a_0 directly and use integration by parts twice for ana_n. Once you have the series, set x=πx = \pi where the series converges to f(π)=π2f(\pi) = \pi^2.
View Solution
Solution to part 1: a0=1π∫−ππx2 dx=2π23a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi} x^2\,dx = \frac{2\pi^2}{3} an=2π∫0πx2cos⁡(nx) dx=4(−1)nn2a_n = \frac{2}{\pi}\int_0^{\pi} x^2\cos(nx)\,dx = \frac{4(-1)^n}{n^2} f(x)∼π23+4∑n=1∞(−1)nn2cos⁡(nx)f(x) \sim \frac{\pi^2}{3} + 4\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2}\cos(nx) Solution to part 2:

Since ff is continuous everywhere on [−π,π][-\pi,\pi] and the periodic extension is continuous, the series converges to f(π)=π2f(\pi) = \pi^2 at x=πx = \pi:

π2=π23+4∑n=1∞(−1)nn2(−1)n=π23+4∑n=1∞1n2\pi^2 = \frac{\pi^2}{3} + 4\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2}(-1)^n = \frac{\pi^2}{3} + 4\sum_{n=1}^{\infty}\frac{1}{n^2} ⟹∑n=1∞1n2=π26\Longrightarrow \quad \sum_{n=1}^{\infty}\frac{1}{n^2} = \frac{\pi^2}{6}

Problem 4: Fourier Series on a General Interval [−L,L][-L, L]

Medium

Let L=2L = 2 and define the 44-periodic function

f(x)={0,−2≤x<0x,0≤x<2f(x) = \begin{cases} 0, & -2 \leq x < 0 \\ x, & 0 \leq x < 2 \end{cases}
  1. Compute the Fourier series of ff on [−2,2][-2, 2].
  2. Determine the sum of the series at x=0x = 0 and at x=2x = 2.
Hint
For a period-2L2L function the formulas become an=1L∫−LLf(x)cos⁡ ⁣(nπxL)dxa_n = \frac{1}{L}\int_{-L}^{L}f(x)\cos\!\left(\frac{n\pi x}{L}\right)dx and similarly for bnb_n. This function is neither even nor odd, so you must compute all three coefficients. Use the Dirichlet theorem at the discontinuity points x=0x = 0 and x=±2x = \pm 2.
View Solution
Solution to part 1: a0=12∫−22f(x) dx=12∫02x dx=1a_0 = \frac{1}{2}\int_{-2}^{2}f(x)\,dx = \frac{1}{2}\int_0^2 x\,dx = 1 an=12∫02xcos⁡ ⁣(nπx2)dx=2n2π2((−1)n−1)a_n = \frac{1}{2}\int_0^2 x\cos\!\left(\frac{n\pi x}{2}\right)dx = \frac{2}{n^2\pi^2}\bigl((-1)^n - 1\bigr) So an=−4n2π2a_n = -\dfrac{4}{n^2\pi^2} for odd nn, and an=0a_n = 0 for even n≥2n \geq 2. bn=12∫02xsin⁡ ⁣(nπx2)dx=−2(−1)nnπb_n = \frac{1}{2}\int_0^2 x\sin\!\left(\frac{n\pi x}{2}\right)dx = \frac{-2(-1)^n}{n\pi} f(x)∼12−4π2∑k=0∞cos⁡ ⁣((2k+1)πx2)(2k+1)2+∑n=1∞−2(−1)nnπsin⁡ ⁣(nπx2)f(x) \sim \frac{1}{2} - \frac{4}{\pi^2}\sum_{k=0}^{\infty}\frac{\cos\!\left(\frac{(2k+1)\pi x}{2}\right)}{(2k+1)^2} + \sum_{n=1}^{\infty}\frac{-2(-1)^n}{n\pi}\sin\!\left(\frac{n\pi x}{2}\right) Solution to part 2:

At x=0x = 0: the left limit (approaching from below in the periodic extension) gives f(0−)=0f(0^-) = 0 and f(0+)=0f(0^+) = 0, so the series converges to 00.

At x=2x = 2: the periodic extension has f(2−)=2f(2^-) = 2 and f(2+)=0f(2^+) = 0 (start of next period), so the series converges to 2+02=1\dfrac{2+0}{2} = 1.

Even and Odd Functions: Symmetry and Half-Range Extensions

Recognising whether a function is even or odd — or constructing an even or odd periodic extension — can halve the computation. These problems practise the half-range cosine series and half-range sine series, a topic that appears frequently in heat and wave problems with specific boundary conditions.

Problem 5: Half-Range Sine Series of f(x)=xf(x) = x on [0,π][0, \pi]

Easy

Given f(x)=xf(x) = x for 0<x<π0 < x < \pi, construct its half-range sine series.

  1. Compute the sine coefficients bnb_n and write the series.
  2. Sketch the odd periodic extension of ff over three periods and identify where the series converges to a value different from f(x)f(x).
Hint
For a half-range sine series on [0,L][0, L] use bn=2L∫0Lf(x)sin⁡ ⁣(nπxL)dxb_n = \frac{2}{L}\int_0^L f(x)\sin\!\left(\frac{n\pi x}{L}\right)dx. The odd extension maps f(x)f(x) to −f(−x)-f(-x) for −π<x<0-\pi < x < 0, making it 2π2\pi-periodic. The extension is discontinuous at the endpoints 0,±π,±2π,…0, \pm\pi, \pm 2\pi, \ldots
View Solution
Solution to part 1: bn=2π∫0πxsin⁡(nx) dx=2(−1)n+1nb_n = \frac{2}{\pi}\int_0^{\pi} x\sin(nx)\,dx = \frac{2(-1)^{n+1}}{n} f(x)∼2∑n=1∞(−1)n+1nsin⁡(nx),0<x<πf(x) \sim 2\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin(nx),\quad 0 < x < \pi Solution to part 2:

The odd periodic extension foddf_\text{odd} satisfies fodd(−x)=−fodd(x)f_\text{odd}(-x) = -f_\text{odd}(x) and has period 2π2\pi. It has jump discontinuities at x=0,±π,±2π,…x = 0, \pm\pi, \pm 2\pi, \ldots where the one-sided limits are ±π\pm\pi. At each such point the series converges to 00 (the average of π\pi and −π-\pi), while the original function values are 00 or π\pi.

Problem 6: Half-Range Cosine Series of f(x)=x2f(x) = x^2 on [0,1][0, 1]

Easy

Consider f(x)=x2f(x) = x^2 on [0,1][0, 1]. Construct the half-range cosine series.

  1. Derive the coefficients a0a_0 and ana_n and state the series.
  2. Use the result at x=0x = 0 to find a closed-form expression for ∑n=1∞(−1)n+1n2π2\displaystyle\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2\pi^2}.
Hint
The half-range cosine series on [0,L][0,L] uses a0=2L∫0Lf(x) dxa_0 = \frac{2}{L}\int_0^L f(x)\,dx and an=2L∫0Lf(x)cos⁡ ⁣(nπxL)dxa_n = \frac{2}{L}\int_0^L f(x)\cos\!\left(\frac{n\pi x}{L}\right)dx. After finding the series, substitute x=0x = 0 where f(0)=0f(0) = 0, since the even extension is continuous there.
View Solution
Solution to part 1: a0=2∫01x2 dx=23,an=2∫01x2cos⁡(nπx) dx=4(−1)nn2π2a_0 = 2\int_0^1 x^2\,dx = \frac{2}{3}, \qquad a_n = 2\int_0^1 x^2\cos(n\pi x)\,dx = \frac{4(-1)^n}{n^2\pi^2} f(x)∼13+4π2∑n=1∞(−1)nn2cos⁡(nπx),0≤x≤1f(x) \sim \frac{1}{3} + \frac{4}{\pi^2}\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2}\cos(n\pi x), \quad 0 \leq x \leq 1 Solution to part 2:

At x=0x = 0 the even extension is continuous and equals f(0)=0f(0) = 0:

0=13+4π2∑n=1∞(−1)nn2  ⟹  ∑n=1∞(−1)nn2=−π2120 = \frac{1}{3} + \frac{4}{\pi^2}\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2} \implies \sum_{n=1}^{\infty}\frac{(-1)^n}{n^2} = -\frac{\pi^2}{12} ∴∑n=1∞(−1)n+1n2π2=112\therefore \sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2\pi^2} = \frac{1}{12}

Problem 7: Comparing Sine and Cosine Extensions of f(x)=π−xf(x) = \pi - x

Medium

Let f(x)=π−xf(x) = \pi - x on [0,π][0, \pi].

  1. Find the half-range sine series of ff.
  2. Find the half-range cosine series of ff.
  3. At x=π/2x = \pi/2, determine the value each series converges to, and confirm it equals f(π/2)f(\pi/2).
Hint
Both ff and its extensions are piecewise smooth. For the sine series, integrate by parts. For the cosine series, note that π−x\pi - x is neither even nor odd but its even extension is a triangle wave. At x=π/2x = \pi/2 both extensions are continuous, so both series converge to f(π/2)=π/2f(\pi/2) = \pi/2.
View Solution
Solution to part 1 (Sine series): bn=2π∫0π(π−x)sin⁡(nx) dx=2nb_n = \frac{2}{\pi}\int_0^{\pi}(\pi - x)\sin(nx)\,dx = \frac{2}{n} f(x)∼2∑n=1∞sin⁡(nx)n=2 ⁣(sin⁡x+sin⁡2x2+sin⁡3x3+⋯ )f(x) \sim 2\sum_{n=1}^{\infty}\frac{\sin(nx)}{n} = 2\!\left(\sin x + \frac{\sin 2x}{2} + \frac{\sin 3x}{3} + \cdots\right) Solution to part 2 (Cosine series): a0=2π∫0π(π−x) dx=π,an=2π∫0π(π−x)cos⁡(nx) dx=2n2π(1−(−1)n)a_0 = \frac{2}{\pi}\int_0^{\pi}(\pi-x)\,dx = \pi,\qquad a_n = \frac{2}{\pi}\int_0^{\pi}(\pi-x)\cos(nx)\,dx = \frac{2}{n^2\pi}\bigl(1 - (-1)^n\bigr) So an=4n2πa_n = \dfrac{4}{n^2\pi} for odd nn, and 00 for even nn. f(x)∼π2+4π∑k=0∞cos⁡ ⁣((2k+1)x)(2k+1)2f(x) \sim \frac{\pi}{2} + \frac{4}{\pi}\sum_{k=0}^{\infty}\frac{\cos\!\bigl((2k+1)x\bigr)}{(2k+1)^2} Solution to part 3:

At x=π/2x = \pi/2 both extensions are continuous. Each series converges to f(π/2)=π−π/2=π/2f(\pi/2) = \pi - \pi/2 = \pi/2. One may verify this for the cosine series by noting cos⁡ ⁣((2k+1)π/2)=0\cos\!\bigl((2k+1)\pi/2\bigr) = 0 for all kk, leaving only the constant term π/2\pi/2. ✓

Parseval’s Identity and Norm Calculations

Parseval’s identity links the energy of a function to its Fourier coefficients, providing both a powerful computational shortcut and a way to derive classic infinite series identities. Mastering it is essential for signal processing and functional analysis.

Problem 8: Applying Parseval’s Identity to Derive π4/90\pi^4/90

Medium

Recall that the Fourier series of f(x)=x2f(x) = x^2 on [−π,π][-\pi,\pi] is

f(x)∼π23+4∑n=1∞(−1)nn2cos⁡(nx)f(x) \sim \frac{\pi^2}{3} + 4\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2}\cos(nx)
  1. State Parseval’s identity for a 2π2\pi-periodic function in terms of a0a_0, ana_n, bnb_n.
  2. Apply it to the Fourier series of f(x)=x2f(x) = x^2 to prove that ∑n=1∞1n4=π490\displaystyle\sum_{n=1}^{\infty}\frac{1}{n^4} = \frac{\pi^4}{90}.
Hint
Parseval’s identity for period 2π2\pi reads 1π∫−ππ∣f(x)∣2 dx=a022+∑n=1∞(an2+bn2)\frac{1}{\pi}\int_{-\pi}^{\pi}|f(x)|^2\,dx = \frac{a_0^2}{2} + \sum_{n=1}^{\infty}(a_n^2 + b_n^2). Compute the left-hand side directly, then substitute the known coefficients on the right.
View Solution
Solution to part 1: 1π∫−ππ∣f(x)∣2 dx=a022+∑n=1∞(an2+bn2)\frac{1}{\pi}\int_{-\pi}^{\pi}|f(x)|^2\,dx = \frac{a_0^2}{2} + \sum_{n=1}^{\infty}\bigl(a_n^2 + b_n^2\bigr) Solution to part 2:

For f(x)=x2f(x) = x^2: a0=2π23a_0 = \frac{2\pi^2}{3}, an=4(−1)nn2a_n = \frac{4(-1)^n}{n^2}, bn=0b_n = 0.

LHS=1π∫−ππx4 dx=2π45\text{LHS} = \frac{1}{\pi}\int_{-\pi}^{\pi}x^4\,dx = \frac{2\pi^4}{5} RHS=12⋅4π49+∑n=1∞16n4=2π49+16∑n=1∞1n4\text{RHS} = \frac{1}{2}\cdot\frac{4\pi^4}{9} + \sum_{n=1}^{\infty}\frac{16}{n^4} = \frac{2\pi^4}{9} + 16\sum_{n=1}^{\infty}\frac{1}{n^4} Setting LHS = RHS: 2π45=2π49+16∑n=1∞1n4  ⟹  16∑n=1∞1n4=2π45−2π49=8π445\frac{2\pi^4}{5} = \frac{2\pi^4}{9} + 16\sum_{n=1}^{\infty}\frac{1}{n^4} \implies 16\sum_{n=1}^{\infty}\frac{1}{n^4} = \frac{2\pi^4}{5} - \frac{2\pi^4}{9} = \frac{8\pi^4}{45} ∴∑n=1∞1n4=π490\therefore\quad \sum_{n=1}^{\infty}\frac{1}{n^4} = \frac{\pi^4}{90}

Problem 9: Parseval’s Identity for a Piecewise Function

Medium

Let f(x)f(x) be the 2π2\pi-periodic function with f(x)=xf(x) = x on (−π,π)(-\pi, \pi).

  1. Use the Fourier series from Problem 2 and Parseval’s identity to prove ∑n=1∞1n2=π26\displaystyle\sum_{n=1}^{\infty}\frac{1}{n^2} = \frac{\pi^2}{6} independently of Problem 3.
  2. Interpret Parseval’s identity physically: what does each side represent in terms of signal energy?
Hint
From Problem 2, bn=2(−1)n+1nb_n = \frac{2(-1)^{n+1}}{n} and all cosine coefficients are zero. Compute 1π∫−ππx2 dx\frac{1}{\pi}\int_{-\pi}^{\pi}x^2\,dx on the left side of Parseval’s identity and match with the sum of squared coefficients on the right.
View Solution
Solution to part 1: 1π∫−ππx2 dx=2π23\frac{1}{\pi}\int_{-\pi}^{\pi}x^2\,dx = \frac{2\pi^2}{3} ∑n=1∞bn2=∑n=1∞4n2\sum_{n=1}^{\infty} b_n^2 = \sum_{n=1}^{\infty}\frac{4}{n^2} Parseval: 2π23=4∑n=1∞1n2  ⟹  ∑n=1∞1n2=π26\dfrac{2\pi^2}{3} = 4\displaystyle\sum_{n=1}^{\infty}\dfrac{1}{n^2} \implies \displaystyle\sum_{n=1}^{\infty}\dfrac{1}{n^2} = \dfrac{\pi^2}{6}. ✓ Solution to part 2:

In signal processing, 12π∫−ππ∣f(x)∣2 dx\frac{1}{2\pi}\int_{-\pi}^{\pi}|f(x)|^2\,dx is the total power (energy per period) of the signal. The right-hand side a022+∑(an2+bn2)\frac{a_0^2}{2} + \sum(a_n^2 + b_n^2) is the sum of the powers carried by each harmonic component. Parseval’s identity states that total power equals the sum of powers of all harmonics — energy is conserved in the Fourier representation.

Fourier Series with Arbitrary Period and Piecewise Functions

Real-world signals rarely have period 2π2\pi. These problems develop skill in rescaling the Euler–Fourier formulas to a general period T=2LT = 2L and handling piecewise-defined functions with multiple integration sub-intervals — a common challenge in engineering applications.

Problem 10: Sawtooth Wave with Period 4

Medium

Define the 44-periodic sawtooth wave by f(t)=tf(t) = t on −2<t≤2-2 < t \leq 2.

  1. Find the Fourier series of ff.
  2. Evaluate the series at t=2t = 2 and explain the result in terms of the Dirichlet theorem.
Hint
For a function with period 2L=42L = 4, so L=2L = 2, the sine coefficients are bn=12∫−22tsin⁡ ⁣(nπt2)dtb_n = \frac{1}{2}\int_{-2}^{2} t\sin\!\left(\frac{n\pi t}{2}\right)dt. Since ff is odd, no cosine terms appear. Use integration by parts.
View Solution
Solution to part 1: bn=12∫−22tsin⁡ ⁣(nπt2)dt=4(−1)n+1nπb_n = \frac{1}{2}\int_{-2}^{2}t\sin\!\left(\frac{n\pi t}{2}\right)dt = \frac{4(-1)^{n+1}}{n\pi} f(t)∼4π∑n=1∞(−1)n+1nsin⁡ ⁣(nπt2)f(t) \sim \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin\!\left(\frac{n\pi t}{2}\right) Solution to part 2:

At t=2t = 2 the function has a jump: f(2−)=2f(2^-) = 2 and f(2+)=−2f(2^+) = -2 (start of next period). By the Dirichlet theorem the series converges to 2+(−2)2=0\frac{2 + (-2)}{2} = 0. Substituting t=2t = 2 confirms this since sin⁡(nπ)=0\sin(n\pi) = 0 for all integers nn.

Problem 11: Fourier Series of the Rectified Sine Wave

Medium

The full-wave rectified sine is f(x)=∣sin⁡x∣f(x) = |\sin x|, which is periodic with period π\pi.

  1. Compute the Fourier series of ff (with period π\pi, using harmonics of frequency 2,4,6,…2, 4, 6, \ldots).
  2. Verify that the series at x=π/2x = \pi/2 gives f(π/2)=1f(\pi/2) = 1.
Hint
f(x)=∣sin⁡x∣f(x) = |\sin x| is an even function with period π\pi. Use the half-range cosine series on [0,π][0, \pi] with L=π/2L = \pi/2. The trigonometric identity 2sin⁡xsin⁡(nx)=cos⁡((n−1)x)−cos⁡((n+1)x)2\sin x\sin(nx) = \cos((n-1)x) - \cos((n+1)x) simplifies the integral for ana_n.
View Solution
Solution to part 1:

Since period T=πT = \pi, the fundamental angular frequency is ω0=2π/T=2\omega_0 = 2\pi/T = 2. All terms involve harmonics 2,4,6,…2, 4, 6, \ldots

a0=2π∫0πsin⁡x dx=4πa_0 = \frac{2}{\pi}\int_0^{\pi}\sin x\,dx = \frac{4}{\pi} an=2π∫0πsin⁡xcos⁡(2nx) dx=−4π(4n2−1)a_n = \frac{2}{\pi}\int_0^{\pi}\sin x\cos(2nx)\,dx = \frac{-4}{\pi(4n^2-1)} f(x)∼2π−4π∑n=1∞cos⁡(2nx)4n2−1f(x) \sim \frac{2}{\pi} - \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{\cos(2nx)}{4n^2 - 1} Solution to part 2: At x=π2:2π−4π∑n=1∞cos⁡(nπ)4n2−1=2π−4π∑n=1∞(−1)n4n2−1\text{At } x = \tfrac{\pi}{2}: \quad \frac{2}{\pi} - \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{\cos(n\pi)}{4n^2-1} = \frac{2}{\pi} - \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^n}{4n^2-1} Using the known result ∑n=1∞(−1)n4n2−1=1−π/22⋅2π\sum_{n=1}^{\infty}\frac{(-1)^n}{4n^2-1} = \frac{1-\pi/2}{2} \cdot \frac{2}{\pi}, the sum evaluates to 1=f(π/2)1 = f(\pi/2). ✓

Problem 12: Fourier Series of f(x)=exf(x) = e^x on [−π,π][-\pi, \pi]

Hard

Find the complete Fourier series of f(x)=exf(x) = e^x on (−π,π)(-\pi, \pi), extended 2π2\pi-periodically.

  1. Compute all coefficients a0a_0, ana_n, and bnb_n in closed form.
  2. Use the series and Parseval’s identity to show that ∑n=−∞∞11+n2=πcoth⁡π\displaystyle\sum_{n=-\infty}^{\infty}\frac{1}{1+n^2} = \pi\coth\pi.
Hint
Use the formula ∫excos⁡(nx) dx=ex(cos⁡(nx)+nsin⁡(nx))1+n2\int e^x\cos(nx)\,dx = \frac{e^x(\cos(nx)+n\sin(nx))}{1+n^2} and its sine analogue. The factor (−1)n(-1)^n appears because e±inπ=(−1)ne^{\pm i n\pi} = (-1)^n. For Parseval, apply the identity with ∫−ππe2x dx\int_{-\pi}^{\pi}e^{2x}\,dx on the left and the sum of squared coefficients on the right.
View Solution
Solution to part 1: a0=1π∫−ππex dx=2sinh⁡ππa_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}e^x\,dx = \frac{2\sinh\pi}{\pi} an=1π∫−ππexcos⁡(nx) dx=2(−1)nsinh⁡ππ(1+n2)a_n = \frac{1}{\pi}\int_{-\pi}^{\pi}e^x\cos(nx)\,dx = \frac{2(-1)^n\sinh\pi}{\pi(1+n^2)} bn=1π∫−ππexsin⁡(nx) dx=−2n(−1)nsinh⁡ππ(1+n2)b_n = \frac{1}{\pi}\int_{-\pi}^{\pi}e^x\sin(nx)\,dx = \frac{-2n(-1)^n\sinh\pi}{\pi(1+n^2)} ex∼sinh⁡ππ ⁣(1+2∑n=1∞(−1)n1+n2(cos⁡(nx)−nsin⁡(nx)))e^x \sim \frac{\sinh\pi}{\pi}\!\left(1 + 2\sum_{n=1}^{\infty}\frac{(-1)^n}{1+n^2}\bigl(\cos(nx) - n\sin(nx)\bigr)\right) Solution to part 2:

Apply Parseval: 1π∫−ππe2x dx=a022+∑n=1∞(an2+bn2)\frac{1}{\pi}\int_{-\pi}^{\pi}e^{2x}\,dx = \frac{a_0^2}{2} + \sum_{n=1}^{\infty}(a_n^2 + b_n^2).

LHS=e2π−e−2π2π=sinh⁡(2π)π\text{LHS} = \frac{e^{2\pi} - e^{-2\pi}}{2\pi} = \frac{\sinh(2\pi)}{\pi} an2+bn2=4sinh⁡2 ⁣ππ2⋅1+n2(1+n2)2=4sinh⁡2 ⁣ππ2(1+n2)a_n^2 + b_n^2 = \frac{4\sinh^2\!\pi}{\pi^2}\cdot\frac{1+n^2}{(1+n^2)^2} = \frac{4\sinh^2\!\pi}{\pi^2(1+n^2)} RHS=2sinh⁡2 ⁣ππ2+4sinh⁡2 ⁣ππ2∑n=1∞11+n2=2sinh⁡2 ⁣ππ2 ⁣(1+2∑n=1∞11+n2)\text{RHS} = \frac{2\sinh^2\!\pi}{\pi^2} + \frac{4\sinh^2\!\pi}{\pi^2}\sum_{n=1}^{\infty}\frac{1}{1+n^2} = \frac{2\sinh^2\!\pi}{\pi^2}\!\left(1 + 2\sum_{n=1}^{\infty}\frac{1}{1+n^2}\right) Setting equal and using sinh⁡(2π)=2sinh⁡πcosh⁡π\sinh(2\pi) = 2\sinh\pi\cosh\pi: πcoth⁡π=1+2∑n=1∞11+n2=∑n=−∞∞11+n2\pi\coth\pi = 1 + 2\sum_{n=1}^{\infty}\frac{1}{1+n^2} = \sum_{n=-\infty}^{\infty}\frac{1}{1+n^2}

Complex Fourier Series and Exponential Form

The complex exponential form of the Fourier series — using coefficients cn=12L∫−LLf(x)e−inπx/Ldxc_n = \frac{1}{2L}\int_{-L}^{L}f(x)e^{-in\pi x/L}dx — is indispensable in signal processing, communication theory, and the study of the discrete Fourier transform. The problems here bridge the real and complex representations.

Problem 13: Complex Fourier Coefficients of a Rectangular Pulse

Medium

A 2π2\pi-periodic rectangular pulse is defined by

f(x)={1,∣x∣<δ0,δ≤∣x∣≤πf(x) = \begin{cases} 1, & |x| < \delta \\ 0, & \delta \leq |x| \leq \pi \end{cases} where 0<δ<π0 < \delta < \pi is a fixed duty-cycle parameter.
  1. Compute the complex Fourier coefficients cnc_n for all integers nn.
  2. Show that the coefficients can be written using the sinc function: cn=δπ sinc(nδ)c_n = \frac{\delta}{\pi}\,\mathrm{sinc}(n\delta) where sinc(u)=sin⁡uu\mathrm{sinc}(u) = \frac{\sin u}{u}.
Hint
The complex coefficients are cn=12π∫−ππf(x)e−inxdxc_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)e^{-inx}dx. Since ff is zero outside (−δ,δ)(-\delta, \delta), the integral reduces to 12π∫−δδe−inxdx\frac{1}{2\pi}\int_{-\delta}^{\delta}e^{-inx}dx. For n=0n = 0 integrate directly; for n≠0n \neq 0 use the anti-derivative of e−inxe^{-inx}.
View Solution
Solution to part 1:

For n=0n = 0: c0=12π∫−δδdx=δπc_0 = \frac{1}{2\pi}\int_{-\delta}^{\delta}dx = \frac{\delta}{\pi}.

For n≠0n \neq 0:

cn=12π∫−δδe−inxdx=12π[e−inx−in]−δδ=einδ−e−inδ2π in=sin⁡(nδ)nπc_n = \frac{1}{2\pi}\int_{-\delta}^{\delta}e^{-inx}dx = \frac{1}{2\pi}\left[\frac{e^{-inx}}{-in}\right]_{-\delta}^{\delta} = \frac{e^{in\delta} - e^{-in\delta}}{2\pi\,in} = \frac{\sin(n\delta)}{n\pi} Solution to part 2: cn=sin⁡(nδ)nπ=δπ⋅sin⁡(nδ)nδ=δπ sinc(nδ)c_n = \frac{\sin(n\delta)}{n\pi} = \frac{\delta}{\pi}\cdot\frac{\sin(n\delta)}{n\delta} = \frac{\delta}{\pi}\,\mathrm{sinc}(n\delta) This expression is also valid at n=0n = 0 since lim⁡u→0sinc(u)=1\lim_{u\to 0}\mathrm{sinc}(u) = 1, giving c0=δ/πc_0 = \delta/\pi. The coefficients therefore form a sampled sinc envelope, which is the hallmark of a rectangular pulse spectrum in Fourier analysis.

Problem 14: Converting Between Real and Complex Forms

Hard

Consider the 2π2\pi-periodic function whose real Fourier series is

f(x)=12+∑n=1∞(1ncos⁡(nx)+2n2sin⁡(nx))f(x) = \frac{1}{2} + \sum_{n=1}^{\infty}\left(\frac{1}{n}\cos(nx) + \frac{2}{n^2}\sin(nx)\right)
  1. Find the complex Fourier coefficients cnc_n for all n∈Zn \in \mathbb{Z} in terms of the given real coefficients.
  2. Verify that c−n=cn‾c_{-n} = \overline{c_n} (complex conjugate symmetry), which holds because ff is real-valued.
Hint
Use the identities cos⁡(nx)=einx+e−inx2\cos(nx) = \frac{e^{inx}+e^{-inx}}{2} and sin⁡(nx)=einx−e−inx2i\sin(nx) = \frac{e^{inx}-e^{-inx}}{2i}. Group the einxe^{inx} and e−inxe^{-inx} terms separately to read off cnc_n and c−nc_{-n}. For part 2, compute cn‾\overline{c_n} directly.
View Solution
Solution to part 1:

The general conversion formulas are c0=a02c_0 = \frac{a_0}{2}, and for n≥1n \geq 1:

cn=an−ibn2,c−n=an+ibn2c_n = \frac{a_n - ib_n}{2}, \qquad c_{-n} = \frac{a_n + ib_n}{2} Here a0=1a_0 = 1, an=1/na_n = 1/n, bn=2/n2b_n = 2/n^2. Therefore: c0=12,cn=12n−in2(n≥1),c−n=12n+in2(n≥1)c_0 = \frac{1}{2}, \qquad c_n = \frac{1}{2n} - \frac{i}{n^2}\quad (n \geq 1), \qquad c_{-n} = \frac{1}{2n} + \frac{i}{n^2}\quad (n \geq 1) Solution to part 2:

Taking the complex conjugate of cnc_n for n≥1n \geq 1:

cn‾=12n−in2‾=12n+in2=c−n✓\overline{c_n} = \overline{\frac{1}{2n} - \frac{i}{n^2}} = \frac{1}{2n} + \frac{i}{n^2} = c_{-n} \quad \checkmark This conjugate symmetry c−n=cn‾c_{-n} = \overline{c_n} is a universal property of the complex Fourier coefficients of any real-valued function, since f(x)‾=f(x)\overline{f(x)} = f(x) implies cn‾=c−n\overline{c_n} = c_{-n} directly from the coefficient formula.

Applications: Heat Equation and Wave Equation

Fourier series are the cornerstone of solving partial differential equations (PDEs) with periodic or bounded-domain initial conditions. These problems demonstrate the separation of variables technique for the one-dimensional heat equation and wave equation — problems that are central to mathematical physics and engineering.

Problem 15: Heat Equation with Zero Boundary Conditions

Medium

Solve the boundary-value problem for heat conduction in a rod of length π\pi:

ut=uxx,0<x<π,  t>0u_t = u_{xx}, \quad 0 < x < \pi,\; t > 0 u(0,t)=0,u(π,t)=0,t>0u(0,t) = 0,\quad u(\pi, t) = 0, \quad t > 0 u(x,0)=sin⁡(2x)−12sin⁡(5x),0<x<πu(x, 0) = \sin(2x) - \tfrac{1}{2}\sin(5x), \quad 0 < x < \pi
  1. Use separation of variables to derive the general solution as a Fourier sine series.
  2. Apply the initial condition to find the explicit solution.
Hint
Assume u(x,t)=X(x)T(t)u(x,t) = X(x)T(t). The boundary conditions u(0,t)=u(π,t)=0u(0,t) = u(\pi,t) = 0 force X(0)=X(π)=0X(0) = X(\pi) = 0, yielding eigenfunctions Xn(x)=sin⁡(nx)X_n(x) = \sin(nx) with eigenvalues λn=n2\lambda_n = n^2. The time factor then satisfies Tn′=−n2TnT_n' = -n^2 T_n. The initial condition in this problem is already expressed as a finite sine series, so matching coefficients directly is straightforward.
View Solution
Solution to part 1 (general solution):

Substituting u=X(x)T(t)u = X(x)T(t) gives X′′+λX=0X^{\prime\prime} + \lambda X = 0 with X(0)=X(π)=0X(0)=X(\pi)=0, yielding:

Xn(x)=sin⁡(nx),λn=n2,Tn(t)=e−n2tX_n(x) = \sin(nx),\quad \lambda_n = n^2,\quad T_n(t) = e^{-n^2 t} u(x,t)=∑n=1∞Bne−n2tsin⁡(nx)u(x,t) = \sum_{n=1}^{\infty} B_n e^{-n^2 t}\sin(nx) Solution to part 2:

At t=0t = 0: u(x,0)=∑n=1∞Bnsin⁡(nx)=sin⁡(2x)−12sin⁡(5x)u(x,0) = \sum_{n=1}^{\infty}B_n\sin(nx) = \sin(2x) - \frac{1}{2}\sin(5x).

By orthogonality, B2=1B_2 = 1, B5=−12B_5 = -\frac{1}{2}, and all other Bn=0B_n = 0. Therefore:

u(x,t)=e−4tsin⁡(2x)−12e−25tsin⁡(5x)u(x,t) = e^{-4t}\sin(2x) - \tfrac{1}{2}e^{-25t}\sin(5x)

As t→∞t \to \infty, the higher-frequency term decays faster (factor e−25te^{-25t} vs. e−4te^{-4t}), leaving the rod temperature exponentially approaching zero, consistent with the zero boundary conditions.

Problem 16: Heat Equation with General Initial Condition

Hard

Solve the heat equation on [0,L][0, L] with homogeneous Dirichlet conditions:

ut=k uxx,u(0,t)=u(L,t)=0,u(x,0)=f(x)u_t = k\,u_{xx},\quad u(0,t) = u(L,t) = 0,\quad u(x,0) = f(x) where k>0k > 0 is the thermal diffusivity and f(x)=x(π−x)f(x) = x(\pi - x) with L=πL = \pi, k=1k = 1.
  1. Expand f(x)f(x) in a Fourier sine series on [0,π][0, \pi].
  2. Write the complete solution u(x,t)u(x,t).
  3. Show that the maximum temperature, which occurs at the midpoint x=π/2x = \pi/2, decays exponentially as t→∞t \to \infty, and identify the dominant decay rate.
Hint
The Fourier sine coefficients of x(π−x)x(\pi-x) are Bn=2π∫0πx(π−x)sin⁡(nx) dxB_n = \frac{2}{\pi}\int_0^{\pi}x(\pi-x)\sin(nx)\,dx. Use integration by parts twice. You will find Bn=0B_n = 0 for even nn, and Bn=8πn3B_n = \frac{8}{\pi n^3} for odd nn. The dominant (slowest-decaying) mode is n=1n=1 with rate e−te^{-t}.
View Solution
Solution to part 1 (Fourier sine coefficients): Bn=2π∫0πx(π−x)sin⁡(nx) dxB_n = \frac{2}{\pi}\int_0^{\pi}x(\pi - x)\sin(nx)\,dx Integrating by parts twice: Bn=2π⋅2(1−(−1)n)n3⋅π=4(1−(−1)n)n3π⋅πB_n = \frac{2}{\pi}\cdot\frac{2\bigl(1-(-1)^n\bigr)}{n^3} \cdot \pi = \frac{4(1-(-1)^n)}{n^3\pi}\cdot\pi More precisely: Bn=8πn3B_n = \dfrac{8}{\pi n^3} for odd nn, and Bn=0B_n = 0 for even nn. Solution to part 2: u(x,t)=8π∑k=0∞e−(2k+1)2tsin⁡ ⁣((2k+1)x)(2k+1)3u(x,t) = \frac{8}{\pi}\sum_{k=0}^{\infty}\frac{e^{-(2k+1)^2 t}\sin\!\bigl((2k+1)x\bigr)}{(2k+1)^3} Solution to part 3:

At x=π/2x = \pi/2, sin⁡ ⁣((2k+1)π/2)=(−1)k\sin\!\bigl((2k+1)\pi/2\bigr) = (-1)^k. As t→∞t \to \infty the k=0k = 0 term dominates:

u ⁣(π2,t)≈8πe−tsin⁡ ⁣(π2)=8πe−tu\!\left(\frac{\pi}{2}, t\right) \approx \frac{8}{\pi}e^{-t}\sin\!\left(\frac{\pi}{2}\right) = \frac{8}{\pi}e^{-t} The dominant decay rate is e−te^{-t} (eigenvalue λ1=12=1\lambda_1 = 1^2 = 1). Higher modes decay at rates e−9t,e−25t,…e^{-9t}, e^{-25t}, \ldots, becoming negligible quickly.

Problem 17: Vibrating String — Wave Equation

Hard

A string of length L=πL = \pi is fixed at both ends. It satisfies the wave equation

utt=c2uxx,u(0,t)=u(π,t)=0u_{tt} = c^2 u_{xx},\quad u(0,t) = u(\pi, t) = 0 with initial conditions u(x,0)=sin⁡x+13sin⁡(3x)u(x,0) = \sin x + \frac{1}{3}\sin(3x) and ut(x,0)=0u_t(x,0) = 0.
  1. Write the general d’Alembert/eigenfunction solution for this boundary-value problem.
  2. Apply both initial conditions to find the specific solution for c=1c = 1.
  3. Identify the fundamental frequency and the frequency of the second harmonic present in the solution.
Hint
Separation of variables gives u(x,t)=∑n=1∞sin⁡(nx)(Ancos⁡(cnt)+Bnsin⁡(cnt))u(x,t) = \sum_{n=1}^{\infty}\sin(nx)\bigl(A_n\cos(cnt) + B_n\sin(cnt)\bigr). The condition ut(x,0)=0u_t(x,0) = 0 forces all Bn=0B_n = 0. The condition u(x,0)=sin⁡x+13sin⁡(3x)u(x,0) = \sin x + \frac{1}{3}\sin(3x) is already a finite sine series, so matching gives A1,A3A_1, A_3 immediately.
View Solution
Solution to part 1: u(x,t)=∑n=1∞sin⁡(nx)(Ancos⁡(cnt)+Bnsin⁡(cnt))u(x,t) = \sum_{n=1}^{\infty}\sin(nx)\bigl(A_n\cos(cnt) + B_n\sin(cnt)\bigr) Solution to part 2 (c=1c = 1):

From ut(x,0)=0u_t(x,0) = 0: Bn=0B_n = 0 for all nn. From u(x,0)u(x,0): A1=1A_1 = 1, A3=13A_3 = \frac{1}{3}, all other An=0A_n = 0. Thus:

u(x,t)=sin⁡xcos⁡t+13sin⁡(3x)cos⁡(3t)u(x,t) = \sin x\cos t + \frac{1}{3}\sin(3x)\cos(3t) Solution to part 3:

The fundamental frequency corresponds to n=1n = 1: angular frequency ω1=c⋅1=1 rad/s\omega_1 = c\cdot 1 = 1\,\text{rad/s}, frequency f1=12π Hzf_1 = \frac{1}{2\pi}\,\text{Hz}. The second harmonic present (note: n=2n=2 has zero coefficient so the next mode is n=3n=3) has angular frequency ω3=3 rad/s\omega_3 = 3\,\text{rad/s}, which is the third harmonic. The amplitude ratio of the two modes is 3 ⁣: ⁣13\!:\!1.

Convergence, Dirichlet Conditions, and the Gibbs Phenomenon

Understanding where and how fast a Fourier series converges is as important as computing it. This section addresses the Dirichlet convergence theorem, the behaviour of partial sums near jump discontinuities (Gibbs phenomenon), and the distinction between pointwise, uniform, and mean-square convergence.

Problem 18: Identifying Convergence Behaviour at Discontinuities

Medium

Define the 2π2\pi-periodic function

f(x)={0,−π<x<0x,0≤x<πf(x) = \begin{cases} 0, & -\pi < x < 0 \\ x, & 0 \leq x < \pi \end{cases}
  1. Compute the Fourier series of ff.
  2. Determine the value of the series at x=0x = 0 and at x=πx = \pi, justifying each answer via the Dirichlet theorem.
  3. Use the value at x=π/2x = \pi/2 to derive the Leibniz formula π4=1−13+15−17+⋯\frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \cdots
Hint
Compute a0a_0, ana_n, and bnb_n using standard integrals. At x=0x = 0 the function has a jump from 0−→00^- \to 0 in the periodic extension; check both one-sided limits carefully. At x=π/2x = \pi/2 the series converges to f(π/2)=π/2f(\pi/2) = \pi/2; substituting and isolating the odd-indexed cosine sum gives the Leibniz formula.
View Solution
Solution to part 1: a0=1π∫0πx dx=π2a_0 = \frac{1}{\pi}\int_0^{\pi}x\,dx = \frac{\pi}{2} an=1π∫0πxcos⁡(nx) dx=(−1)n−1n2πa_n = \frac{1}{\pi}\int_0^{\pi}x\cos(nx)\,dx = \frac{(-1)^n - 1}{n^2\pi} bn=1π∫0πxsin⁡(nx) dx=(−1)n+1nb_n = \frac{1}{\pi}\int_0^{\pi}x\sin(nx)\,dx = \frac{(-1)^{n+1}}{n} f(x)∼π4−2π∑k=0∞cos⁡ ⁣((2k+1)x)(2k+1)2+∑n=1∞(−1)n+1nsin⁡(nx)f(x) \sim \frac{\pi}{4} - \frac{2}{\pi}\sum_{k=0}^{\infty}\frac{\cos\!\bigl((2k+1)x\bigr)}{(2k+1)^2} + \sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin(nx) Solution to part 2:

At x=0x = 0: in the periodic extension, f(0−)=0f(0^-) = 0 (end of preceding period where f→0f \to 0) and f(0+)=0f(0^+) = 0. Both limits are 00, so the series converges to 0+02=0\dfrac{0+0}{2} = 0. (The constant term alone is π/4≠0\pi/4 \neq 0, but the alternating cosine sum cancels it at x=0x=0.)

At x=πx = \pi: f(π−)=πf(\pi^-) = \pi and f(π+)=0f(\pi^+) = 0 (next period starts). Series converges to π+02=π2\dfrac{\pi + 0}{2} = \dfrac{\pi}{2}.

Solution to part 3:

At x=π/2x = \pi/2, the series converges to f(π/2)=π/2f(\pi/2) = \pi/2:

π2=π4−2π∑k=0∞cos⁡ ⁣((2k+1)π/2)(2k+1)2+∑n=1∞(−1)n+1nsin⁡ ⁣(nπ2)\frac{\pi}{2} = \frac{\pi}{4} - \frac{2}{\pi}\sum_{k=0}^{\infty}\frac{\cos\!\bigl((2k+1)\pi/2\bigr)}{(2k+1)^2} + \sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin\!\left(\frac{n\pi}{2}\right) Since cos⁡ ⁣((2k+1)π/2)=0\cos\!\bigl((2k+1)\pi/2\bigr) = 0 for all kk, only the sine sum survives. The non-zero terms occur at odd n=2k+1n = 2k+1: π2=π4+∑k=0∞(−1)k2k+1  ⟹  π4=∑k=0∞(−1)k2k+1=1−13+15−⋯✓\frac{\pi}{2} = \frac{\pi}{4} + \sum_{k=0}^{\infty}\frac{(-1)^k}{2k+1} \implies \frac{\pi}{4} = \sum_{k=0}^{\infty}\frac{(-1)^k}{2k+1} = 1 - \frac{1}{3} + \frac{1}{5} - \cdots \quad\checkmark

Problem 19: The Gibbs Phenomenon — Quantifying the Overshoot

Hard

Consider the NN-th partial sum SN(x)S_N(x) of the Fourier series of the square wave f(x)f(x) from Problem 1.

  1. Write SN(x)S_N(x) explicitly as a finite sum of sine terms.
  2. Show that the maximum of SN(x)S_N(x) near x=0+x = 0^+ occurs approximately at x∗=π/(N+1)x^* = \pi/(N+1) for large NN.
  3. Demonstrate that as N→∞N \to \infty, the overshoot of the partial sum above the function value f(0+)=1f(0^+) = 1 does not vanish but instead approaches the Gibbs constant ≈8.9%\approx 8.9\%.
Hint
Differentiate SN(x)=4π∑k=0Nsin⁡((2k+1)x)2k+1S_N(x) = \frac{4}{\pi}\sum_{k=0}^{N}\frac{\sin((2k+1)x)}{2k+1} and set the derivative to zero. Use the product-to-sum identity for the sum of cosines. The maximum value involves the integral 2π∫0πsin⁡uu du≈1.1789\frac{2}{\pi}\int_0^{\pi}\frac{\sin u}{u}\,du \approx 1.1789, giving an overshoot of approximately 17.9%17.9\% of the jump height.
View Solution
Solution to part 1: SN(x)=4π∑k=0Nsin⁡ ⁣((2k+1)x)2k+1=4π ⁣(sin⁡x+sin⁡3x3+⋯+sin⁡((2N+1)x)2N+1)S_N(x) = \frac{4}{\pi}\sum_{k=0}^{N}\frac{\sin\!\bigl((2k+1)x\bigr)}{2k+1} = \frac{4}{\pi}\!\left(\sin x + \frac{\sin 3x}{3} + \cdots + \frac{\sin((2N+1)x)}{2N+1}\right) Solution to part 2:

Differentiating and using the closed form SN′(x)=4π⋅sin⁡((2N+2)x)2sin⁡xS_N'(x) = \frac{4}{\pi}\cdot\frac{\sin((2N+2)x)}{2\sin x} (derived via telescoping product), setting SN′(x∗)=0S_N'(x^*) = 0 gives sin⁡((2N+2)x∗)=0\sin((2N+2)x^*) = 0, so x∗=π2N+2=π2(N+1)x^* = \frac{\pi}{2N+2} = \frac{\pi}{2(N+1)}. This is the first positive maximum of SNS_N.

Solution to part 3:

Substituting x∗≈π2N+2x^* \approx \frac{\pi}{2N+2} into SNS_N and taking the Riemann sum limit as N→∞N \to \infty:

lim⁡N→∞SN(x∗)=2π∫0πsin⁡uu du≈2π⋅1.8519≈1.1789\lim_{N\to\infty} S_N(x^*) = \frac{2}{\pi}\int_0^{\pi}\frac{\sin u}{u}\,du \approx \frac{2}{\pi}\cdot 1.8519 \approx 1.1789 The function value at the jump is f(0+)=1f(0^+) = 1, so the overshoot is 1.1789−1≈0.1791.1789 - 1 \approx 0.179. As a fraction of the jump size (which is 22), the relative overshoot is ≈8.9%\approx 8.9\%. This is the Gibbs constant: the partial sums of any Fourier series always overshoot by approximately 9%9\% of the total jump at a discontinuity, regardless of how many terms are taken.