$f(x) = x$ on the interval $|x| < \pi/2$

39 Views Asked by At

I am trying to calculate the Fourier series of:

$f(x) = x$ on the interval $|x| < \pi/2$.

First, I observed that $f(x) =x$ is odd and thus $f(x) * \cos(nx)$ is odd. Hence, $a_n = 0$.

$b_n = 2/\pi \int_{-\pi/2}^{\pi/2} x*\sin(2nx)dx = 2/\pi[\frac{-xcos(2nx)}{2n}]_{-\pi/x}^{\pi/2} + 2/\pi\int_{-\pi/2}^{\pi/2}\frac{cos(2nx)}{2n}dx = 1$. But I hardly doubt that this would be correct.

What should I do next? Am I on the right track?

2

There are 2 best solutions below

0
On

Check your calculation of $b_n$. You should have $b_n = \dfrac{(-1)^{n+1}}n$.

0
On

Note that $$ \frac{-x\cos(2nx)}{2n}\big|_{-\pi/2}^{\pi/2} =\frac{1}{2n}(-\frac{\pi}{2}\cos(n\pi)-\frac{\pi}{2}\cos(n\pi))=\frac{-\pi}{2n}\cos(n\pi) $$ and $$ \int_{-\pi/2}^{\pi/2}\cos(2nx)\;dx=0\;. $$

So after integration by parts, you should have:

$$ \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} x \sin (2 n x) d x=\frac{-\pi \cos (\pi n)}{2 n}=\frac{\pi}{2n}(-1)^{n+1}$$