# Find the half range cosine fourier series expansion for $f(x)=(x-1)^2,\quad 0<x<1$.

Find the half range cosine fourier series expansion for $$f(x)=(x-1)^2,\quad 0

and hence deduce that $$\pi^2=8\left(\frac 1 {1^2}+\frac 1 {3^2}+\frac 1 {5^2}+\ldots\right)\tag{1}$$

My work

I have derived that the expansion is $$f(x)=\frac 1 3+\sum\limits_{n=1}^\infty \frac 4 {n^2\pi^2} \cos n\pi x$$ But I could not deduce that $$(1)$$.

• Set $x=0$ then $x=1$ then subtract. – Alexey Burdin Jun 18 '15 at 5:18
• but in x=0 and 1 the function is not defined know...then how can i do this??@AlexeyBurdin – David Jun 18 '15 at 5:57

Define $f$ as a periodic function of $1$ on $\mathbb{R}$ as $$f(x)=(x−1)^2, \hspace{5 mm} 0\le x<1$$ Set $x=0$, then $$f(0)=1=\frac 1 3+\sum\limits_{n=1}^\infty \frac 4 {n^2\pi^2}$$

So we have $$\dfrac{2}{3}=\sum\limits_{n=1}^\infty \frac 4 {n^2\pi^2} \hspace{4 mm} \text{and} \hspace{4 mm} \dfrac{\pi^2}{6}=\sum\limits_{n=1}^\infty \dfrac1{n^2}$$

And set $x\to1^{-}$, then $$\lim\limits_{x\to1^{-}}f(x)=0=\frac 1 3+\sum\limits_{n=1}^\infty \frac 4 {n^2\pi^2} \cos n\pi$$

Thus \begin{align} \dfrac{\pi^2}{12}&=\sum\limits_{n=1}^\infty \dfrac1 {(2n-1)^2}-\sum\limits_{n=1}^\infty \dfrac1 {(2n)^2} \\ &=\sum\limits_{n=1}^\infty \dfrac1 {(2n-1)^2}-\frac1{4}\sum\limits_{n=1}^\infty \dfrac1 {n^2} \\ &=\sum\limits_{n=1}^\infty\dfrac1 {(2n-1)^2}-\dfrac{\pi^2}{24} \end{align}

So $$\sum\limits_{n=1}^\infty\dfrac1 {(2n-1)^2}=\dfrac{\pi^2}{8}$$

• how it hold even the fuction is not defined on 1 and 2. – David Jun 18 '15 at 6:39
• $f$ becomes a periodic function of $1$ so it repeats on $[1,2]$ from $[0,1]$, and that is why you get $f(x)=\frac 1 3+\sum\limits_{n=1}^\infty \frac 4 {n^2\pi^2} \cos n\pi x$. – hermes Jun 18 '15 at 6:44
• ya,,, thanks for the comment – David Jun 18 '15 at 7:02