Problem 324
Easy Remainders and Fourier Series

1^()circ Expand f(x)=x in a Fourier series on (- pi,pi).

$1^\circ$ Expand $f(x)=x$ in a Fourier series on $(-\pi,\pi)$. $2^\circ$ For which $x$ does the series equal $f(x)$? $3^\circ$ Express $\pi/2$ as a convergent numerical series. $4^\circ$ Find $\sum_{n=1}^\infty\frac{(-1)^{n-1}}{2n-1}$.

Explanation of Method

Since $f(x)=x$ is odd, its Fourier series has only sine terms. A single integration-by-parts computes $b_n$. Dirichlet's theorem (applicable here since $x$ is smooth on $(-\pi,\pi)$) then gives pointwise convergence, and evaluating the series at $x=\pi/2$ produces the classical Leibniz series for $\pi$.

  1. Compute $b_n$ via integration by parts, using oddness to skip $a_n$.
  2. Apply Dirichlet's theorem to determine where the series converges to $f(x)$.
  3. Evaluate the series at $x=\pi/2$ to extract the Leibniz series.

Part 1° · Fourier series

$f(x)=x$ is odd, so $a_0=a_n=0$ and $$ b_n = \frac2\pi\int_0^\pi x\sin(nx)\,dx = \frac2\pi\left[-\frac{x\cos(nx)}n\right]_0^\pi = -\frac{2\cos(n\pi)}n = \frac{2(-1)^{n+1}}n. $$ $$ \boxed{x = \sum_{n=1}^\infty \frac{2(-1)^{n+1}}n\sin(nx) = 2\left(\sin x-\frac{\sin2x}2+\frac{\sin3x}3-\cdots\right)} $$

Part 2° · Convergence

$f(x)=x$ is continuous and piecewise smooth on $(-\pi,\pi)$, so by Dirichlet's theorem the series converges to $f(x)=x$ at every $x\in(-\pi,\pi)$. At the endpoints $x=\pm\pi$, it converges to the average of the periodic extension's one-sided limits, $\frac{(-\pi)+\pi}2=0$.

Part 3° · A series for $\pi/2$

At $x=\frac\pi2$: $\sin\frac{n\pi}2$ is $0$ for even $n$ and $(-1)^{k+1}$ for $n=2k-1$, so only odd terms survive: $$ \frac\pi2 = 2\sum_{k=1}^\infty\frac{(-1)^{k+1}}{2k-1} \quad\Longrightarrow\quad \boxed{\frac\pi4 = 1-\frac13+\frac15-\frac17+\cdots} $$ the Leibniz formula for $\pi$.

Part 4° · The sum

$$ \boxed{\sum_{n=1}^\infty\frac{(-1)^{n-1}}{2n-1} = \frac\pi4} $$


Summary Table

PropertyValue
Fourier series$x=\sum\frac{2(-1)^{n+1}}n\sin(nx)$
Converges to $f(x)$for all $x\in(-\pi,\pi)$; to $0$ at $x=\pm\pi$
Leibniz series$\pi/4=1-1/3+1/5-1/7+\cdots$

Additional Notes

Result

$$ x=\sum_{n=1}^\infty\frac{2(-1)^{n+1}}n\sin(nx)\ \ (|x|<\pi); \qquad \sum_{n=1}^\infty\frac{(-1)^{n-1}}{2n-1}=\frac\pi4. $$