Homework Help: Fourier Series

1. Jan 16, 2016

struggles

1. The problem statement, all variables and given/known data
The odd 2π-periodic function f(x) is defined by
f(x) = x2 π > x > 0
-x2 −π<x<0
Find the coefficient bn in the Fourier series
f(x) = a0/2 + ∑(an cos(nx) + bn sin(nx)).
What are the values of the coefficients a0 and an and why?

2. Relevant equations
bn = 1/π ∫ f(x)sin(nx)
an = 1/π ∫f(x)cos(nx)
3. The attempt at a solution

I'm unsure what to do as the function changes so you cannot integrate between pi and -pi like you would normally. Also as the function is even would bn = 0?

2. Jan 16, 2016

Fightfish

The function doesn't "change" - it is defined in a piecewise manner. So, you just have to break up the integration interval accordingly.

Are you sure the function is even?

3. Jan 16, 2016

Samy_A

Redudant with @Fightfish 's post.

4. Jan 16, 2016

Ray Vickson

What are the integration limits? [You should always indicate this; it is an important part of your analysis.] Have you never before performed integrations of piece-wise funcctions (defined by different formulas in different regions? Why do you say in your final sentence that the function is even?

5. Jan 16, 2016

struggles

so would i just break it up to get bn = 1/π[∫π0 x2sin(nx) + ∫0 -x2sin(nx)]

6. Jan 16, 2016

Samy_A

Yes, and if you give it a little thought, computing one of the integrals (for each n) is all the work you need to do.

Last edited: Jan 16, 2016
7. Jan 16, 2016

struggles

so when integrating the 2 integrals are the same except for the sign changes. This means when n = odd I get bn = 2nπ2 - 8n3
and when n = even bn = -2nπ2. Does that sound feasible?

8. Jan 16, 2016

Samy_A

As your function is odd, $\displaystyle b_n=\frac{2}{\pi}\int_0^{\pi} x²\sin(nx) \, dx$.
I get something different for the $b_n$, but I can make a computation error just as you can.

9. Jan 16, 2016

struggles

I've re-done it to get (-1)n(-π2n-2n3)-(2n3) Thank you for all your help. Also would an = 0?

10. Jan 16, 2016

Samy_A

Still different from what I got, but again, you may have the correct result. Difficult to check without seeing the calculation.
$a_n$ is the definite integral of an odd function over $(-\pi,+\pi)$. The integrals between $(-\pi,0]$ and $[0,+\pi)$ cancel out. So yes, $a_n=0$.

11. Jan 17, 2016

Samy_A

Come to think of it, the Fourier coefficients of a continuous function (among others, but that is of no importance here) on $[-\pi, +\pi]$ satisfy a number of convergence properties.
For example, $\displaystyle \lim_{n\rightarrow +\infty}{a_n}=0,\ \lim_{n\rightarrow +\infty}{b_n}=0,\ \sum_{n=0}^\infty { |a_n|}^{2}<\infty, \sum_{n=1}^\infty { |b_n|}^{2}<\infty$.

Clearly the $b_n$ you got do not satisfy these properties.

Last edited: Jan 17, 2016