Generalized limit of $\left(1+\frac{f(n)}{n}\right)^n$ I'm familiar with the result is that for $a \in \mathbb{R}$:
$$
\lim_{n \to \infty} \left(1+\frac{a}{n} \right)^n = e^a
$$
I'm just wondering, if given something like $\lim_{n\to \infty}f(n) =d$, then the general result should be:
$$
\lim_{n \to \infty} \left(1+\frac{f(n)}{n} \right)^n = e^{\lim_{n \to \infty} f(n)}=e^d
$$
 A: Yes, the result is true. When $n$ goes to infinity, since $\frac{f(n)}{n}$ goes to $0$, we may write
$$\begin{eqnarray*}\left(1 + \frac{f(n)}{n}\right)^n &=& \exp \left[n \ln\left(1 + \frac{f(n)}{n}\right)\right]\\
&=& \exp \left[n \ln\left(1 + \frac{d + o(1)}{n}\right)\right]\\
&=& \exp \left[n \left( \frac{d}{n} + o\left(\frac{1}{n} \right) \right)\right]\\
&=& \exp \left[d + o(1)\right]\\
&=& e^d + o(1) \underset{n \to \infty}{\longrightarrow} e^d
\end{eqnarray*}$$
A: Suppose $f(n) \to d$ as $n \to \infty$, and let $\epsilon > 0$ be arbitrary.  Then, for $N$ sufficiently large (say $n > N$), we have
$$\left(1+\frac{d-\epsilon}{n}\right)^n \le \left(1+\frac{f(n)}{n}\right)^n \le \left(1+\frac{d+\epsilon}{n}\right)^n$$
if we take $n$ large enough (say, $n>M$), then we can also conclude
$$e^{d-\epsilon}-\epsilon \le \left(1+\frac{f(n)}{n}\right)^n \le e^{d+\epsilon}+\epsilon$$
But, this is true for all $\epsilon > 0$ provided $n$ is sufficiently large, so we can conclude
$$\lim_{\epsilon\to 0} e^{d-\epsilon}-\epsilon \le \liminf_{n \to\infty} \left(1+\frac{f(n)}{n}\right)^n$$
and also
$$\limsup_{n \to\infty} \left(1+\frac{f(n)}{n}\right)^n \le \lim_{\epsilon \to 0} e^{d+\epsilon}+\epsilon$$
from which we have $\liminf_{n \to\infty} \left(1+\frac{f(n)}{n}\right)^n = \limsup_{n \to\infty} \left(1+\frac{f(n)}{n}\right)^n = e^d$, so $\lim_{n \to\infty} \left(1+\frac{f(n)}{n}\right)^n=e^d$
