Skip to main content

Fourier series: x − x²

Short answer

Fourier series on (-π,π): f(x) = -π^2/3 + Σ_{n=1}^∞ [4(-1)^(n+1)/n^2 cos nx + 2(-1)^(n+1)/n sin nx]. Evaluating at x=0 gives 0 = -π^2/3 + 4(1/1^2 - 1/2^2 +...), hence π^2/12 = 1/1^2 - 1/2^2 + 1/3^2 - ...

Obtain the Fourier series to represent f(x) = x − x² from x = −π to x = π and hence deduce that π²/12 = 1/1² − 1/2² + 1/3² − 1/4² + ...

f(x) = x − x² on (−π, π). Use ∫ x² cos nx dx and ∫ x sin nx dx over (−π, π), with cos nπ = (−1)ⁿ.

Coefficients

a₀ = (1/π) ∫_{−π}^{π} (x − x²) dx = (1/π)(−2π³/3) = −2π²/3
aₙ = (1/π) ∫ (x − x²) cos nx dx = −(1/π)∫ x² cos nx dx = −4(−1)ⁿ/n²
bₙ = (1/π) ∫ (x − x²) sin nx dx = (1/π)∫ x sin nx dx = 2(−1)ⁿ⁺¹/n

(x cos nx and x² sin nx are odd, so they integrate to 0; ∫{−π}^{π} x² cos nx dx = 4π(−1)ⁿ/n² and ∫{−π}^{π} x sin nx dx = 2π(−1)ⁿ⁺¹/n.)

Series

x − x² = −π²/3 + Σ_{n=1}^∞ [ 4(−1)ⁿ⁺¹/n² · cos nx + 2(−1)ⁿ⁺¹/n · sin nx ]
       = −π²/3 + 4cos x − cos 2x + (4/9)cos 3x − ...
         + 2 sin x − sin 2x + (2/3) sin 3x − ...

Deduction

The function is continuous at x = 0 and f(0) = 0, with sin 0 = 0 and cos 0 = 1:

0 = −π²/3 + 4 [ 1/1² − 1/2² + 1/3² − 1/4² + ... ]

Hence π²/12 = 1/1² − 1/2² + 1/3² − 1/4² + ... ∎

✓ Answer checked by Claude Opus 5.5 (high effort)

All Mathematics III chapter 4 questions →