Computing $ \int_{0}^{2\pi}\frac{\sin(nx)}{\sin(x)} \mathrm dx $

I would like to compute:

$$ \int_{0}^{2\pi}\frac{\sin(nx)}{\sin(x)} \mathrm dx $$

We have:

$$ \int_{0}^{2\pi}\frac{\sin(nx)}{\sin(x)}\mathrm dx=2\int_{0}^{\pi}\frac{\sin(nx)}{\sin(x)}\mathrm dx$$

So: $ n \geq 2$ $$ \int_{0}^{\pi}\frac{\sin((n+1)x)}{\sin(x)}\mathrm dx= \ln(\sin(x))\sin(nx)\vert_0^{\pi}-n\int_{0}^{\pi} \ln(\sin(x))\cos(nx)\mathrm dx $$

$$ =-n\int_{0}^{\pi} \ln(\sin(x))\cos(nx)\mathrm dx$$

...


Solution 1:

Use the identity $$\sin((n+1)x)-\sin((n-1) x)=2\cos(nx)\sin(x).$$

So it is an induction like the one you attempted. But instead of incrementing exponents by $1$, which creates a bit of a mess, we increment by $2$. Start with the cases $n=1$ and $n=2$, and treat the even and odd cases separately. Dividing the right-hand side by $\sin x$ leaves something very pleasant, whose integral is even more pleasant!

Remark: Note that for $n=2$, we are integrating $\frac{\sin 2x}{x}$. Since $\sin 2x=2\sin x\cos x$, our integral is $0$. So the odd and even cases yield quite different answers. If you ask a graphing program to graph $\frac{\sin nx}{x}$ for a few even $n$, you will see why. The cancellation is also visualizable without electronic aids. And you can prove directly that the integral is $0$, by breaking up the interval of integration into $0$ to $\pi$, and $\pi$ to $2\pi$. For even $n$, a suitable change of variable transforms the second integral into the negative of the first.

Solution 2:

$$\sin(nx) = \sin x \cos(n-1)x + \cos x \sin(n-1)x$$

$\\$ $$\int\frac{\sin x \cos((n-1)x) + \cos x \sin((n-1)x)}{\sin x} \text{d}x $$

or:

$$ \int (\cos((n-1)x) + \frac{\cos x \sin((n-1)x)}{\sin x})\text{d}x $$

Which equals to:

$$\frac{\sin((n-1)x)}{n-1}+\int\frac{\cos x \sin((n-1)x)}{\sin x}\text{d}x$$

So, the problem is evaluating,

$$\int\frac{\cos x \sin((n-1)x)}{\sin x})\text{d}x$$

From some trig identities, we will get that,

$$\cos x \sin((n-1)x) = \frac{1}{2}(\sin(nx) + \sin((n-2)x)$$

Hence our "problematic" integral becomes to:

$$ \int\frac{\frac{1}{2}(\sin(nx) + \sin((n-2)x)}{\sin x} $$

Or:

$$ \frac{1}{2}\int\frac{\sin(nx)}{\sin x}+\frac{1}{2}\int\frac{\sin(n-2)x}{\sin x}$$

And if we go back and say note our original integral as:

$$ I_n=\int\frac{\sin(nx)}{\sin x}\text{d}x $$

by our above observation, we can conclude:

$$ I_n=\frac{\sin((n-1)x}{n-1}+\frac{1}{2}I_n+\frac{1}{2}I_{n-2}$$

or:

$$ I_n=2 \frac{\sin((n-1)x)}{n-1}+I_{n-2}$$

Could you proceed?

Solution 3:

$$ \sin((n+2)x)-\sin(nx)=2\sin(x)\cos((n+1)x)$$

$$ \int_{0}^{2\pi}\frac{\sin((n+2)x)}{\sin(x)}\mathrm dx-\int_{0}^{2\pi}\frac{\sin(nx)}{\sin(x)}\mathrm dx=2\int_{0}^{2\pi} \cos((n+1)x)\mathrm dx=0$$

$$ \int_{0}^{2\pi}\frac{\sin((n+2)x)}{\sin(x)}\mathrm dx=\int_{0}^{2\pi}\frac{\sin(nx)}{\sin(x)}\mathrm dx $$

If n is odd:

$$ \int_{0}^{2\pi}\frac{\sin(nx)}{\sin(x)}\mathrm dx=\int_{0}^{2\pi}\frac{\sin(x)}{\sin(x)}\mathrm dx=2\pi $$

If n is even:

$$ \int_{0}^{2\pi}\frac{\sin(nx)}{\sin(x)}\mathrm dx=\int_0^{2\pi}0 \; \mathrm dx=0 $$