Limits and exponents and e exponent form So I know that $\underset{n\rightarrow \infty}{\text{lim}}\left(1+\frac {1}{n}\right)^n=e$ 
and that we're not allowed to see it as $1^\infty$ because that'd be incorrect. 
Why is then that we can do the same thing with (for example): $$\lim_{n\rightarrow \infty} \left(1+\sin\left(\frac {1}{n}\right)\right)^{n\cos\left(\frac {1}{n}\right)}= \lim_{n\rightarrow \infty} \left(\left(1+\sin\left(\frac {1}{n}\right)\right)^\frac {1}{\sin\left(\frac {1}{n}\right)} \right)^{n\cdot\cos\left(\frac {1}{n}\right)\sin\left(\frac{1}{n}\right)}$$ 
What I mean by that is that in the example of $e$ we can't say it'  $\lim \left(1+\frac {1}{n}\right)^{\lim  (n)}=1^\infty$ 
While in the second example that's exactly what we do (we say that the limit of the base is $e$ while the limit of the exponent is 1 which is why the entire expression is equal to $e$.
Can anyone explain to me the difference between the two?
 A: In fact there's no difference between the two examples, indeed if you have a function $h$ such that $h(n)\to\infty$ then
$$\lim_{n\to\infty}\left(1+\frac{1}{h(n)}\right)^{h(n)}=\lim_{n\to\infty}\left(1+\frac{1}{n}\right)^{n}=e$$
and ofcourse if we have another function $f$ such that $f(n)\to a\in\mathbb R$ then
$$\lim_{n\to\infty}\left(\left(1+\frac{1}{h(n)}\right)^{h(n)}\right)^{f(n)}=e^a.$$
A: This might give you an idea about how you can generalize the limit
$$
\lim_{n \to \infty} \left(1+\frac{1}{n}\right)^n = e.
$$
Suppose $a_n \to 0$ and $b_n \to \infty$.  Then
$$
\lim_{n\to\infty} (1+a_n)^{b_n} = \lim_{n\to\infty} \exp\Bigl[b_n \log(1+a_n)\Bigr] = C
$$
if and only if
$$
\lim_{n\to\infty} b_n \log(1+a_n) = \log C.
$$
Now
$$
b_n \log(1+a_n) = a_n b_n \frac{\log(1+a_n)}{a_n},
$$
and since
$$
\lim_{x \to 0} \frac{\log(1+x)}{x} = 1
$$
We may conclude that
$$
\lim_{n \to \infty} (1+a_n)^{b_n} = C
$$
if and only if
$$
\lim_{n \to \infty} a_n b_n = \log C.
$$
A: The expression $1^\infty$ is an indeterminate expression, i.e. one of those guys that you should get alarmed about when they appear as limit expression if one naively replaces $\lim_{n\to\infty} (a_n\circ b_n)$ with $(\lim_{n\to\infty}a_n)\circ (\lim_{n\to\infty}b_n)$. Doing so is only justified where the binary operation $\circ$ is both defined and continuous. You may know that $\frac00$, $\frac\infty\infty$, $0\cdot\infty$ and $\infty-\infty$ are indeterminate, but so is $1^\infty$ and also $0^0$. Note that the notion of indeterminate expression is to be distinguished from undefined expression (though things like $\frac00$ happen to be also undefined). Right here however, we have to deal with the fact that $(x,y)\mapsto x^y$ is not continuous at $(x,y)=(1,\infty)$ (and also not at $(x,y)=(0,0)$). Therefore, if $a_n\to 1$ and $b_n\to \infty$, virtually anything can happen with $a_n^{b_n}$. 
This is so in spite of the fact that it does make perfect sense algebraically to say that $1^\infty=1$ (and also $0^0=1$) if one takes $a^b$ as the number of maps from a $b$-element set to an $a$-element set. However, the only nice way to define exponentiation analytically is via logarithm and exponentaila, i.e. $x^y:=\exp(y\ln x)$. In this light, the indeterminacy of $1^\infty$ and $0^0$ corresponds to the "well-known" indeterminacy of $\infty\cdot 0$ or $0\cdot\infty$.
A: $\lim_{x\to a}f(x)^{g(x)}=\lim_{x\to a}f(x)^{\lim_{x\to a}g(x)}\iff $ both $\lim_{x\to a}f(x), \lim_{x\to a}g(x)$ exists.
While in first case $\lim_{n\to \infty}n$ doesn't exist, but in second case, $\lim_{n\to\infty}\left(1+\sin\frac{1}{n}\right)^{\frac{1}{\sin\frac{1}{n}}}=e$ and $\lim_{n\to \infty}n\cos\frac{1}{n}\sin\frac{1}{n}=1$ both exist.
