TITLE: How can I integrate $\int_0^1 \bigl(1-x^n\bigr)^{2^n} \mathrm{d}x$?
QUESTION [8 upvotes]: How can I integrate
$$
\int_0^1 \bigl( 1 - x^n \bigr)^{2^n}\, \mathrm{d}x?
$$
I need to find the limit of the integral as $n \to \infty$, but cannot switch the integral and the limit as the function does not converge uniformly?

REPLY [2 votes]: We have
\begin{align*}
 &\int_0^1 (1 - x^n)^{2^n}\mathrm{d} x\\
 \overset{x^n = y} =\,\, & \frac{1}{n}\int_0^1 (1 - y)^{2^n} y^{1/n - 1} \mathrm{d} y\\[5pt]
 =\,\, & \frac{1}{n}B(2^n + 1, \, 1/n)\\[5pt]
 =\,\, & \frac{1}{n}\cdot\frac{\Gamma(2^n + 1)\Gamma(1/n)}{\Gamma(2^n + 1 + 1/n)}\\
 =\,\,& \Gamma(1 + 1/n) \frac{\Gamma(2^n + 1)}{\Gamma(2^n + 1 + 1/n)}
\end{align*}
where $B(u, v) := \int_0^1 t^{u - 1}(1 - t)^{v - 1}\mathrm{d} t$ is the Beta function,
and we have used $B(x, y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x + y)}$
and $\Gamma(z + 1) = z\Gamma(z)$.
We have
$$\lim_{n\to \infty} \Gamma(1 + 1/n) = \Gamma(1) = 1.$$
Using Stirling's formula $\Gamma(x) \sim \sqrt{2\pi}\, x^{x - 1/2}\mathrm{e}^{-x}$,
we have
\begin{align*}
 &\lim_{n\to \infty} \ln \frac{\Gamma(2^n + 1)}{\Gamma(2^n + 1 + 1/n)}\\
 =\, & \lim_{n\to \infty}
  \left((2^n + 1/2)\ln(2^n + 1) - (2^n + 1/2 + 1/n)\ln(2^n + 1 + 1/n) + \frac{1}{n}\right)\\
  =\,& \lim_{n\to \infty}
  \left[(2^n + 1/2)\ln \left(1 + \frac{1}{n(2^n + 1)}\right) - \frac{1}{n}\ln(2^n + 1 + 1/n)  + \frac{1}{n}\right]\\
  =\,& -\ln 2
\end{align*}
where we have used $0 \le \ln(1 + \frac{1}{n(2^n + 1)}) \le \frac{1}{n(2^n + 1)}$, and
$\frac{1}{n} \ln 2^n \le \frac{1}{n}\ln(2^n + 1 + 1/n)
\le \frac{1}{n}\ln(2^n + 2^n)$.
Thus, we have $$\lim_{n\to \infty} \frac{\Gamma(2^n + 1)}{\Gamma(2^n + 1 + 1/n)} = \mathrm{e}^{-\ln 2} = \frac12.$$
Thus, we have
$$\lim_{n\to \infty} \int_0^1 (1 - x^n)^{2^n}\mathrm{d} x = \frac12.$$