TITLE: Limit of a function involving a sequence.
QUESTION [7 upvotes]: I have the following problem:

Suppose that $\lim_{n \to \infty} a_n = 0$. Prove that for any $x$
  $$\lim_{n \to \infty} \left(1+a_n \frac{x}{n}\right)^n = 1.$$

I have tried replacing $a_n$ with a function $a(n)$ and applying L'Hopital's Rule but got no useful result. I also tried going directly to the definitions and showed that $\lim_{n \to \infty} (1+a_n \frac{x}{n}) = 1$, but I don't know how to deal with the $n$th power (that makes the limit $\lim_{n \to \infty} \exp(n(1+a_n \frac{x}{n}))$ indeterminate).

REPLY [2 votes]: $$
\left(1 + \frac{a_n x}{n}\right)^n = 
\bigg[
\underbrace{\left(1+\frac{a_n x}{n}\right)^{\frac{n}{a_n x}}}_{\to e}
\bigg]^{\overbrace{a_n x}^{\to 0}}
\to e^0 = 1
$$