6
$\begingroup$

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?

  • 1
    But for $n=1$ you need to integrate $\sin^2 x$.2012-10-16

1 Answers 1

13

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

  • 0
    $\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$.2017-03-26