Question 2 of 7: Fourier Series and a Classical Series Identity
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
National Exams — May 2013 — 04-BS-5 Advanced Mathematics. Three-hour, closed-book exam (one double-sided 8.5"×11" aid sheet permitted; approved Casio/Sharp calculator allowed). Format: seven questions of equal value (20 marks each); any five constitute a complete paper and only the first five appearing in the answer book are marked. All seven are solved below for completeness.
Reference texts: Kreyszig, Advanced Engineering Mathematics (10th ed., Wiley) — power-series solutions of ODEs (Ch. 5), Fourier series and the Fourier transform (Ch. 11), least-squares curve fitting, Lagrange interpolation, Romberg integration and root-finding (Ch. 19); Strang, Introduction to Linear Algebra (6th ed., Wellesley-Cambridge) — the Cayley–Hamilton theorem and matrix inversion.
Question 2: Fourier Series and a Classical Series Identity (a) 14, (b) 6 marks
Given. $f(x)=2\pi x-x^2$ on one period $0\le x\le2\pi$, extended periodically with period $p=2\pi$.
Find. (a) The Fourier series $\tfrac{a_0}2+\sum(a_n\cos nx+b_n\sin nx)$. (b) Use it to prove $\sum_{n=1}^{\infty}(-1)^{n+1}/n^2=\pi^2/12$.
Approach. (a) Integrate directly for $a_0$, and integrate by parts twice for $a_n$ (using $f$'s symmetry about $x=\pi$ to see $b_n=0$ without computing it). (b) Evaluate the series at a point where $f$ is known exactly and solve for the target sum.
Compute the constant term $a_0/2$.
$$a_0=\frac1\pi\int_0^{2\pi}(2\pi x-x^2)\,dx=\frac1\pi\Big[\pi x^2-\tfrac13x^3\Big]_0^{2\pi}=\frac1\pi\Big(4\pi^3-\tfrac83\pi^3\Big)=\dfrac{4}{3}\pi^2$$
$$\boxed{\dfrac{a_0}{2}=\dfrac{2\pi^2}{3}}$$
Compute $a_n$ by integrating by parts twice. The boundary terms vanish because $\sin(2\pi n)=\sin0=0$; carrying out $\int_0^{2\pi}(2\pi x-x^2)\cos(nx)\,dx/\pi$ term by term,
$$\boxed{a_n=-\dfrac{4}{n^2}}\qquad(n=1,2,3,\dots)$$
Compute $b_n$ using the midpoint symmetry, and assemble the series. Since $f(\pi+t)=2\pi(\pi+t)-(\pi+t)^2=\pi^2-t^2=f(\pi-t)$, $f$ is symmetric about $x=\pi$, so the sine coefficients vanish: $b_n=0$. Hence
$$f(x)=\boxed{\dfrac{2\pi^2}{3}-4\sum_{n=1}^{\infty}\dfrac{\cos(nx)}{n^2}},\qquad 0\le x\le2\pi.$$
(b) Substitute $x=\pi$, a point where $f$ is known exactly. $f(\pi)=2\pi(\pi)-\pi^2=\pi^2$, and $\cos(n\pi)=(-1)^n$, so the series gives
$$\pi^2=\dfrac{2\pi^2}{3}-4\sum_{n=1}^{\infty}\dfrac{(-1)^n}{n^2}$$
Solve for the target sum.
$$4\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2}=\frac{2\pi^2}{3}-\pi^2=-\frac{\pi^2}{3}\ \Longrightarrow\ \sum_{n=1}^{\infty}\frac{(-1)^n}{n^2}=-\frac{\pi^2}{12}$$
Multiplying by $-1$ turns $(-1)^n$ into $(-1)^{n+1}$:
$$\boxed{\sum_{n=1}^{\infty}\dfrac{(-1)^{n+1}}{n^2}=\dfrac{\pi^2}{12}}\qquad\blacksquare$$