1

Hi I am practicing fourier series and am doing a problem that asks you to use $f(x) = |x|$ to derive the series representation

$\frac{\pi^2}{8} = \sum_{n=1}^\infty \frac{1}{(2n-1)^2}$

What I have done so far is say that $f(x) = |x|$ is an even function so this will be a fourier cos series. Then I calculate the coefficients,

$a_o = \int_{-\pi}^{\pi} |x|dx = \pi^2$

$a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} |x|cos(nx)dx = \frac{\pi n sin(\pi n) + cos(\pi n) -1}{n^2} = \frac{cos(\pi n) -1}{n^2}$

So then the series representation is,

$|x| = \frac{\pi^2}{2} + \sum_{n=1}^\infty \frac{cos(\pi n) -1}{n^2} cos(nx)$

but I don't see how this can represent $\frac{\pi^2}{8}$, does anyone have any ideas about how I can proceed?

anomaly
  • 25,364
  • 5
  • 44
  • 85

1 Answers1

5

Hints:

Observe that $\;\cos\pi n=(-1)^n\;$ , so in fact

$$\frac{\cos\pi n-1}{n^2}=\begin{cases}\;\;\;\;\;\,0,&n\text{ is even}\\{}\\-\cfrac2{n^2},&n\text{ is odd}\end{cases}$$

and now substitute $\;x=0\;$...and observe that you're lacking a factor $\;2\;$ in $\;a_n\;$ ...

Added on request : As written above, you're lacking a factor $\;2\;$ there:

$$a_n=\frac1\pi\int_{-\pi}^\pi|x|\cos nx\,dx=\frac2\pi\int_0^\pi x\cos nx\,dx=\left.\frac2{\pi n}x\sin nx\right|_0^\pi-\frac2{\pi n}\int_0^\pi\sin nx\,dx=$$

$$=\left.\frac2{n^2\pi}\cos nx\right|_0^\pi=\begin{cases}-\cfrac4{n^2\pi}\,,&n\text{ is odd}\\{}\\0\,,&n\text{ is even}\end{cases}$$

thus:

$$|x|=\frac{\pi^2}2-\frac4\pi\sum_{n=1,\,n\text{ odd}}^\infty\frac{\cos nx}{n^2}=\frac{\pi^2}2-\frac4\pi\sum_{n=1}^\infty\frac{\cos (2n-1)x}{(2n-1)^2}$$

Take now $\;x=0\;$ ( observe that you forgot to divide by $\;\pi\;$ in your calculation of $\;a_0\;$ ):

$$0=\frac{\pi}2-\frac4\pi\sum_{n=1}^\infty\frac1{(2n-1)^2}$$

and now you're done

DonAntonio
  • 211,718
  • 17
  • 136
  • 287
  • From here I get, $|0| = \frac{\pi^2}{2} + \frac{-2}{1^2} + 0 + \frac{-2}{3^2} + 0 + \dots $

    $|0| = \frac{\pi^2}{2} + \sum_{n=1}^\infty \frac{-2}{(2n-1)^2}$

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

    $\frac{\pi^2}{4} = \sum_{n=1}^\infty \frac{1}{(2n-1)^2}$

    But this is not $\frac{\pi^2}{8}$ as desired. Does anyone know what I a m doing wrong?

    – Rufus T. Strohm Nov 19 '16 at 18:20