Find the Fourier series for the function defined by:

1.5k Views Asked by At

$f(x)=\pi$, $- \pi \le x \le \pi/2$

$f(x)=0$, $\pi/2 \lt x \le \pi$

I got:

$a_0=\frac{1}{\pi}\int_{-\pi}^{\pi/2}\pi dx=\frac{3\pi}{2}$

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

$b_n=\frac{1}{\pi}\int_{-\pi}^{\pi/2}\pi sin(nx)dx=\frac{1}{n}[cos(n\pi)-cos(\frac{n\pi}{2})]$

Therefore,

$f(x)=\frac{3\pi}{4}+\sum_{n=1}^{\infty}(\frac{1}{n}sin(\frac{n\pi}{2})cos(n\pi)+\frac{1}{n}[cos(n\pi)-cos(\frac{n \pi}{2})]sin(nx))$

Is this right?

1

There are 1 best solutions below

2
On BEST ANSWER

You are calculating the Fourier coefficients of the function $\:f(x) =\pi$ on the interval $-\pi<x<\pi/2$. You should be using integration by parts. i.e. $a_n = \frac{2}{l}\int_{-\pi}^{\pi/2} x\cos(\frac{n\pi}{l}x)dx$, where $l$ is the length of your interval.