TITLE: Evaluate the integral $\int_0^{\pi/2} \sin (2n x) \tan x\, dx$
QUESTION [7 upvotes]: Is there a elementary evaluation of the integral
$
\int_0^{\pi/2}  \sin (2n x) \tan x\, dx,
$
where $n$ is the natural number? This number is related to the Fourier sine coefficient for $\tan (x/2)$.

REPLY [5 votes]: Using the trigonometric identities 
$$
\sin(x)+\sin(y)=2\sin\left(\frac{x+y}2\right)\cos\left(\frac{x-y\vphantom{+}}2\right)\tag{1}
$$
and 
$$
2\sin(x)\sin(y)=\cos(x-y)-\cos(x+y)\tag{2}
$$
we get
$$
\begin{align}
[\sin(2(n+1)x)+\sin(2nx)]\tan(x)
&=2\sin((2n+1)x)\cos(x)\tan(x)\\
&=2\sin((2n+1)x)\sin(x)\\
&=\cos(2nx)-\cos(2(n+1)x)\tag{3}
\end{align}
$$
For $n\ge1$, we have
$$
\int_0^{\pi/2}\cos(2nx)\,\mathrm{d}x=0\tag{4}
$$
Therefore, integrating $(3)$ and applying $(4)$ yields
$$
\int_0^{\pi/2}\sin(2(n+1)x)\tan(x)\,\mathrm{d}x
=-\int_0^{\pi/2}\sin(2nx)\tan(x)\,\mathrm{d}x\tag{5}
$$
then noting
$$
\begin{align}
\int_0^{\pi/2}\sin(2x)\tan(x)\,\mathrm{d}x
&=2\int_0^{\pi/2}\sin(x)\cos(x)\tan(x)\,\mathrm{d}x\\
&=2\int_0^{\pi/2}\sin^2(x)\,\mathrm{d}x\\
&=\int_0^{\pi/2}(1-\cos(2x))\,\mathrm{d}x\\[4pt]
&=\frac\pi2\tag{6}
\end{align}
$$
gives that for $n\ge1$,
$$
\int_0^{\pi/2}\sin(2nx)\tan(x)\,\mathrm{d}x=(-1)^{n-1}\frac\pi2\tag{7}
$$