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

How do I integrate :$\int_{0}^\pi \frac{\sin(n\theta)}{\sin \theta} d\theta$

I did the following: $\int_{0}^\pi \frac{\sin(n \theta)}{\sin \theta}d\theta = \mbox{Im} \int_{0}^{\pi} \frac{e^{i n \theta}}{\sin \theta} d\theta = \mbox{Im} \int_{0}^{\pi} 2i \frac{e^{i n \theta}}{e^{i \theta}-e^{- i \theta}} d\theta$

Put $z=e^{i \theta}$ then

$\mbox{Im} \int_{|z|=1} \frac{z^n}{(z^2-1)} dz$

Now I have problem , because the function $f(z)= \frac{z^n}{(z^2-1)}$ is not analytic on the boundary of the unit disk. Now I can not use the Cauchy Residue Theorem.

The answer is $0$ if $n$ is even and $\pi$ if $n$ is odd.

I stuck:

Any suggestions ?

• I'm hesitating to close this as a duplicate of this question, but my answer there describes a way to deal with simple poles on the contour. – Daniel Fischer Oct 22 '14 at 19:53
• Another way is $$\int_0^\pi \frac{\sin (n\theta)}{\sin \theta}\,d\theta = \frac{1}{2}\int_{-\pi}^\pi \frac{\sin (n\theta)}{\sin \theta}\,d\theta = \frac{1}{2} \int_{\lvert z\rvert = 1} \frac{z^n-z^{-n}}{z-z^{-1}}\frac{dz}{iz},$$ where the poles at $\pm 1$ cancel out. – Daniel Fischer Oct 22 '14 at 19:57

You certainly can use Cauchy's theorem here.

The integral is equal to

\begin{align}-\frac{i}{2} \oint_{|z|=1} \frac{dz}{z^n} \frac{z^{2 n}-1}{z^2-1} &= \frac{\pi}{(n-1)!} \frac{d^{n-1}}{dz^{n-1}}\left [ 1+z^2+z^4+\cdots+z^{2 n-2}\right ]_{z=0}\end{align}

The poles at $z=\pm 1$ cancel out, so the only pole is at $z=0$. When $n$ is even, the derivative term is clearly zero, as an odd derivative evaluated at zero is zero. When $n$ is odd, however, say $n=2 k+1$, then the result is

$$\frac{\pi}{(2 k)!} \frac{d^{2 k}}{dz^{2 k}} \left [ 1+z^2+z^4+\cdots+z^{4 k}\right ]_{z=0}$$

which is indeed $\pi$, as the only surviving derivative is attached to the $z^{2 k}$ term.

• This is really helpful. Thank you very much. – user178061 Oct 22 '14 at 20:22
• You repeated "when n is even". The second one should be odd (too small for an edit). The answer is still clear, of course – Sampaio Oct 23 '14 at 0:40
• @Sampaio: thanks for catching that. – Ron Gordon Oct 23 '14 at 0:41

There is a much simpler way using only a single trig identity by deriving a reduction formula. I'm not sure if you were specifically looking for a complex analysis method but I'll post it here anyway.

$$I_n = \int_0^\pi \frac{\sin(nt)}{\sin t} dt \\ I_{n+2}-I_n =\int_0^\pi \frac{\sin((n+2)t)-\sin(nt)}{\sin t} dt$$ Using $\ \sin a - \sin b = 2 \sin(\frac{a-b}{2})\cos(\frac{a+b}{2})$: $$I_{n+2}-I_n = 2 \int_0^\pi \frac{\sin t\cos((n+1)t)}{\sin t} dt = 2\int_0^\pi \cos((n+1)t)dt =0$$ Thus $\ I_{n+2}=I_n \ for \ n \ge 2 \$ and it only suffices to evaluate the integral for n=2 and n=3 and all other larger values of n follow by induction. $$I_2 = \int_0^\pi \frac{\sin 2t}{\sin t} dt = 2\int_0^\pi \frac{\sin t \cos t}{\sin t} dt = 2\int_0^\pi \cos t dt = 0 \$$ For I3, use the same identity as above but rearranged: $\ \sin 3t - \sin t= 2\cos 2t \sin t \ \therefore \ \sin 3t = \sin t (2 \cos 2t +1)$ $$I_3 = \int_0^\pi \frac{\sin 3t}{\sin t} dt =\int_0^\pi 2 \cos 2t+1 dt =\pi \\ I_n = 0 \ for \ even \ n \ge 2 \\ I_n = \pi \ for \ odd \ n \ge 3$$

Hint: $$\frac{\sin ((n+1)\theta)}{\sin\theta} = T_n(\cos\theta)$$ where $T_n$ is the second kind Tchebychev polynomial.

Then you can use the relation: $$\frac1{t^2 - 2tx + 1} = \sum_{n=0}^\infty T_n(x)t^n$$

• You might want to look into the parentheses in the first equation. – Alice Ryhl Oct 22 '14 at 19:56
• @Darksonn thanks buddy! – mookid Oct 22 '14 at 19:57