5

Evaluate $$\int_{0}^{\pi/2}x\ln\left(\tan x\right)\,dx$$

First we will work out the complex integral of the function $$\displaystyle{f\left( z \right) = \frac{{{z^2}}}{{{e^z} - 1}},{\text{ }}z \ne 0} and \displaystyle{f\left( 0 \right) = 0}$$ in the rectangle $\displaystyle{c:{\text{ }}OABC}$ with $$\displaystyle{O\left( {0,0} \right){\text{, }}A\left( {R,0} \right){\text{, }}B\left( {R,i \pi } \right){\text{ \& }}D\left( {i\pi ,0} \right)}$$ Obviously f(z) is analytic without poles in the above rectangle, so $\displaystyle{\int\limits_c {f\left( z \right)dz} = 0}$ enter image description here For $$\displaystyle{z = R + iy{\text{ with }}y \in \left[ {0,\pi } \right]:\mathop {\lim }\limits_{R \to \infty } \left| {f\left( z \right)} \right| = \mathop {\lim }\limits_{R \to \infty } \left| {\frac{{{{\left( {R + iy} \right)}^2}}}{{{e^{R + iy}} - 1}}} \right| \leqslant \mathop {\lim }\limits_{R \to \infty } \frac{{\left| {{{\left( {R + iy} \right)}^2}} \right|}}{{{e^R} - 1}}\xrightarrow{{R \to + \infty }}0}$$ And $$\displaystyle{0 = \int\limits_c {f\left( z \right)dz} = \int\limits_0^\infty {\frac{{{x^2}}}{{{e^x} - 1}}dx} + \int\limits_\infty ^0 {\frac{{{{\left( {x + i\pi } \right)}^2}}}{{{e^{x + i\pi }} - 1}}dx} + i \cdot \int\limits_\pi ^0 {\frac{{{{\left( {iy} \right)}^2}}}{{{e^{iy}} - 1}}dy} \Rightarrow }$$ $$\displaystyle{ \Rightarrow \int\limits_0^\infty {\frac{{{x^2}}}{{{e^x} - 1}}dx} + \int\limits_0^\infty {\frac{{{x^2}}}{{{e^x} + 1}}dx} - {\pi ^2}\int\limits_0^\infty {\frac{1}{{{e^x} + 1}}dx} + 2i\pi \int\limits_0^\infty {\frac{x}{{{e^x} + 1}}dx} - i \cdot \int\limits_\pi ^0 {\frac{{{y^2}}}{{\cos \left( y \right) - 1 + i\sin \left( y \right)}}dy} = 0}$$

$$\displaystyle{\int\limits_0^\infty {\frac{1}{{{e^x} + 1}}dx} = \int\limits_0^\infty {\frac{{{e^{ - x}}}}{{1 + {e^{ - x}}}}dx} = - \left[ {\ln \left( {1 + {e^{ - x}}} \right)} \right]_0^\infty = \ln \left( 2 \right)}$$ $$\displaystyle{\int\limits_0^\infty {\frac{x}{{{e^x} + 1}}dx} = \int\limits_0^\infty {\frac{{x{e^{ - x}}}}{{1 + {e^{ - x}}}}dx} = \int\limits_0^\infty {x\left( {\sum\limits_{k = 1}^\infty {{{\left( { - 1} \right)}^{k + 1}}{e^{ - kx}}} } \right)dx} = \sum\limits_1^\infty {{{\left( { - 1} \right)}^{k + 1}}\int\limits_0^\infty {x{e^{ - kx}}dx} } = \sum\limits_1^\infty {\frac{{{{\left( { - 1} \right)}^{k + 1}}}}{{{k^2}}}} = .. = \frac{{{\pi ^2}}}{{12}}}$$ $$\displaystyle{\int\limits_\pi ^0 {\frac{{{y^2}}}{{\cos \left( y \right) - 1 + i\sin \left( y \right)}}dy} = \int\limits_0^\pi {\frac{{{y^2}}}{{2{{\sin }^2}\left( {\dfrac{y}{2}} \right) - 2i \cdot \sin \left( {\dfrac{y}{2}} \right)\cos \left( {\dfrac{y}{2}} \right)}}dy} = \int\limits_0^\pi {\frac{{{y^2}}}{{ - 2i\sin \left( {\dfrac{y}{2}} \right)\left( {\cos \left( {\dfrac{y}{2}} \right) + i\sin \left( {\dfrac{y}{2}} \right)} \right)}}dy} = }$$

$$\displaystyle{ = \frac{i}{2} \cdot \int\limits_0^\pi {\frac{{{y^2}\left( {\cos \left( {\dfrac{y}{2}} \right) - i\sin \left( {\dfrac{y}{2}} \right)} \right)}}{{\sin \left( {\dfrac{y}{2}} \right)}}dy} = \frac{i}{2} \cdot \int\limits_0^\pi {\frac{{{y^2}}}{{\tan \left( {\dfrac{y}{2}} \right)}}dy} + \frac{1}{2} \cdot \int\limits_0^\pi {{y^2}dy} = \mathop = \limits^{y/2 = x} = 4i \cdot \int\limits_0^{\pi /2} {\frac{{{x^2}}}{{\tan \left( x \right)}}dx} + \frac{{{\pi ^3}}}{6}}$$

Kamal Saleh
  • 6,497
  • I also don't think that Integration By Parts will work here. Take $u=x$ and $v=\ln(\tan(x))$. But then also try once. Though I am not sure. – Syamaprasad Chakrabarti Dec 05 '23 at 17:41
  • @SyamaprasadChakrabarti You actually can make integration by parts work if you know your Clausen functions: https://en.wikipedia.org/wiki/Clausen_function#Integral_evaluations_involving_the_direct_function – David H Dec 05 '23 at 17:55

1 Answers1

2

Here's a solution without complex analysis.

First, one can show by substituting the Fourier series of $\log\sin x$ in the following integrals and integrating term by term that

$$I_1=\int_0^{\pi/2}dx \log\sin x=-\frac{\pi}{2}\log2$$

$$I_2=\int_0^{\pi/2}dx ~x\log \sin x=\frac{7\zeta(3)}{16}-\frac{\pi^2}{8}\log2$$

Finally, note that the integral in question can be written

$$I=\int_0^{\pi/2}dx ~ x\log \sin x-\int_0^{\pi/2}dx ~ x\log \cos x=2I_2-\frac{\pi}{2}I_1$$

via the substitution $x\to \pi/2-x$ in the second integral. This yields

$$I=\frac{7\zeta(3)}{8}$$

DinosaurEgg
  • 10,775