Skip to main content

Fourier series: 2x − x²

Short answer

With period 2 (l=1), compute a0 = 4/3, a_n = -4/(n²π²), b_n = 0. The Fourier series is 2x - x² = 2/3 - (4/π²) ∑_{n=1}^∞ (cos nπx)/n².

Find the Fourier series of f(x) = 2x − x² in (0, 2).

The interval has length 2l = 2, so l = 1 and the period is 2:

f(x) = a₀/2 + Σ [ aₙ cos nπx + bₙ sin nπx ]
a₀ = ∫₀² f dx,  aₙ = ∫₀² f cos nπx dx,  bₙ = ∫₀² f sin nπx dx

Put x = 1 + u. Then f = 1 − u² for u in (−1, 1), an even function of u, and cos nπx = (−1)ⁿ cos nπu, sin nπx = (−1)ⁿ sin nπu.

a₀ = ∫_{−1}^{1} (1 − u²) du = 4/3
aₙ = (−1)ⁿ ∫_{−1}^{1} (1 − u²) cos nπu du
   = (−1)ⁿ [ 0 − 4(−1)ⁿ/(nπ)² ] = −4/(n²π²)
bₙ = (−1)ⁿ ∫_{−1}^{1} (1 − u²) sin nπu du = 0   (odd integrand)

(using ∫_{−1}^{1} u² cos nπu du = 4(−1)ⁿ/(nπ)².)

Answer:

2x − x² = 2/3 − (4/π²) Σ_{n=1}^∞ (cos nπx)/n²
        = 2/3 − (4/π²) [ cos πx + (cos 2πx)/4 + (cos 3πx)/9 + ... ],   0 < x < 2

(Check at x = 1: f = 1; the series gives 2/3 + (4/π²)(π²/12) = 1 ✓.)

✓ Answer checked by Claude Opus 5.5 (high effort)

All Mathematics III chapter 4 questions →