# Thread: Fourier series expansion of x^2+x

1. ## Fourier series expansion of x^2+x

I have looked through just about every text i have and im having problems expanding this:

f(x) = x^2 + x 0<x<1

im having trouble as the range is not half i think.

2. Originally Posted by hardhell4me
I have looked through just about every text i have and im having problems expanding this:

f(x) = x^2 + x 0<x<1

im having trouble as the range is not half i think.
The Fourier series representation of a function on an interval $\displaystyle [c, c+2L]$ is:

$\displaystyle f(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\left[ a_n \cos(\pi n x/L)+b_n \sin(\pi nx/L) \right]$

where:

$\displaystyle a_n=\frac{1}{L}\int_c^{c+2L} f(x) \cos(\pi n x/L) ~dx$

and:

$\displaystyle b_n=\frac{1}{L}\int_c^{c+2L} f(x) \sin(\pi n x/L) ~dx$

So now for your problem $\displaystyle c=0$ and $\displaystyle L=1/2$.

RonL

3. okay... im gonna give that a try, thank you...

so will i use the same formula for:

f(x)=e^x -pi<x<pi

and what about the piecewise function:

f(x)= 0 -pi<x<0
(e^x) -1 0<x<pi

see im confused cause these are not periodic functions and the only examples i can find online involve periodic functions.

i tried the one below, please check if i followed the right path:

4. Originally Posted by hardhell4me
okay... im gonna give that a try, thank you...

so will i use the same formula for:

f(x)=e^x -pi<x<pi

and what about the piecewise function:

f(x)= 0 -pi<x<0
(e^x) -1 0<x<pi

see im confused cause these are not periodic functions and the only examples i can find online involve periodic functions.
The periodicity or not of the function is irrelevant, we are taking a trignometrical expansion on the given interval.

Now it does happen to be the case that the series expansion will define a periodic function with period equal to the length of the given interval when considered as a function on $\displaystyle \mathbb(R)$ which happens to agree with the original function on the given interval. If the original function has meaning outside the given interval it need not agree with the Fourier series there.

RonL

5. Originally Posted by hardhell4me
i tried the one below, please check if i followed the right path:

The parity of the function is not relevant here, as the interval over which we are expanding is not symmetric anout zero, so you need sine terms as well.

Also there seems to be confusion over the value of $\displaystyle L$, this should be half the length of the interval or $\displaystyle \pi$ in this case.

RonL

6. thank you, i will bash through these problems using your formula