1

After evaluating the integral in my post,$$ \int_{0}^{\frac{\pi}{4}} x \tan x d x =-\frac{\pi}{8} \ln 2+\frac{G}{2}, $$ then I want to know more about the value of its “partner” integral $$\displaystyle \int_{0}^{\frac{\pi}{4}} x \cot x d x.$$

First of all, I tried to make use of the integration by parts. $$ \begin{aligned} \int_{0}^{\frac{\pi}{4}} x \cot x d x &=\int_{0}^{\frac{\pi}{4}} x d(\ln (\sin x)) \\ &=[x \ln (\sin x)]_{0}^{\frac{\pi}{4}}-\int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x \\ &=-\frac{\pi}{8} \ln 2-\int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x \end{aligned} $$

By the post in MSE, $$\int_0^{\Large\frac\pi4}\ln(\sin x)\ dx=-\frac12\left(G+\frac\pi2\ln2\right),$$ I got a similar result for it. $$ \int_{0}^{\frac{\pi}{4}} x \cot x d x=\frac{\pi}{8} \ln 2+\frac{G}{2} $$

Do we have another method? Your contribution will be highly appreciated.

Lai
  • 20,421

1 Answers1

1

A slight variation is possible that avoids the calculation of an integral that results in another instance of Catalan's constant. Recall the identity $$\cot x - \tan x = 2 \cot 2x.$$ So let $$\int_{x=0}^{\pi/4} x \cot x \, dx = I_1, \quad \int_{x=0}^{\pi/4} x \tan x \, dx = I_2,$$ from which we obtain $$I_1 - I_2 = \int_{x=0}^{\pi/4} 2x \cot 2x \, dx = \frac{1}{2} \int_{x=0}^{\pi/2} x \cot x \, dx. \tag{1}$$ Then we apply integration by parts as you had done with the choice $$u = x, \quad du = dx, \\ dv = \cot x \, dx, \quad v = \log \sin x$$ to obtain $$I_1 = I_2 + \frac{1}{2} \left(\left[ x \log \sin x \right]_{x=0}^{\pi/2} - \int_{x=0}^{\pi/2} \log \sin x \, dx \right) = I_2 - \frac{1}{2} \int_{x=0}^{\pi/2} \log \sin x \, dx. \tag{2}$$ Then elementary arguments can be used to evaluate $$\int_{x=0}^{\pi/2} \log \sin x = -\frac{\pi}{2} \log 2, \tag{3}$$ which when combined with previous results, yields the desired answer.

heropup
  • 135,869