# Evaluate definite integral $\int_{0}^{\pi/2}\sin 2x\ln(\tan x)dx$

How to evaluate $$\int_{0}^{\pi/2}\sin 2x\ln(\tan x)dx\space \text{?}$$

Let $$I=\int_{0}^{\pi/2}\sin 2x\ln(\tan x)dx$$ $$I=\int_{0}^{\pi/2}\left(\frac{2\tan x}{1+\tan^2 x}\right)\ln\left(\tan x\right)dx$$ $$I=\int_{0}^{\pi/2}\frac{2\tan x\sec^2 x}{(1+\tan^2 x)^2}\ln\left(\tan x\right)dx$$ Let $\tan x=t\implies \sec^2 xdx=dt$ $$I=\int_{0}^{\infty}\frac{2t}{(1+t^2)^2}\ln\left(t\right)dt$$

Any hint to proceed further or some easier method to solve this will be appreciated. Thanks!

After working hard on the integral above, I found an easier way to solve.

Use the property of definite integral $\color{blue}{\int_{0}^{a}f(x)dx=\int_{0}^{a}f(a-x)dx}$ as follows

$$I=\int_{0}^{\pi/2}\sin 2x \ln({\tan x}) dx\tag 1$$ $$\implies I=\int_{0}^{\pi/2}\sin 2\left(\frac{\pi}{2}-x\right) \ln\left({\tan\left(\frac{\pi}{2}-x\right)}\right) dx$$ $$\implies I=\int_{0}^{\pi/2}\sin 2x \ln\left({\cot x}\right) dx$$ $$\implies I=\int_{0}^{\pi/2}\sin 2x \ln\left({\tan x}\right)^{-1} dx$$ $$\implies I=-\int_{0}^{\pi/2}\sin 2x \ln\left({\tan x}\right) dx\tag 2$$Adding the eq(1) & (2), we have $$2I=0$$ $$\implies \color{blue}{I=0}$$

• Nice, yet you did this several hours after the last of the other answers is posted, so you at least knew the outcome . Anyway, good and helpful answers deserve your upvote. – user177692 Jul 15 '15 at 15:30

Note that $$\sin(2x)\ln(\tan(x))=2\sin(x)\cos(x)\ln(\sin(x))-2\sin(x)\cos(x)\ln(\cos(x))$$

So your integral may be written as:

$$\int_0^{\pi/2}2\sin(x)\cos(x)\ln(\sin(x))dx-\int_0^{\pi/2}2\sin(x)\cos(x)\ln(\cos(x))dx$$

Then use $u$-sub with $\sin(x)$ and $\cos(x)$ in the first and second integrals.

hint: $I=I_1-I_2=\displaystyle \int2\sin x\cos x\ln(\sin x)dx - \displaystyle \int2\sin x\cos x \ln(\cos x)dx$. For $I_1$, let $t = \sin x$, and for $I_2$, let $t = \cos x$, and do integration by parts for each of them.

Substitute

$$u=x-\frac\pi4\implies du=dx\implies$$

$$\int_0^{\pi/2}\sin2x\log\tan x\,dx=\int_{-\pi/4}^{\pi/4}\sin\left(\frac\pi2-2x\right)\log\tan\left(\frac\pi4-x\right)dx=$$

$$\int_{-\pi4}^{\pi/4}\cos2x\log\tan\left(\frac\pi4-x\right)dx$$

But the last integral's function, call it $\;g(x)\;$ , is an even function because $\;g(-x)=g(x)\;$ , since for $\;-\dfrac\pi4<x<\dfrac\pi4\;$ :

$$\log\tan\left(\frac\pi4-x\right)=-\log\tan\left(\frac\pi4+x\right)=\log\cot\left(\frac\pi4+x\right)\iff \tan\left(\frac\pi4-x\right)=\cot\left(\frac\pi4+x\right)$$

$$\iff \frac{1-\tan x}{1+\tan x}=\frac{1-\tan x}{1+\tan x}\;\;\;\color{green}\checkmark$$

Thus, the integral, in case it converges, equals zero. I'll leave it to you to show your improper integral indeed converges (hint: use l'Hospital in both extremes to show those are removable discontinuities)

Another possible way for the antiderivative first : change variable $t=\tan(x)$, $\sin(2x)=\frac{2t}{1+t^2}$,$dx=\frac{2}{1+t^2}$. All of that makes $$I=\int\sin (2x)\log(\tan x)dx=\int\frac{ 2t }{\left(t^2+1\right)^2}\,\log (t)\, dt$$ Now, integration by parts $u=\log(t)$, $v'=\frac{ 2t }{\left(t^2+1\right)^2}dt$, $u'=\frac {dt}t$, $v=-\frac{1}{t^2+1}$ which make $$I=\int\frac{ 2t }{\left(t^2+1\right)^2}\,\log (t)\, dt=-\frac{\log (t)}{t^2+1}+\int\frac{dt}{t \left(t^2+1\right)}$$ Now, partial fraction decomposition $$\frac{1}{t \left(t^2+1\right)}=\frac{1}{t}-\frac{t}{t^2+1}$$ I am sure that you can take from here.

