$$I=\int_0^{\frac{\pi}{2}}\sin^2x\ln(\sin^2(\tan x))dx \hspace{15mm}(1)$$ Now, using definite integral property of $\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$ $$I=\int_0^{\frac{\pi}{2}}\cos^2x\ln(\sin^2(\cot x))dx\hspace{15mm}(2)$$ After $\tan x=t$ substitution in $(1)$ and $\cot x=m$ in $(2)$, to get: $$I=\int_0^{\frac{\pi}{2}}\frac{t^2}{(1+t^2)^2}\ln(\sin^2 t)dt=\int_0^{\frac{\pi}{2}}\frac{m^2}{(1+m^2)^2}\ln(\sin^2 m)dm$$ After variable change and addition, I get:

$$2I=\int_0^{\frac{\pi}{2}}\frac{x^2}{(1+x^2)^2}\ln(\sin^4 x)dx\implies \frac{I}{2}=\int_0^{\frac{\pi}{2}}\frac{x^2}{(1+x^2)^2}\ln(\sin x)dx$$

How could I proceed? Any other solutions which happen to be more efficient/simple?

  • @labbhattacharjee: that still leaves us with the problem of computing $$J_1 = \int_{0}^{\pi/2}\arctan(x)\cot(x)\,dx,\qquad J_2 = \int_{0}^{\pi/2}\frac{x\cot x}{1+x^2}\,dx.$$ – Jack D'Aurizio Dec 28 '16 at 16:14
  • That is not big issue, since $$\int_{0}^{\pi/2}x^{2n+1}\cot(x)\,dx $$ is always a combination of $\log(2)$, powers of $\pi$ and values of the Riemann $\zeta$ function at positive odd integers. – Jack D'Aurizio Dec 28 '16 at 16:42
  • 1
    Anyway when you replace $\cot x$ with $m$ the boundaries of the integration range do not stay the same. – Jack D'Aurizio Dec 28 '16 at 18:15
  • Noted! @JackD'Aurizio – Kugelblitz Dec 29 '16 at 3:11
up vote 7 down vote accepted

$$I=\int_0^{\frac{\pi}{2}}\cos^2x\ln(\sin^2(\tan x))dx$$

Use the substitution $t = \tan(x)$

$$I=2\int_0^{\infty}\frac{\ln|\sin t|}{(1+t^2)^2}dt $$

Then use the fourier expansion of $\log|\sin x|$

$$I=-2\sum\frac{1}{k}\int_0^{\infty}\frac{\cos(2kt)}{(1+t^2)^2}dt-2\int_0^{\infty}\frac{\log(2)}{(1+t^2)^2}dt $$

For the second integral


We can use the beta function to deduce that

$$2\int_0^{\infty}\frac{\log(2)}{(1+t^2)^2} =\frac{\pi}{2}\log(2) $$

For the second integral

$$\int_0^{\infty}\frac{\cos(2kt)}{(1+t^2)^2}dt = Re\int_0^{\infty}\frac{e^{2kit}}{(1+t^2)^2}dt$$

It can be showing by complex analysis that

$$\int_0^{\infty}\frac{\cos(2kt)}{(1+t^2)^2}dt = \frac{\pi}{4}e^{-2k}(1+2k) $$

Finally we have the integral

$$I=-\frac{\pi}{2}\sum \frac{e^{-2k}(1+2k)}{k } -\frac{\pi}{2}\log(2)$$

The sum can be computed using

$$-\log(1-x) = \sum \frac{x^k}{k}$$

Hence we deduce that

$$I=-\frac{\pi}{2}\left\{\log\left(\frac{2}{e^2-1} \right) +\frac{2e^ 2}{e^2-1}\right\}$$


As required A proof using complex analysis for


This can be done by considering

$$F(z) = \frac{e^{2ki z}}{(1+z^2)^2}$$

The poles are $z=\pm i$, then consider half a circle in the upper half plane.

enter image description here

Note there is only one pole of order 2 inside the contour. Hence by the residue theorem $$\int_C \frac{e^{2ki z}}{(1+z^2)^2}+\int_{-\infty}^0\frac{e^{2ki x}}{(1+x^2)^2} \,dx+ \int^{\infty}_0\frac{e^{2ki x}}{(1+x^2)^2}\,dx = 2\pi i \text{Res} \frac{e^{2ki z}}{(1+z^2)^2}|_{z = i} $$

The integral along the arc converges to 0

$$2\int^{\infty}_0\frac{\cos(2k x)}{(1+x^2)^2} \,dx = 2\pi i \text{Res} \frac{e^{2ki z}}{(1+z^2)^2}|_{z = i} $$

The pole of order 2 can be calculated using

$$\lim_{z \to i} \frac{d}{dz} (z-i)^2 \frac{e^{2ki z}}{(1+z^2)^2}$$

This simplifies to

$$2\int^{\infty}_0\frac{\cos(2k x)}{(1+x^2)^2} \,dx = \frac{\pi}{2}e^{-2k}(1+2k)$$

$$\int^{\infty}_0\frac{\cos(2k x)}{(1+x^2)^2} \,dx = \frac{\pi}{4}e^{-2k}(1+2k)$$

For many other approaches see Calculating the integral $\int_{0}^{\infty} \frac{\cos x}{1+x^2}\mathrm{d}x$ without using complex analysis

  • Could you please elaborate on how complex analysis helps us get that result? – Kugelblitz Dec 29 '16 at 3:36
  • @Kugelblitz, I edited my post. – Zaid Alyafeai Dec 29 '16 at 4:39
  • You are awesome! Thank you! – Kugelblitz Dec 29 '16 at 9:00
  • @Kugelblitz, no problem. Let me know if there is anything else that is not clear. – Zaid Alyafeai Dec 29 '16 at 9:02
  • No issues. I recently started complex analysis so I just wanted a proper contour integration solution if possible (which you've provided in the addendum). – Kugelblitz Dec 29 '16 at 9:11

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.