Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to sketch several periods of the periodic function $f(x)$ below and expand it in an apporpriate Fourier series. I know there's a formula for expanding fourier series, but when I try I always get an error

$$f(x) = x^2,\,\, 0 < x < 10$$

share|cite|improve this question
up vote 3 down vote accepted

Working purely formally, so not worrying about convergence and justifying the interchange of the summation and integration, suppose we have


Then, recalling that $\frac{1}{\pi}\int_{-\pi}^{\pi}{e^{i(n-m)x}\ dx}=0$ if $n\neq m$ and $2$ otherwise, we can multiply each side of the expression by $e^{imx}$ and integrate, getting

$$\int_{-\pi}^{\pi}{x^{2}e^{imx}\ dx}=\sum_{n=-\infty}^{\infty}{\int_{-\pi}^{\pi}c_{-n}e^{i(m-n)x}\ dx}=2\pi c_{-m},$$

and so

$$c_{n}=\frac{1}{2\pi}\int_{-\pi}^{\pi}{x^{2}e^{-inx}\ dx}.$$

You can calculate this using integration by parts, and you'll find that

$$c_{n}=\frac{2((\pi^{2}n^{2}-2)\sin(\pi n)+2\pi n\cos(\pi n))}{n^{3}}.$$

At this point, notice that, as $n$ is always an integer, $\sin(\pi n)=0$ for each $n$, and $\cos(\pi n)=1$ if $n$ is even, $-1$ if $n$ is odd, i.e. $\cos(\pi n)=(-1)^{n}$. Then we have

$$c_{n}=\frac{4\pi n(-1)^{n}}{n^{3}}=\frac{4\pi(-1)^{n}}{n^{2}},$$

and so the Fourier series is


The only thing left to worry about now is convergence, which I suspect you aren't too bothered about. But just for the sake of giving a complete answer, $x^{2}$ is square-integrable on $[-\pi,\pi]$, and so Carleson's Theorem tells us that the Fourier series converges pointwise to $x^{2}$ for almost all $x$.

(In fact, as $\sin$ is an odd function, you'll be able to see that the series is actually just a sum of cosines)

share|cite|improve this answer
Also sorry for being difficult, but I just noticed that I hadn't really read your question properly, and overlooked the fact that you want to look at its Fourier series on $[0,10]$ rather than $[-\pi,\pi]$. The method is very similar, hopefully you'll be able to see how to easily modify what I did to get the appropriate series. Essentially, you can just carry it over by using a change of variables to make the orthogonality relation hold for $[0,10]$ and then changing a couple of lines of working in what I did. I guess it'll be a good exercise for you! – user123123 Nov 5 '12 at 7:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.