🧮 Brain Teaser

The Integral That Loves a Log-Sine Cousin

Evaluate: I=0π/2xcotxdxI = \int_0^{\pi/2} x \cot x \, dx

integration by partslog-sine integralclassical analysisboundary terms

Answer: The Integral That Loves a Log-Sine Cousin

Key Idea / Intuition

This integral looks intimidating, but integration by parts converts it into something we already know: the beloved 0π/2ln(sinx)dx=π2ln2\int_0^{\pi/2} \ln(\sin x)\,dx = -\frac{\pi}{2}\ln 2. The boundary term vanishes by a well-known limit, and what remains is a clean classical value. The key insight is that cotx\cot x is the derivative of ln(sinx)\ln(\sin x), so IBP naturally hands the problem back to the log-sine world.


Formal Proof / Solution

Step 1: Integration by Parts

Set u=xu = x and dv=cotxdx=ddx[lnsinx]dxdv = \cot x\, dx = \frac{d}{dx}[\ln \sin x]\,dx. Then: du=dx,v=ln(sinx).du = dx, \qquad v = \ln(\sin x).

I=[xln(sinx)]0π/20π/2ln(sinx)dx.I = \Big[x \ln(\sin x)\Big]_0^{\pi/2} - \int_0^{\pi/2} \ln(\sin x)\, dx.

Step 2: Evaluate the Boundary Term

At x=π/2x = \pi/2: π2ln(sin(π/2))=π2ln1=0.\quad \frac{\pi}{2}\ln(\sin(\pi/2)) = \frac{\pi}{2}\ln 1 = 0.

At x=0+x = 0^+: We need limx0+xln(sinx)\lim_{x\to 0^+} x\ln(\sin x).

Since sinxx\sin x \approx x near 00, we have xln(sinx)xlnx0x \ln(\sin x) \approx x \ln x \to 0 as x0+x \to 0^+.

So the boundary term =00=0= 0 - 0 = 0.

Step 3: Use the Classical Log-Sine Integral

0π/2ln(sinx)dx=π2ln2.\int_0^{\pi/2} \ln(\sin x)\, dx = -\frac{\pi}{2}\ln 2.

(This is a classical result, provable by the duplication trick: write the integral as half of 0πln(sinx)dx\int_0^\pi \ln(\sin x)\,dx, then use the identity sinx=2sin(x/2)cos(x/2)\sin x = 2\sin(x/2)\cos(x/2).)

Step 4: Combine

I=0(π2ln2)=πln22.I = 0 - \left(-\frac{\pi}{2}\ln 2\right) = \boxed{\dfrac{\pi \ln 2}{2}}.


Why this is satisfying: The integral 0π/2xcotxdx\int_0^{\pi/2} x \cot x\,dx naively seems harder than the log-sine integral, but IBP shows it is exactly the negative of it (up to a vanishing boundary term). One classical integral unlocks another.

Type: IntegrationEdit on GitHub ↗