1^()circ Expand f(x)=|x| in a Fourier series on (
$1^\circ$ Expand $f(x)=|x|$ in a Fourier series on $(-\pi,\pi)$. $2^\circ$ Find $\sum_{n=1}^\infty\dfrac1{(2n-1)^2}$.
Explanation of Method
$f(x)=|x|$ is even, so only cosine terms appear. Integration by parts on $\int_0^\pi x\cos(nx)\,dx$ gives coefficients that vanish for even $n$ and decay like $1/n^2$ for odd $n$. Evaluating the series at $x=0$ directly extracts the sum of reciprocal odd squares.
- Compute $a_0$ and $a_n$ using evenness (only cosine terms, $b_n=0$).
- Evaluate the resulting series at $x=0$ to isolate $\sum 1/(2n-1)^2$.
- Cross-check against the Basel problem by splitting $\sum1/n^2$ into odd and even parts.
Part 1° · Fourier series
$f(x)=|x|$ is even: $$ a_0 = \frac2\pi\int_0^\pi x\,dx = \pi, \qquad a_n = \frac2\pi\int_0^\pi x\cos(nx)\,dx = \frac{2}{\pi n^2}\bigl[(-1)^n-1\bigr]. $$ So $a_n=0$ for even $n$, and $a_n=-\dfrac4{\pi n^2}$ for odd $n$: $$ \boxed{|x| = \frac\pi2 - \frac4\pi\sum_{k=1}^\infty\frac{\cos((2k-1)x)}{(2k-1)^2} = \frac\pi2-\frac4\pi\left(\cos x+\frac{\cos3x}9+\frac{\cos5x}{25}+\cdots\right)} $$
Part 2° · The sum
At $x=0$: $|0|=0$, so $$ 0 = \frac\pi2-\frac4\pi\sum_{k=1}^\infty\frac1{(2k-1)^2} \implies \boxed{\sum_{n=1}^\infty\frac1{(2n-1)^2}=\frac{\pi^2}8}. $$ Cross-check via the Basel problem: $\sum1/n^2=\pi^2/6$ splits into odd and even parts, $\sum1/(2k)^2=\frac14\cdot\frac{\pi^2}6=\frac{\pi^2}{24}$, so $\sum1/(2k-1)^2=\frac{\pi^2}6-\frac{\pi^2}{24}=\frac{\pi^2}8$. ✓
Summary Table
| Property | Value |
|---|---|
| Fourier series | $|x|=\frac\pi2-\frac4\pi\sum\frac{\cos((2k-1)x)}{(2k-1)^2}$ |
| Sum | $\sum\frac1{(2n-1)^2}=\frac{\pi^2}8$ |
Additional Notes
- Only odd harmonics contribute here, exactly as in Problem 328's triangle wave and Problem 329's parabolic-arc wave — all three are even, corner-having, piecewise-smooth functions whose cosine (or sine) coefficients decay like a power of $1/(2k-1)$.
- The identity $\sum1/(2n-1)^2=\pi^2/8$ is the odd-index companion to the Basel problem $\sum1/n^2=\pi^2/6$ derived independently in Problem 326, and the two together determine $\sum(-1)^{n-1}/n^2=\pi^2/12$.
- Because the coefficients decay as $1/n^2$, this series (unlike Problem 324's Leibniz series) converges absolutely and reasonably quickly.