Fourier series for the function as defined below

39 Views Asked by At

$$ f(x) = \begin{cases} \pi & -\pi \leq x \leq \pi/2 \\ 0 & \pi/2< x < \pi\end{cases}$$

I tried following the definition to find the coefficients of the Fourier series for the above function but my answer doesn't match with the one given. Please help; I am a beginner at this.

1

There are 1 best solutions below

1
On

You have to solve the following 3 integrals:

$$a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\ dx=\int_{-\pi}^{\pi/2}1\ dx=\frac{3\pi}{2}$$ $$a_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\ \cos(nx)\ dx=\int_{-\pi}^{\pi/2}\cos(nx)\ dx=\frac{1}{n}(\sin(n\pi/2)-\sin(-n\pi))$$ $$b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\ \sin(nx)\ dx=\int_{-\pi}^{\pi/2}\sin(nx)\ dx=-\frac{1}{n}(\cos(n\pi/2)-\cos(-n\pi))$$

and finally distinguish several cases on $n\in\mathbb{N}$ for actual evaluation of the right hand sides.

--- rk