Originally Posted by

**DarkMalice** Hello,

I'm working on the following functi(on

$\displaystyle f(x)= 0$ $\displaystyle x\epsilon[-\pi,0)$

$\displaystyle f(x)=1$ $\displaystyle x\epsilon[0,\pi)$

I was able to figure out the mean value by myself (which equals 1).

I got lost when it was time to figure out the cosine coefficient.

I was able to narrow it down to

$\displaystyle \frac{1}{n\pi} (sin(n\pi)-sin(0))$

after differentiating, but when I read my notes, it says the answer to that is 0.

I thought the answer would be

$\displaystyle \frac{sin(n\pi)}{n\pi}$

Can someone explain this to me?