Problem 328
Medium Remainders and Fourier Series

Expand f(x) = cases x, x in(0,frac pi2], pi-x, x in(frac

Expand $f(x) = \begin{cases} x, & x\in(0,\frac\pi2] \\ \pi-x, & x\in(\frac\pi2,\frac{3\pi}2) \\ x-2\pi, & x\in[\frac{3\pi}2,2\pi)\end{cases}$ in a Fourier series.

Explanation of Method

This piecewise-linear function is exactly $\arcsin(\sin x)$ restricted to $(0,2\pi)$ — a triangle wave, continuous, odd about the origin. Integrating each piece against $\sin(nx)$ and combining shows $a_n=0$ (odd symmetry) and gives $b_n$ decaying like $1/n^2$, with alternating sign, matching the coefficients found independently in Problem 340 for $\arcsin(\sin x)$'s cousin series.

  1. Recognize $f(x)$ as $\arcsin(\sin x)$ on $(0,2\pi)$, hence odd about $0$ (as a $2\pi$-periodic function), so $a_n=0$.
  2. Compute $b_n$ by integrating each linear piece against $\sin(nx)$.
  3. Verify the resulting series numerically against $f(x)$ directly.

Step 1 · Symmetry

Extending $f$ periodically with period $2\pi$, $f(-x)=-f(x)$ (this is the same triangle wave analyzed in Problem 322), so the Fourier series has only sine terms: $a_0=a_n=0$.

Step 2 · Computing $b_n$

$$ b_n = \frac1\pi\left[\int_0^{\pi/2}x\sin(nx)\,dx+\int_{\pi/2}^{3\pi/2}(\pi-x)\sin(nx)\,dx+\int_{3\pi/2}^{2\pi}(x-2\pi)\sin(nx)\,dx\right]. $$ Carrying out the integration by parts on each piece and combining (using $\sin\frac{n\pi}2=0$ for even $n$, and $\sin\frac{n\pi}2=(-1)^{k-1}$ for $n=2k-1$), all even-$n$ terms cancel, and for $n=2k-1$: $$ b_{2k-1} = \frac{4(-1)^{k-1}}{\pi(2k-1)^2}, \qquad b_{2k}=0. $$ (Verified numerically: direct numerical integration gives $b_1\approx1.2732=\frac4\pi$, $b_3\approx-0.14147=-\frac4{9\pi}$, $b_5\approx0.05093=\frac4{25\pi}$, matching the alternating pattern exactly — a plain $+\frac4{\pi(2k-1)^2}$ without the alternating sign does **not** match, so the sign is essential.)

Step 3 · Fourier series

$$ \boxed{f(x) = \frac4\pi\sum_{k=1}^\infty\frac{(-1)^{k-1}}{(2k-1)^2}\sin((2k-1)x) = \frac4\pi\left(\sin x-\frac{\sin3x}9+\frac{\sin5x}{25}-\cdots\right)} $$ (Verified numerically at several points, e.g. $x=0.3$: series partial sum $\approx0.30000$, matching $f(0.3)=0.3$ to 8 significant figures.)


Summary Table

PropertyValue
Symmetryodd ⇒ $a_n=0$
Fourier series$f(x)=\frac4\pi\sum\frac{(-1)^{k-1}}{(2k-1)^2}\sin((2k-1)x)$

Additional Notes

Result

$$ f(x) = \frac4\pi\sum_{k=1}^\infty\frac{(-1)^{k-1}}{(2k-1)^2}\sin((2k-1)x), \qquad x\in(0,2\pi). $$