🧮 Brain Teaser

The Integral That Knows Γ

Compute the integral I=0xs1exlnxdx,s>0.I = \int_0^\infty x^{s-1} e^{-x} \ln x \, dx, \quad s > 0.

Express your answer in terms of Γ(s)\Gamma(s), Γ(s)\Gamma'(s), and/or the digamma function ψ(s)=Γ(s)/Γ(s)\psi(s) = \Gamma'(s)/\Gamma(s).

Gamma functiondigamma functiondifferentiation under integral signEuler-Mascheroni constantFeynman's trick

Answer: The Integral That Knows Γ

Key Idea / Intuition

The key trick is differentiation under the integral sign with respect to a parameter. The Gamma function Γ(s)=0xs1exdx\Gamma(s) = \int_0^\infty x^{s-1} e^{-x} dx already contains xs1x^{s-1}, and differentiating xs1=e(s1)lnxx^{s-1} = e^{(s-1)\ln x} with respect to ss pulls down exactly one factor of lnx\ln x. So the integral II is literally Γ(s)\Gamma'(s), which connects it immediately to the digamma function.


Formal Proof / Solution

Step 1: Recall the Gamma function.

Γ(s)=0xs1exdx,s>0.\Gamma(s) = \int_0^\infty x^{s-1} e^{-x} \, dx, \quad s > 0.

Step 2: Differentiate under the integral sign.

Write xs1=e(s1)lnxx^{s-1} = e^{(s-1) \ln x}. Differentiating formally with respect to ss:

ddsΓ(s)=dds0xs1exdx=0s(xs1ex)dx.\frac{d}{ds} \Gamma(s) = \frac{d}{ds} \int_0^\infty x^{s-1} e^{-x} \, dx = \int_0^\infty \frac{\partial}{\partial s} \left( x^{s-1} e^{-x} \right) dx.

Since sxs1=xs1lnx\frac{\partial}{\partial s} x^{s-1} = x^{s-1} \ln x, we get:

Γ(s)=0xs1exlnxdx.\Gamma'(s) = \int_0^\infty x^{s-1} e^{-x} \ln x \, dx.

Step 3: Justify the differentiation.

To swap differentiation and integration, we need dominated convergence. For ss in a compact interval [δ,M][\delta, M] with 0<δM<0 < \delta \leq M < \infty, the integrand satisfies:

xs1exlnxCδ,M(xδ/21+xMex/2),\left| x^{s-1} e^{-x} \ln x \right| \leq C_{\delta, M} \left( x^{\delta/2 - 1} + x^{M} e^{-x/2} \right),

which is integrable on (0,)(0,\infty). So the swap is valid for all s>0s > 0.

Step 4: Conclusion.

I=Γ(s)=Γ(s)ψ(s),\boxed{I = \Gamma'(s) = \Gamma(s) \, \psi(s),}

where ψ(s)=Γ(s)Γ(s)\psi(s) = \dfrac{\Gamma'(s)}{\Gamma(s)} is the digamma function.

Special case: At s=1s = 1, Γ(1)=1\Gamma(1) = 1 and ψ(1)=γ\psi(1) = -\gamma (the Euler–Mascheroni constant), so:

0exlnxdx=Γ(1)=ψ(1)Γ(1)=γ0.5772\int_0^\infty e^{-x} \ln x \, dx = \Gamma'(1) = \psi(1) \cdot \Gamma(1) = -\gamma \approx -0.5772\ldots

This is a classical and beautiful result: integrating exlnxe^{-x} \ln x against the simplest exponential weight recovers the Euler–Mascheroni constant exactly.

Type: analysisEdit on GitHub ↗