Problem 356
Medium Remainders and Fourier Series

Expand f(x)=cases1, x in (frac32,2), 3-x, x in(2,3) cases

Expand $f(x)=\begin{cases}1, & x\in\left(\frac32,2\right)\\3-x, & x\in(2,3)\end{cases}$ in a sine series on $\left(\dfrac32,3\right)$.

Explanation of Method

Shifting to $t=x-\frac32\in(0,\frac32)$ turns this into a standard half-range sine problem with half-period $l=\frac32$. The two pieces (constant, then linear) each contribute an elementary integral; combining and simplifying — using $\sin\frac{n\pi}2$ evaluated via $\cos(n\pi/3)$-type reasoning — yields a coefficient with both a $1/n$ piece and an $\sin(n\pi/3)/n^2$ piece.

  1. Shift to $t=x-\frac32$ and set up the half-range sine series with $l=\frac32$.
  2. Integrate both pieces (constant on $(0,\frac12)$, linear on $(\frac12,\frac32)$) and combine.
  3. Translate back to $x$ and simplify using $\sin(\theta-n\pi)=(-1)^n\sin\theta$.

Step 1 · Setup

Let $t=x-\frac32$, $l=\frac32$; then $g(t)=f(t+\tfrac32)=1$ on $(0,\frac12)$ and $g(t)=\frac32-t$ on $(\frac12,\frac32)$. The sine series is $g(t)=\sum b_n\sin\frac{n\pi t}l$, $b_n=\frac2l\int_0^lg(t)\sin\frac{n\pi t}l\,dt$.

Step 2 · Computing $b_n$

Direct integration by parts on both pieces and combining gives the closed form $$ b_n = \frac{2\pi n+3\sin\frac{n\pi}3}{\pi^2n^2} = \frac2{\pi n}+\frac{3\sin\frac{n\pi}3}{\pi^2n^2}. $$ (Verified via independent symbolic integration and numerically: $b_1\approx0.89986$, $b_2\approx0.38412$, $b_3\approx0.21221=\frac2{3\pi}$, matching a direct numerical integration of $g(t)$ exactly. An earlier attempt at this integral produced a substantially different — and incorrect — closed form; the formula above has been independently re-derived and verified.)

Step 3 · Translating back to $x$

Since $\sin\frac{n\pi t}l=\sin\left(\frac{2n\pi x}3-n\pi\right)=(-1)^n\sin\frac{2n\pi x}3$: $$ \boxed{f(x) = \sum_{n=1}^\infty(-1)^n\left[\frac2{\pi n}+\frac{3\sin\frac{n\pi}3}{\pi^2n^2}\right]\sin\frac{2n\pi x}3} $$ (Verified numerically at $x=1.6,1.9,2.3,2.7$: partial sums to $3000$ terms match $f(x)$ to 3+ decimal places.)


Summary Table

PropertyValue
Half-period$l=3/2$
Coefficient (in $t$)$b_n=\dfrac2{\pi n}+\dfrac{3\sin(n\pi/3)}{\pi^2n^2}$
Series (in $x$)$f(x)=\sum(-1)^nb_n\sin\dfrac{2n\pi x}3$

Additional Notes

Result

$$ f(x) = \sum_{n=1}^\infty(-1)^n\left[\frac2{\pi n}+\frac{3\sin\frac{n\pi}3}{\pi^2n^2}\right]\sin\frac{2n\pi x}3, \qquad x\in\left(\frac32,3\right). $$