<s>[INST] Integral $\int\cos (2nx)\,\log \sin(x)\; dx $ Please help me out wrt this question - 
$$\int_0^\frac{\pi}2  \cos (2nx)\;  \log \sin(x)\; dx = -\frac  {\pi}{4n}$$
Here $n>1$.
I tried doing integration by parts but then how to calculate
$$\int_0^\frac{\pi}2  \cot (x) \,\sin (2nx)\, dx $$
The question is given under Improper Integrals. 
Thank you in advance. I really need to sort this out
 [/INST] A different approach.
By integrating by parts, one has
$$
\begin{align}
\int_0^{\Large \frac{\pi}2}  \cos (2nx)  \log \sin (x)\; dx&=\left[ \frac{\sin (2nx)}{2n}\cdot  \log \sin (x)\right]_0^{\Large \frac{\pi}2} -\frac{1}{2n}\int_0^{\Large \frac{\pi}2}  \sin (2nx)\: \frac{\cos (x)}{\sin (x)}\; dx
\\&=\color{red}{0}-\frac{1}{2n}\int_0^{\Large \frac{\pi}2}  \sin (2nx)\: \frac{\cos (x)}{\sin (x)}\; dx. \tag1
\end{align}
$$Let
$$
u_n:=\int_0^{\Large \frac{\pi}2}  \sin (2nx)\: \frac{\cos (x)}{\sin (x)}\; dx,\quad n\ge1.
$$ One may observe that, for $n\ge1$,
$$
\begin{align}
u_{n+1}-u_n&=\int_0^{\Large \frac{\pi}2}  \left[\frac{}{}\sin (2nx+2x)-\sin(2nx)\right]\cdot \frac{\cos (x)}{\sin (x)}\; dx
\\&=\int_0^{\Large \frac{\pi}2}  \left[2\frac{}{}\sin (x)\cdot \cos(2nx+x)\right]\cdot \frac{\cos (x)}{\sin (x)}\; dx\quad \left({\small{\color{blue}{\sin p-\sin q=2 \sin \frac{p-q}{2}\cdot \cos \frac{p+q}{2}}}}\right)
\\&=\int_0^{\Large \frac{\pi}2} 2\cdot\cos(2nx+x)\cdot \cos (x)\; dx
\\&=\int_0^{\Large \frac{\pi}2} \left[\frac{}{}\cos(2nx+2x)+\cos(2nx)\right] dx\qquad \quad \left({\small{\color{blue}{2\cos a \cos b= \cos (a+b)+ \cos (a-b)}}}\right)
\\\\&=\color{red}{0}  \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \left({\small{\color{blue}{\sin(m\cdot \pi)=0,\, m=0,1,2,\cdots }}}\right)
\end{align}
$$ giving
$$
u_{n+1}=u_n=\cdots=u_1=2\int_0^{\Large \frac{\pi}2}  \cos^2 (x)\; dx=\frac \pi2, \tag2
$$ then inserting $(2)$ in $(1)$ yields

$$
\int_0^{\Large \frac{\pi}2}  \cos (2nx)  \log \sin (x)\; dx=-\frac  {\pi}{4n},\qquad n\ge1
$$ 

as wanted.
</s>