I was browsing this thread when I came across this answer. I can neither make heads nor tail of it. Can someone help me understand it?
This I understand: $$\int_0^{2\pi}e^{ikx}\,dx=\left\{\begin{array}{cl}0&k\ne0\\ 2\pi&k=0\end{array}\right.,$$
But how does he get this? Where does the summation come from?
$$\int_0^{2\pi}\sin^{100}x\,dx=\frac1{2^{100}}\sum_{k=0}^{100}\binom{100}{k}\int_0^{2\pi}e^{ikx}(-1)^{100-k}e^{-i(100-k)x}\,dx=\frac{\binom{100}{50}}{2^{100}}2\pi.$$
EDIT: The answer is so obvious...I can't believe I didn't notice it! I kept expanding $\sin^{100}(x)$ as $\frac{1}{2i} (e^{100ix} + e^{-100ix})$ which got me nowhere.