97

After coming across this question: How to verify this limit, I have the following question:

When taking the limit of an integral, is it valid to move the limit inside the integral, providing the limit does not affect the limits of integration?

For instance in the question, the OP is trying to determine that:

$$\lim_{n\to\infty}\int_{0}^{1}{\frac{dx}{(1+\frac{x}{n})^{n}}}=1-\rm{e}^{-1}$$

The answers to the question involve evaluating the integral and then taking the limit to prove the result; but I was wondering if it would be valid to move the integral inside the limit, that is:

$$\lim_{n\to\infty}{\int_{0}^{1}{\frac{dx}{(1+\frac{x}{n})^{n}}}}=\int_{0}^{1}{\lim_{n\to\infty}\frac{dx}{(1+\frac{x}{n})^{n}}}=\int_{0}^{1}{\frac{dx}{{\rm{e}}^x}}=\rm{e}^{0}-\rm{e}^{-1}=1-\rm{e}^{-1}$$

As required. So is this a valid technique, or is it just coincidental that this works?

Check :

$\displaystyle\begin{align}\lim\limits_{n\to\infty}\int_0^1&\dfrac{dx}{\left(1+\dfrac xn\right)^n}=\lim\limits_{n\to\infty}\left[\dfrac{-n}{n-1}\left(1+\dfrac xn\right)^{1-n}\,\right]_0^1=\\ &=\lim\limits_{n\to\infty}\dfrac{-n}{n-1}\left[\left(1+\dfrac1n\right)^{1-n}-1\right]=\\ &=\lim\limits_{n\to\infty}\dfrac n{n-1}\left[1-\left(1+\dfrac1n\right)^{1-n}\,\right]=\\ &=\lim\limits_{n\to\infty}\dfrac n{n-1}\left[1-\dfrac{\left(1+\dfrac1n\right)}{\left(1+\dfrac1n\right)^n}\,\right]=\\ &=1\cdot\left[1-\dfrac1{\rm{e}}\right]=\\ &=1-\rm{e}^{-1} \end{align}$

$\displaystyle\begin{align}\int_0^1 \lim\limits_{n\to\infty}\dfrac{dx}{\left(1+\dfrac xn\right)^n}&=\int_0^1\dfrac{dx}{{\rm{e}}^x}=\bigg[\!-{\rm{e}}^{-x}\bigg]_0^1=\\ &=\rm{e}^0-\rm{e}^{-1}=1-\rm{e}^{-1} \end{align}$

Angelo
  • 12,328
Thomas Russell
  • 10,425
  • 5
  • 38
  • 66
  • 48
    If $: f_n \longrightarrow f :$ uniformly and the interval is finite, then you are allowed to do so. $\hspace{1.2 in}$ –  Dec 08 '12 at 11:31

3 Answers3

69

Taking the limit inside the integral is not always allowed. There are several theorems that allow you to do so. The major ones being Lebesgue dominated convergence theorem and Monotone convergence theorem.

The uniform convergence mentioned in the comments is a special case of Dominated convergence theorem.

Cantor
  • 1,940
  • 3
    If you know that the limit function is integrable, uniform convergence is enough. DCT and MCT go a step further and ensure that the limit is also integrable. – Hashimoto Feb 04 '19 at 21:53
  • 3
    Can I get an explaination to why it is a special case of the Dominated convergence theorem? – Algo May 10 '22 at 19:45
  • 1
    @Cantor could you please explain how this is a special case of DCT? – WhiteLake Dec 29 '22 at 17:24
49

The limit can be moved inside the integral if the convergence of the integrand is uniform. In our case if $f_n(x)=(1+\frac{x}{n})^{-n}$, then $$\lim_{n\to +\infty}f_n(x)=e^{-x}=f(x)$$ We need to show that on $[0,1]$, $$\left\|f_n-f \right\|_{\infty}\to 0$$ But $$\left\|f_n-f \right\|_{\infty}=\sup_{x\in [0,1]}\left|f_n(x)-f(x)\right|= \sup_{x\in [0,1]}\left|(1+\frac{x}{n})^{-n}-e^{-x}\right| $$ We need to determine the maximum of $g_n(x)=(1+\frac{x}{n})^{-n}-e^{-x}$ on $[0,1]$ or at least show it converges to $0$.

$g_n(0)=0$, $g_n(1)=(1+\frac1n)^{-n}-e^{-1}$ and $$g_n^{\prime}(x_0)=0\Leftrightarrow (1+\frac{x_0}{n})^{-n-1}=e^{-x_0}$$ Whenever the latter is true, $g_n(x_0)=\frac{x_0}{n}e^{-x_0}$. Therefore, $$\left\|f_n-f \right\|_{\infty}=\max_{x\in [0,1]}\left|g_n(x)\right|=\max\left\{g_n(0),g_n(1),g_n(x_0)\right\}=\max\left\{0,(1+\frac1n)^{-n}-e^{-1},\frac{x_0}{n}e^{-x_0}\right\}\to 0 $$ as $n\to +\infty$. Uniform convergence on $[0,1]$ is proven and the limit-integral interchange can be done

Nameless
  • 13,456
  • Why the $g_n(x_0)$ is not equal to $e^{-x_0}\frac{x_0}{n}$ ? – üzeyir saçıkay Sep 17 '18 at 11:11
  • 1
    Hi @Nameless! I'm obviously a newbie here. So pardon me to ask this. Why is it sufficient to show that $| f_n-f|_{\infty} \rightarrow 0$ to show that $f_n$ converges uniformly? :) – Crunchy Feb 28 '19 at 02:56
  • 3
    The expression $|f_n - f|\infty \to 0$ is equivalent with $\forall \epsilon>0 :\exists N \in \mathbb N: \forall n > N: \sup{x \in \mathbb R} |f_n(x) - f(x)| < \epsilon$. By the definition of supremum, we get that $|f_n(x) - f(x)| < \epsilon$ for all $x \in \mathbb R$. In other words, for all $\epsilon>0$, we find an $N$, independent of $x$ such that if $n>N$, $|f_n(x) - f(x) | < \epsilon$ for all $x \in \mathbb R$, which is exactly the definition of uniform convergence. – Gilles Castel Mar 13 '19 at 14:13
8

There's a recent paper that exactly answers this question.

Kamihigashi, T. Interchanging a limit and an integral: necessary and sufficient conditions. J Inequal Appl 2020, 243 (2020).

https://doi.org/10.1186/s13660-020-02502-w

The main result gives a necessary and sufficient condition under which the limit can be moved inside the integral. The exact condition is somewhat complicated, but it's strictly weaker than uniform integrability.

starboy
  • 351
  • 1
    Interesting. Doesn't seem as easy to apply, but very interesting that it's both necessary and sufficient. And there's a nice example. If I were an analyst I'd be all over this thing. – doublefelix Apr 26 '21 at 05:35