# Calculate the Fourier series of the function

1. Sep 10, 2012

### Dustinsfl

Calculate the Fourier series of the function $f$ defined on the interval $[\pi, -\pi]$ by
$$f(\theta) = \begin{cases} 1 & \text{if} \ 0\leq\theta\leq\pi\\ -1 & \text{if} \ -\pi < \theta < 0 \end{cases}.$$
$f$ is periodic with period $2\pi$ and odd since $f$ is symmetric about the origin.
So $f(-\theta) = -f(\theta)$.
Let $f(\theta) = \sum\limits_{n = -\infty}^{\infty}a_ne^{in\theta}$.
Then $f(-\theta) = \sum\limits_{n = -\infty}^{\infty}a_ne^{-in\theta} = \cdots + a_{-2}e^{2i\theta} + a_{-1}e^{i\theta} + a_0 + a_{1}e^{-i\theta} + a_{2}e^{-2i\theta}+\cdots$
$-f(\theta) = \sum\limits_{n = -\infty}^{\infty}a_ne^{-in\theta} = \cdots - a_{-2}e^{-2i\theta} - a_{-1}e^{-i\theta} - a_0 - a_{1}e^{i\theta} - a_{2}e^{2i\theta}-\cdots$

$a_0 = -a_0 = 0$

I have solved many Fourier coefficients but I can't think today.

What do I need to do next?

2. Sep 10, 2012

### micromass

Staff Emeritus
Why don't you just find the Fourier coefficients by using the usual formula?? That is

$$a_n=\frac{1}{2\pi}\int_{-\pi}^\pi f(x)e^{-inx}dx$$

3. Sep 10, 2012

### LCKurtz

Or use the half-range sine expansion since it is an odd function.