Question about limits involving exponents and bases While working through a problem set on using derivatives to sketch curves, I noticed something when playing around with an online function grapher:
Let $f(x)=x^n -x$, where $n \in \{3, 5, 7, 9, 11...\}$. Let $M$ denote the local maximum of the function, and $m$ the local minimum. Then $$\lim_{n\to \infty} M=1, \mathrm a\mathrm n \mathrm d \lim_{n\to \infty}m=-1.$$
Focusing on $M$: $f'(x)=nx^{n-1}-1$, so $f'(x) = 0$  when $x= \pm n^{\frac {1}{1-n}}$. Specifically, $M=f(-n^{\frac {1}{1-n}})=-n^{\frac {n}{1-n}}+n^{\frac {1}{1-n}}$.  So I want to show that $$\lim_{n\to \infty}(-n^{\frac {n}{1-n}}+n^{\frac {1}{1-n}})=1.$$
I don't have a lot of experience with $\varepsilon$-$\delta$ proofs. I thought I'd tackle it with the "divide and conquer" method: I'd start with the limits of the exponents as $n \to \infty$, and then come to the bases$-n$ and $n$. And that's where my question lies. 
So, I can show by an $\varepsilon$-$\delta$ proof that $\lim_{n\to \infty}(\frac {n}{1-n})=-1$ and $\lim_{n\to \infty}(\frac {1}{1-n})=0.$ And then (I thought) since I can similarly show that $\lim_{n\to \infty}(-n^{-1})=0$ and $\lim_{n\to \infty}(n^{0})=1$ (since $n^{0}=1$ $\forall n$), the desired result follows: $\lim_{n\to \infty} M=1.$
My question is, is this method correct? When you're taking the limit of both an exponent and its base, can you handle $\varepsilon$-$\delta$ proofs this way? I guess what I'm asking is, is it true that $$\lim_{n\to \infty}x^{y}=\lim_{n\to \infty}x^{\lim_{n\to \infty}y},$$
where $x$ and $y$ are expressions composed entirely of arithmetic operations on $n$ and some constants, as in the above examples where, for example, we had $x=n$ and $y=\frac {1}{1-n}$?
Thanks in advance for your help.
 A: The answer to your question
$$\text{does }\ \lim_{n\to \infty} x_n^{y_n}=\left(\lim_{n\to\infty} x_n\right)^{\lim_{n\to\infty} y_n}?$$
depends on the precise restrictions placed on the sequences $x_n$ and $y_n$. For one thing, it is possible for the left hand limit to exist even when $\lim\limits_{n\to\infty} x_n$ and $\lim\limits_{n\to\infty} y_n$ do not exist, for example if
$$x_n=\begin{cases}
2&\text{if } n \text{ even}\\
\sqrt2&\text{if } n \text{ odd}
\end{cases}\ \  \text{ and }\ \ y_n=\begin{cases}
1 &\text{if } n \text{ even}\\
2 &\text{if } n \text{ odd}
\end{cases}$$
then $x_n^{y_n}=2$ for all $n$, yet neither $x_n$ nor $y_n$ converge. For an example where $x_n$ converges but $y_n$ does not, let $x_n=1+\frac1n$ and $y_n=n$, then $\lim\limits_{n\to\infty} x_n^{y_n}=e$. 
But let's assume both $\lim\limits_{n\to\infty} x_n$ and $\lim\limits_{n\to\infty} y_n$ exist. We can still run into trouble if both limits are $0$, for example if
$x_n=e^{-n}$ and $y_n=1/n$. Then $x_n^{y_n}=1/e$ for all $n$, so the limit is $1/e$.
However, if both $\lim\limits_{n\to\infty} x_n$ and $\lim\limits_{n\to\infty} y_n$ exist and one of them is nonzero then we are in luck. The crucial fact to observe is that the function $x^y$ is continuous as a function from $\mathbb R^2$ to $\mathbb R$ when $x$ or $y\ne 0$ (I leave this $\epsilon-\delta$ proof to you). Then since $\lim\limits_{n\to\infty}(x_n,y_n)= (x,y)\ne (0,0)$, we have
$$\lim\limits_{n\to \infty}x_n^{y_n}=\left(\lim_{n\to\infty} x_n\right)^{\lim_{n\to\infty} y_n}=x^y$$
as desired.
