๐Ÿงฎ Brain Teaser

The Integral That Hides Inside a Square Root

Evaluate the definite integral

I=โˆซ01lnโกxx(1โˆ’x)โ€‰dx.I = \int_0^1 \frac{\ln x}{\sqrt{x(1-x)}}\, dx.

Feynman differentiationBeta functiondigamma functionparametric integral

Answer: Integral of ln(x)/sqrt(x(1-x))

Key Idea / Intuition

The weight 1/x(1โˆ’x)1/\sqrt{x(1-x)} is the density of a Beta(1/2,1/2)(1/2, 1/2) distribution (up to a constant), and the integral โˆซ01xsโˆ’1(1โˆ’x)tโˆ’1โ€‰dx=B(s,t)=ฮ“(s)ฮ“(t)/ฮ“(s+t)\int_0^1 x^{s-1}(1-x)^{t-1}\,dx = B(s,t) = \Gamma(s)\Gamma(t)/\Gamma(s+t) is the Beta function. The trick is to differentiate the Beta function with respect to a parameter: write xsโˆ’1x^{s-1} inside the integral, differentiate in ss, and then evaluate at s=1/2s = 1/2. The answer emerges from the digamma function ฯˆ=ฮ“โ€ฒ/ฮ“\psi = \Gamma'/\Gamma.


Formal Proof / Solution

Step 1: Set up the parametric integral.

Consider the Beta integral

B(s,12)=โˆซ01xsโˆ’1(1โˆ’x)โˆ’1/2โ€‰dx=ฮ“(s)โ€‰ฮ“(12)ฮ“(s+12).B(s, \tfrac{1}{2}) = \int_0^1 x^{s-1}(1-x)^{-1/2}\,dx = \frac{\Gamma(s)\,\Gamma(\tfrac{1}{2})}{\Gamma(s + \tfrac{1}{2})}.

Step 2: Differentiate under the integral sign.

Differentiating both sides with respect to ss:

ddsB(s,12)=โˆซ01xsโˆ’1lnโก(x)โ€‰(1โˆ’x)โˆ’1/2โ€‰dx.\frac{d}{ds} B(s, \tfrac{1}{2}) = \int_0^1 x^{s-1} \ln(x)\,(1-x)^{-1/2}\,dx.

On the right-hand side of the closed form:

dds[ฮ“(s)โ€‰ฮ“(12)ฮ“(s+12)]=ฮ“(12)โ‹…ฮ“(s)ฮ“(s+12)[ฯˆ(s)โˆ’ฯˆโ€‰โฃ(s+12)],\frac{d}{ds}\left[\frac{\Gamma(s)\,\Gamma(\tfrac{1}{2})}{\Gamma(s+\tfrac{1}{2})}\right] = \Gamma(\tfrac{1}{2})\cdot \frac{\Gamma(s)}{\Gamma(s+\tfrac{1}{2})}\left[\psi(s) - \psi\!\left(s+\tfrac{1}{2}\right)\right],

where ฯˆ=ฮ“โ€ฒ/ฮ“\psi = \Gamma'/\Gamma is the digamma function.

Step 3: Evaluate at s=1/2s = 1/2.

Setting s=1/2s = 1/2:

I=โˆซ01xโˆ’1/2lnโก(x)โ€‰(1โˆ’x)โˆ’1/2โ€‰dx=โˆซ01lnโกxx(1โˆ’x)โ€‰dx,I = \int_0^1 x^{-1/2}\ln(x)\,(1-x)^{-1/2}\,dx = \frac{\int_0^1 \ln x}{\sqrt{x(1-x)}}\,dx,

and the closed form gives

I=ฮ“(12)โ‹…ฮ“(12)ฮ“(1)[ฯˆ(12)โˆ’ฯˆ(1)].I = \Gamma(\tfrac{1}{2})\cdot \frac{\Gamma(\tfrac{1}{2})}{\Gamma(1)}\left[\psi(\tfrac{1}{2}) - \psi(1)\right].

Now use:

  • ฮ“(1/2)=ฯ€\Gamma(1/2) = \sqrt{\pi}, so ฮ“(1/2)2=ฯ€\Gamma(1/2)^2 = \pi and ฮ“(1)=1\Gamma(1) = 1,
  • ฯˆ(1)=โˆ’ฮณ\psi(1) = -\gamma (Eulerโ€“Mascheroni constant),
  • ฯˆ(1/2)=โˆ’ฮณโˆ’2lnโก2\psi(1/2) = -\gamma - 2\ln 2 (a classical identity).

Therefore:

ฯˆ(12)โˆ’ฯˆ(1)=(โˆ’ฮณโˆ’2lnโก2)โˆ’(โˆ’ฮณ)=โˆ’2lnโก2.\psi(\tfrac{1}{2}) - \psi(1) = (-\gamma - 2\ln 2) - (-\gamma) = -2\ln 2.

Step 4: Conclude.

I=ฯ€โ‹…(โˆ’2lnโก2)=โˆ’2ฯ€lnโก2.I = \pi \cdot (-2\ln 2) = \boxed{-2\pi \ln 2}.

Sanity check: The integrand lnโก(x)/x(1โˆ’x)\ln(x)/\sqrt{x(1-x)} is negative on (0,1)(0,1) since lnโกx<0\ln x < 0 there, so a negative answer is correct.


The beautiful punchline: A seemingly complicated integral collapses to โˆ’2ฯ€lnโก2-2\pi\ln 2 โ€” ฯ€\pi appears from the Beta function, and lnโก2\ln 2 from the digamma difference. Two transcendental constants from one elegant differentiation trick.

Type: IntegrationEdit on GitHub โ†—