If $\lim_{n\to\infty} x_n=0$ and $a>0$, then prove that $\lim_{n\to\infty} a^{x_n}=1$.
This is a sum of Convergence of a sequence. So I am bound to use theorems related to that.
Here is my attempt :
Since $\lim_{n\to\infty} x_n=0$, there exists a natural number p such that $-\frac{1}{n}<x_n<\frac{1}{n}$ for all $n>=p$.
Let $a>1$. Then $a^{-\frac{1}{n}}<a^{x_n}<a^{\frac{1}{n}}$ for all $n\geq p$.
Let $0<a<1$. Then $a^{\frac{1}{n}}<a^{x_n}<a^{-\frac{1}{n}}$ for all $n\geq p$.
Now, $\lim_{n\to\infty} a^{\frac{1}{n}}=1$ and $\lim_{n\to\infty} a^{-\frac{1}{n}}=1$.
Therefore, by Squeeze theorem, $\lim_{n\to\infty} a^{x_n}=1$.
Is it correct? If it's not, then where is the mistake?
Please anyone help me.Thanks in advance.
Hint:
Use the fact that if you have $f$, a continuous function, and a sequence $\{x_n\}$ which converges to $x$, then,
$$\lim_{n\to\infty} f(x_n) = f\left(\lim_{n\to\infty} x_n\right)$$ $$=f(x)$$
In particular, consider $f(x) = a^x$.