# Thread: Integrating a fourier series

1. ## Integrating a fourier series

Hi there. I wanted to intagrate the fourier series for $g(t)=t^2$ to get the fourier series for $f(x)=t^3$
So I thought making something like:

$f(t)=3\int_0^t x^2 dx$

I know that $g(t)=t^2\sim \frac{p^2}{3}+\sum_{n=1}^{\infty}\frac{4p^2(-1)^n}{n^2\pi^2}\cos\left (\frac{n\pi t}{p}\right)$

p is for the period.

Then
$f(t)\sim 3\left [\int_0^tp^2dx+\sum_{n=1}^{\infty}\frac{4p^2(-1)^n}{n^2\pi^2}\int_0^t\cos\left (\frac{n\pi t}{p}\right)dx \right ]$
$f(t)\sim 3\left [p^2t+\sum_{n=1}^{\infty}\frac{4p^3(-1)^n}{n^3\pi^3}\sin\left (\frac{n\pi t}{p}\right)dx \right ]$

Now this is wrong, but I don't know why. What I get with this looks like x, I think that's because of the term $p^2t$. But I don't know what I'm doing wrong. Perhaps I have to do something else, but I don't know what, it actually doesn't look pretty much like a Fourier series.

2. Well, you DID lose the factor of a 1/3 in your frequency-0 term. You multiplied p^2/3 by 3 and integrated it w.r.t. t and somehow ended up with 3p^2*t, in other words you multiplied it by 9 when you should have only multiplied it by 3. It should only be p^2*t.

3. You're right, I've missed that, but anyway that's not the problem. I just can't use the series expansion that I was trying to use, I know that now :P