1

Is the Fourier sine series for $x^2$ equal to $\sum {2\pi\over 2m+1}-{8\over (2m+1)^3\pi} \sin ((2m+1)x)$? (just want to check that those multiple steps of intergation by parts did not slip me up). Thanks.

S L
  • 137

1 Answers1

5

The Fourier sine series is $x^2 = \sum_{n=1}^\infty a_n \sin( n x)$, where $a_n = \frac{2}{\pi} \int_0^\pi x^2 \sin( n x) \mathrm{d} x$. Now

$$ \begin{eqnarray} \frac{\pi}{2} a_n &=& \left. (-\frac{x^2}{n} \cos(n x)) \right\vert_{0}^{\pi} + \int_0^\pi ( \frac{2}{n} x) \cos(n x) \mathrm{d} x \\ &=& \left. (-\frac{x^2}{n} \cos(n x)) \right\vert_{0}^{\pi} + \left. (\frac{2 x}{n^2} \sin(n x)) \right\vert_{0}^{\pi} - \int_0^\pi \frac{2}{n^2} \sin( n x) \mathrm{d} x \\ &=& \left. \left( (-\frac{x^2}{n} \cos(n x)) + (\frac{2 x}{n^2} \sin(n x)) + \frac{2}{n^3} \cos(n x) \right) \right\vert_{0}^{\pi} \\ &=& (-1)^n \left(\frac{2}{n^3} -\frac{\pi^2}{n} \right) - \frac{2}{n^3} \end{eqnarray} $$

Thus $$ \begin{eqnarray} x^2 &=& \frac{2}{\pi} \sum_{n=1}^\infty \left( (-1)^n \left(\frac{2}{n^2} - \pi^2 \right) - \frac{2}{n^2} \right) \frac{\sin(n x)}{n} \\ &=& \frac{2}{\pi} \sum_{n=1}^\infty \left( \pi^2 - \frac{4}{(2n-1)^2}\right) \frac{\sin((2n-1)x}{2n-1} -\pi \sum_{n=1}^\infty \frac{\sin(2 n x)}{n} \end{eqnarray} $$ Where the last expression was arrived at by splitting summation over even and odd integers.


Added: As robjohn pointed out in comments, the resulting series approximates odd function $\operatorname{sign}(x) x^2$ on interval $(-\pi, \pi)$.

enter image description here

Sasha
  • 70,631
  • Since the period is (usually) either $[0,2\pi)$ or $(-\pi,\pi]$, shouldn't the coefficients be $\frac{1}{\pi}\int_0^{2\pi}x^2\sin(nx);\mathrm{d}x$ or $\frac{1}{\pi}\int_{-\pi}^{\pi}x^2\sin(nx);\mathrm{d}x$? (If the latter, then they're all $0$, which is to be expected since $x^2$ is even.) – robjohn Sep 21 '11 at 12:59
  • @robjohn: this is a half range series, that's why we are extending it:-) – S L Sep 21 '11 at 13:01
  • @SL: Hmm. Is that mentioned somewhere? So $f(-x) = -x^2$ for $x\in[0,\pi)$? – robjohn Sep 21 '11 at 13:04
  • @robjohn The period is $2\pi$, of course, but the symmetry of the integrand reduces $(-\pi, \pi)$ to $(0,\pi)$. The Fourier sine series gives a periodic odd function which coincides with the $x^2$ on $(0, \pi)$ interval. – Sasha Sep 21 '11 at 15:13
  • @Sasha: if the function is $x^2$ over $(-\pi,\pi)$, then the sine series should be $0$ since $x^2$ is even. Extending the sine series for $x^2$ from $(0,\pi)$ to $(-\pi,\pi)$ will give the function $x;|x|$ and not $x^2$. – robjohn Sep 21 '11 at 15:45