# A log Gamma integral

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Prove the following

$$\displaystyle \int^1_0 \ln\left( \Gamma (x) \right) \, dx = \ln \left( \sqrt{2 \pi } \right)$$

#### chisigma

##### Well-known member
An elementary evaluation of the integral...

$\displaystyle I = \int_{0}^{1} \ln \Gamma(x)\ dx\ (1)$

... uses the 'classical' Riemann sum. Let's partition the interval [0,1] into n subintervals of lenght $\frac{1}{n}$ so that is...

$\displaystyle I = \lim_{n \rightarrow \infty} \frac{1}{n}\ \sum_{k=1}^{n} \ln \Gamma(\frac{k}{n})\ (2)$

If n is even we can write...

$\displaystyle \frac{1}{n}\ \sum_{k=1}^{n} \ln \Gamma(\frac{k}{n}) = \frac{1}{n}\ \ln \prod_{k=1}^{n} \Gamma(\frac{k}{n}) = \frac{1}{n}\ \ln \prod_{k=1}^{\frac{n}{2}} \{\Gamma(\frac{k}{n})\ \Gamma (1- \frac{k}{n}) \}\ (3)$

Now we use the 'reflection formula'...

$\displaystyle \Gamma (x)\ \Gamma (1-x) = \frac{\pi}{\sin \pi x}\ (4)$

... to arrive to write...

$\displaystyle \frac{1}{n}\ \sum_{k=1}^{n} \ln \Gamma(\frac{k}{n}) = \frac{1}{n}\ \ln \prod_{k=1}^{\frac{n}{2}} \frac{\pi}{\sin \pi \frac{k}{n}} = \ln \sqrt{\pi} - \ln (\prod_{k=1}^{\frac{n}{2}} \sin \pi \frac {k}{n})^{\frac{1}{n}}\ (5)$

As last step we recall the trigonometric identity...

$\displaystyle \prod_{k=1}^{n} \sin \pi \frac{k}{n} = \frac{n+1}{2^{n}}\ (6)$

... we arrive to write...

$\displaystyle \frac{1}{n}\ \sum_{k=1}^{n} \ln \Gamma(\frac{k}{n}) = \ln \sqrt{\pi} - \frac{1}{n}\ \ln (n+1) + \ln \sqrt{2}\ (7)$

... and now we push n to infinity obtaining...

$\displaystyle I = \int_{0}^{1} \ln \Gamma(x)\ dx = \ln \sqrt{2\ \pi}\ (8)$

Kind regards

$\chi$ $\sigma$

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
I used a slightly different way

\displaystyle \begin{align*} \int^1_0 \ln (\Gamma(t)) \, dt &= \int^1_0 \ln (\Gamma(1-t)) \, dt \\ &= \int^1_0 \ln \left( \frac{\pi } { \Gamma(t) \sin( \pi t)} \right) \, dt \\ &= \int^1_0 \ln \left( \pi \right) \, dt - \int^1_0 \ln( \Gamma(t)) \, dt -\int^1_0 \sin( \pi t) \, dt \\ &= \ln ( \pi ) - \int^1_0 \ln( \Gamma(t)) \, dt + \ln(2) \\ &= \ln (2 \pi ) - \int^1_0 \ln( \Gamma(t)) \, dt \\ &= \ln ( \sqrt{2 \pi} ) \end{align*}