# Fourier series of a lineer function

1. Oct 11, 2005

### gulsen

Hello,

My QP homework involves (not is) Fourier expansion. i think i'm done with the physics part and for the answer, i need to expand a function to fourier series and solve it. So far well, but I couldn't solve that simple function:

f(x) = x (in -1,1 interval)

I've found various series, but when I graph them, it doesn't match the original function.
I've tried:

$$a_0 = \frac{1}{T} \int_0^T {f(x) dx}$$
with T = 4 (well, is it 2 or 4!?), and got 8. similarly
$$a_n = \frac{1}{T} \int_0^T{f(x)cos(\frac{2 \pi n}{T}) dx}$$
and evertime I tried to solve, I've just messed it up.
Can someone help?...

2. Oct 11, 2005

### mathman

You've got the integration domain screwed up.
Your interval should be (-1,1) not (0,T). Furthermore since your function (x) is odd, a0 and all the cos coefficients will be 0. Your series will have only sin terms.

3. Oct 11, 2005

### Tom Mattson

Staff Emeritus
And on top of that, you shouldn't expect the graph of a Fourier series to match that of the original function. To do that a necessary (but not sufficient!) condition is that you have to include all of the infinitely many terms of the series.

4. Oct 12, 2005

### gulsen

thanks!
I know that I'll need infinite elements to get the original graph. I was just looking for similarity. But what about 1/T? should it be 1/2 or 1/1?

And by the way, there's also a function in the form of $$e^{-bx^2}$$ that should also be expanded to Fourier series. As far I know, there's no analytic solution for the intergral for that function. So how am I supposed to write a Fourier series???

5. Oct 12, 2005

### Tide

Regarding $e^{-bx^2}$, do you mean Fourier series or Fourier transform? If the latter then you can certainly do the integration.

6. Oct 12, 2005

### gulsen

I mean Fourier transfrom... well, since there's no analytic integral, it cannot be solved analyitcally?

7. Oct 13, 2005

### Tide

You certainly can evaluate the integral analytically:
$$\int_{-\infty}^{\infty}e^{-a x^2 + i k x}dx$$
Just complete the square in the exponential and you essentially have the integral of the Gaussian function for which you can obtain an analytic expression.