Skip to main content

Fourier series: x − x²

Short answer

For f(x)=x-x² on (-π,π): a₀ = -2π²/3, aₙ = 4(-1)^{n+1}/n², bₙ = 2(-1)^{n+1}/n. Series: -π²/3 + Σ[4(-1)^{n+1}cos nx/n² + 2(-1)^{n+1}sin nx/n]. Setting x=0 yields 1/1² - 1/2² + 1/3² - ... = π²/12.

Find a Fourier series to represent f(x) = x − x² from x = −π to x = π. Hence show that 1/1² − 1/2² + 1/3² − 1/4² + ... = π²/12.

A function f(x) of period 2π on (−π, π) has the Fourier series f(x) = a₀/2 + Σ (aₙ cos nx + bₙ sin nx), with a₀ = (1/π)∫f dx, aₙ = (1/π)∫f cos nx dx, bₙ = (1/π)∫f sin nx dx (all over −π to π).

Coefficients for f(x) = x − x². Here x is odd and x² is even.

a₀ = (1/π)∫(x − x²)dx = (1/π)(−2π³/3) = −2π²/3
aₙ = (1/π)∫(x − x²)cos nx dx = −(1/π)∫x² cos nx dx      (x cos nx is odd)
   = −(2/π)[x² sin nx/n + 2x cos nx/n² − 2 sin nx/n³]₀^π
   = −(2/π)(2π cos nπ/n²) = −4(−1)ⁿ/n² = 4(−1)ⁿ⁺¹/n²
bₙ = (1/π)∫(x − x²) sin nx dx = (1/π)∫x sin nx dx    (x² sin nx is odd)
   = (2/π)[−x cos nx/n + sin nx/n²]₀^π = −2cos nπ/n = 2(−1)ⁿ⁺¹/n

Fourier series

f(x) = −π²/3 + Σ (n=1 to ∞) [ 4(−1)ⁿ⁺¹ cos nx / n² + 2(−1)ⁿ⁺¹ sin nx / n ]

= −π²/3 + 4(cos x − cos 2x/2² + cos 3x/3² − …) + 2(sin x − sin 2x/2 + sin 3x/3 − …)

Deduction. f(x) = x − x² is continuous at x = 0 and f(0) = 0. Put x = 0 (all sine terms vanish):

0 = −π²/3 + 4(1/1² − 1/2² + 1/3² − 1/4² + …)

Answer: 1/1² − 1/2² + 1/3² − 1/4² + … = π²/12.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Mathematics III chapter 4 questions →