I'm learning calculus, and I was given this information:
$$\lim_{x \to a} (f(x))^n = (\lim_{x \to a} f(x))^n$$ $$\lim_{x \to a}(f(x) + g(x)) = \lim_{x \to a} f(x) + \lim_{x \to a} g(x)$$ $$\lim_{x \to \infty}\frac{1}{x}=0$$ And I have to find this limit: $$\lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x$$ Why can't I just use my first rule to get: $$\left(\lim_{x \to \infty} \left(1 + \frac{1}{x}\right)\right)^x$$ then... $$\left(\lim_{x \to \infty} 1+\lim_{x \to \infty} \frac{1}{x}\right)^x$$ finally... $$(1 + 0)^x=1^x=1$$ I know the limit is actually equal to $e$ which is around $2.71828$, so why am I able to manipulate the limit to make it 1?
Unfortunately, the rule
$$\lim (f(x))^n=(\lim f(x))^n$$
Does not work against
$$\lim(f(x))^{g(x)}\ne(\lim f(x))^{g(x)}$$
Note that this makes no sense. For example, you would be claiming that
$$\lim_{x\to2}x^x\stackrel?=2^x$$
But clearly we actually have
$$\lim_{x\to2}x^x=2^2=4$$
Note that one results in a function, while the proper limit is a constant.
Assuming all of the following limits exist and we don't get an indeterminate form, we actually have
$$\lim(f(x))^{g(x)}=(\lim f(x))^{\lim g(x)}$$
However,
$$\lim_{x\to\infty}\left(1+\frac1x\right)^x=1^\infty$$
Which is an indeterminate form. A quick 'why?' can be seen from $1^x=1$, but $1.1^\infty=\infty$ and $0.9^\infty=0$.
Historically, this limit was one of the first definitions of $e$, one of Euler's constants,
$$\lim_{x\to\infty}\left(1+\frac1x\right)^x=e\approx2.71828182845904523\dots$$