# Fourier series for $\sin x$ is zero?

I have no practical reason for wanting to do this, but I was wondering why the Fourier series for $\sin x$ is the identical zero function.

I'm probably doing something wrong or missing some important condition.

Could someone help me see?

-
What have you done? – draks ... Oct 16 '12 at 10:48
Why do you believe it is the zero function? $\sin(x)=1\cdot \sin(x)+0\cdot \sin(2x)+0\cdot \sin(3x)+\cdots$. – Per Manne Oct 16 '12 at 10:48
@draks Oh then I must've gotten the coefficients wrong. The period of $\sin x$ is $2\pi$, so I got wolframalpha.com/input/?i=2%2Fpi+*+integrate+sin+x+sin+nx+from+0+to+p‌​i as the general term for the coefficients, which I figure is zero since $\sin (n\pi)$ is zero for all integers n. – Ryan Oct 16 '12 at 10:52
But for $n=1$ you need to integrate $\sin^2 x$. – Javier Oct 16 '12 at 10:55

$$\frac2{\pi}\int_{0}^{\pi} \sin x \sin (nx)\ dx = -\frac{2\sin(n\pi)}{\pi(n^2-1)}$$
You are almost correct in that this is zero for all $n$ because $\sin(n\pi) = 0$ for every integer. But when $n=1$, the formula doesn't work, because the $n^2-1$ in the denominator becomes zero too. You need to consider that as a special case:
$$\frac2{\pi}\int_{0}^{\pi} \sin x \sin (1x)\ dx = \frac2{\pi}\int_0^{\pi} \sin^2 x \ dx = \frac2{\pi} \frac{\pi}{2} = 1.$$
Oh yes, I just saw that too. The special case needed to be introduced at the point of trying to integrate $\cos( (1-n)x)$. Heehee! Thanks Javier. – Ryan Oct 16 '12 at 11:17
We can still use the formula. Take the limit $n\to 1$. (+1) by the way. – user26872 Oct 16 '12 at 11:18