Skip to main content

Fourier series of a function

Short answer

Fourier series: x + x² = π²/3 + Σ_{n=1}∞ [4(−1)^n cos nx / n² + 2(−1)^(n+1) sin nx / n]. At x=π, the mean of endpoints gives π² = π²/3 + 4 Σ 1/n², hence Σ 1/n² = π²/6.

Obtain a Fourier series to represent x + x² for −π ≤ x ≤ π and deduce that π²/6 = 1/1² + 1/2² + 1/3² + 1/4² + ...

f(x) = x + x² on (−π, π). Split into the odd part x and the even part x².

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 zero.)

Series

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

Deduction

At the end point x = π the series converges to the mean of the end values:

[f(π) + f(−π)]/2 = [(π + π²) + (−π + π²)]/2 = π²

At x = π, sin nπ = 0 and cos nπ = (−1)ⁿ, so

π² = π²/3 + 4 Σ (−1)ⁿ(−1)ⁿ/n² = π²/3 + 4 Σ 1/n²

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

✓ Answer checked by Claude Opus 5.5 (high effort)

All Mathematics III chapter 4 questions →