• Hi @Claude : when you substitute $\;t=\tan x\;$ , the new limits for the integral are $\;0\,,\,\,\infty\;$ , but then after integrating by parts you get $\;-\dfrac{\log t}{t^2+1}\;$ , and this has no finite limit when $\;t\to0^+\;$. Thus, either the substitution fails or the integration by parts does. I remark I did not check your work, just the outcome of it. – Timbuc Jul 16 '15 at 11:08
• @Timbuc. After simplification, the antiderivative is $\frac{t^2 \log (t)}{t^2+1}-\frac{1}{2} \log \left(t^2+1\right)$ for which the limits are $0$ and $0$. But, I can be wrong, for sure. – Claude Leibovici Jul 16 '15 at 11:15
• But look at the middle of your answer: the value of your integral $\;I\;$ depends also in the value of $\;\left.-\dfrac{\log t}{t^2+1}\right|_0^\infty\;$ , and for this you need to pass to the limit when $\;t\to0^+\;$ which, if I'm not wrong, doesn't exist finitely . Am I missing something? That wouldn't be that odd, of course... – Timbuc Jul 16 '15 at 11:17
• @Timbuc. I think that you are correct and that I have a problem. Thanks for pointing it ! Cheers :-( – Claude Leibovici Jul 16 '15 at 11:19

You can solve this one by parts as: $$\int _{ 0 }^{ \frac { \pi }{ 2 } }{ \sin { 2x } \ln { \left( \tan { x } \right) dx= } }$$ $$-\frac { 1 }{ 2 } \int _{ 0 }^{ \frac { \pi }{ 2 } }{ \ln { \left( \tan { x } \right) d\cos { 2x } = } }$$ $$-\frac { 1 }{ 2 } \left[ { \cos { 2x } \ln { \left( \tan { x } \right) } }_{ 0 }^{ \frac { \pi }{ 2 } }-\int _{ 0 }^{ \frac { \pi }{ 2 } }{ \cos { 2x } \frac { 2 }{ \sin { 2x } } dx } \right] =$$ $$=-\frac { 1 }{ 2 } \left[ { \cos { 2x } \ln { \left( \tan { x } \right) } }_{ 0 }^{ \frac { \pi }{ 2 } }-2\int _{ 0 }^{ \frac { \pi }{ 2 } }{ \frac { \cos { 2x } }{ \sin { 2x } } dx } \right]$$ $$=-\frac { 1 }{ 2 } \left[ { \cos { 2x } \ln { \left( \tan { x } \right) } }_{ 0 }^{ \frac { \pi }{ 2 } }-\int _{ 0 }^{ \frac { \pi }{ 2 } }{ \frac { \cos ^{ 2 }{ x } -\sin ^{ 2 }{ x } }{ \sin { x\cos { x } } } dx } \right] =$$ $$=-\frac { 1 }{ 2 } \left[ { \cos { 2x } \ln { \left( \tan { x } \right) } }_{ 0 }^{ \frac { \pi }{ 2 } }-\int _{ 0 }^{ \frac { \pi }{ 2 } }{ \left( \frac { \cos { x } }{ \sin { x } } -\frac { \sin { x } }{ \cos { x } } \right) dx } \right]$$ $$=-\frac { 1 }{ 2 } \left[ { \cos { 2x } \ln { \left( \tan { x } \right) } }_{ 0 }^{ \frac { \pi }{ 2 } }-\int _{ 0 }^{ \frac { \pi }{ 2 } }{ \frac { d\sin { x } }{ \sin { x } } -\int _{ 0 }^{ \frac { \pi }{ 2 } }{ \frac { d\cos { x } }{ \cos { x } } } } \right]$$ $$=-\frac { 1 }{ 2 } \left[ { \cos { 2x } \ln { \left( \tan { x } \right) } }_{ 0 }^{ \frac { \pi }{ 2 } }-{ \ln { \sin { x } } }_{ 0 }^{ \frac { \pi }{ 2 } }-{ \ln { \cos { x } } }_{ 0 }^{ \frac { \pi }{ 2 } } \right]$$

• Your last expression isn't seem to make sense because the evaluation of those expressions at those limits is not a finite number. – user177692 Jul 15 '15 at 15:28