TITLE: Limit of $\lim\limits_{n\to\infty} (1 + \frac{x_n}{n})^n$
QUESTION [7 upvotes]: Many websites and calculus books give this well known result
\begin{equation}
\lim\limits_{n\to\infty} \left(1 + \frac{x}{n}\right)^n = e^x
\end{equation}
However, a textbook I was reading casually mentioned that if $x_n \rightarrow x$ then 
\begin{equation}
\lim\limits_{n\to\infty} \left(1 + \frac{x_n}{n}\right)^n = e^x
\end{equation}
Why is this true? It seems very intuitive but I feel some explanation is missing. Thank you!

REPLY [14 votes]: This is actually a very useful fact it is proved as follows.
$$\left(1+\frac{x_n}{n}\right)^n= \left[ 
\left(1+\frac{1}{n/x_n}\right)^{n/x_n}\right]^{x_n}$$
And $$\left(1+\frac{1}{n/x_n}\right)^{n/x_n}\to e.$$

REPLY [5 votes]: Whenever $a<x<b$, we have $\left(1+\frac an\right)^n<\left(1+\frac {x_n}n\right)^n<\left(1+\frac bn\right)^n$ for almost all $n$ and therefore $e^a\le e^x\le e^b$. The result then follows from contiunity of the exponential .