Fourier Expansion

173 Views Asked by At

A periodic function f(x) is defined by:

$ f(n) = \begin{cases} {-x^2} & \textrm{ for - π < x ≤ 0} \\ x^2 & \textrm{ for 0 ≤ x < π } \\ \end{cases} \space , \space\space\space f(x+2π)=f(x)$

Determine the Fourier expansion for $f(x)$; $\space$ that is

$ f(x) = \frac{a_0}{2} + \sum\limits_{n=1}^\infty a_n\space cos(nx) + \sum\limits_{n=1}^\infty b_n\space sin(nx)$ .


I had first found the needed coefficients $ \space a_0 , \space a_n, \space b_n $ using their definitions:

$ a_0 = \frac{1}{\pi} \space $$\int_{-\pi}^{\pi} f(x) \space dx$$ $

$a_n = \frac{1}{\pi} \space $$\int_{-\pi}^{\pi} f(x) \space cos(nx)\space dx$$ $

$b_n = \frac{1}{\pi} \space $$\int_{-\pi}^{\pi} f(x) \space sin(nx)\space dx$$ $

I had to use integration by parts for $ a_n$ and $b_n$. However $a_0$ was more straightforward to solve by just applying the piecewise function to the integral (no further integration techniques needed).

I kept getting $a_0 = 0$, $\space$ $b_n=0$, $\space$ $a_n=0$. I cannot spot an error in my calculations, could the Fourier expansion for the above piecewise function really be equal to zero? If so, is there a quicker way of determining that instead of evaluating the integrals only to notice to get a zero answer?

1

There are 1 best solutions below

2
On BEST ANSWER

Your function is odd and the interval is symmetric about zero, so the $a_n$, including $a_0$, should indeed be zero. But the $b_n$ should not be zero. Something that might help: because $f$ and $\sin$ are both odd, $\int_{-\pi}^\pi f(x) \sin(nx) dx = 2 \int_0^\pi x^2 \sin(nx)$. You can calculate that with integration by parts.