🧮 Brain Teaser

The Integral That Knows Γ

Compute the integral I=∫0∞xs−1e−xln⁡x dx,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)=∫0∞xs−1e−xdx\Gamma(s) = \int_0^\infty x^{s-1} e^{-x} dx already contains xs−1x^{s-1}, and differentiating xs−1=e(s−1)ln⁡xx^{s-1} = e^{(s-1)\ln x} with respect to ss pulls down exactly one factor of ln⁡x\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)=∫0∞xs−1e−x dx,s>0.\Gamma(s) = \int_0^\infty x^{s-1} e^{-x} \, dx, \quad s > 0.

Step 2: Differentiate under the integral sign.

Write xs−1=e(s−1)ln⁡xx^{s-1} = e^{(s-1) \ln x}. Differentiating formally with respect to ss:

ddsΓ(s)=dds∫0∞xs−1e−x dx=∫0∞∂∂s(xs−1e−x)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 ∂∂sxs−1=xs−1ln⁡x\frac{\partial}{\partial s} x^{s-1} = x^{s-1} \ln x, we get:

Γ′(s)=∫0∞xs−1e−xln⁡x dx.\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:

∣xs−1e−xln⁡x∣≤Cδ,M(xδ/2−1+xMe−x/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:

∫0∞e−xln⁡x dx=Γ′(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 e−xln⁡xe^{-x} \ln x against the simplest exponential weight recovers the Euler–Mascheroni constant exactly.

Type: analysisEdit on GitHub ↗