6

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?

Git Gud
  • 31,356
ryang
  • 38,879
  • 14
  • 81
  • 179
  • What have you done? – draks ... Oct 16 '12 at 10:48
  • 2
    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 Erik 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 http://www.wolframalpha.com/input/?i=2%2Fpi+*+integrate+sin+x+sin+nx+from+0+to+pi as the general term for the coefficients, which I figure is zero since $\sin (n\pi)$ is zero for all integers n. – ryang Oct 16 '12 at 10:52
  • 1
    But for $n=1$ you need to integrate $\sin^2 x$. – Javier Oct 16 '12 at 10:55

1 Answers1

12

Wolfram gives the following:

$$ \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. $$

Javier
  • 7,298
  • 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. – ryang Oct 16 '12 at 11:17
  • 1
    We can still use the formula. Take the limit $n\to 1$. (+1) by the way. – user26872 Oct 16 '12 at 11:18
  • $\sin(nx)\neq 0$ for $2n+1$. The integral limits should probably be $0$ to $2\pi$, and then you'd end up with $\sin(2nx)= 0$. – Antoni Parellada Mar 26 '17 at 09:34