Calculate limit involving exponents Calculate:
$$\lim_{x \rightarrow 0} \frac{(1+2x)^{\frac{1}{x}} - (1+x)^{\frac{2}{x}}}{x}$$
I've tried to calculate the limit of each term of the subtraction:
$$\lim_{x \rightarrow 0} \frac{(1+2x)^{\frac{1}{x}}}{x}$$
$$\lim_{x \rightarrow 0} \frac{(1+x)^{\frac{2}{x}}}{x} $$
Each of these two limits gave me $\lim_{x \rightarrow 0} e^{2 - \ln x}$, so the initial limit must be $0$. However, the correct result is $-e^2$ and I can't get it.
Please explain me what I did wrong and how to get the correct result.
Thank you!
 A: Using the Generalized Binomial Theorem, we get
$$
\begin{align}
(1+x)^{2/x}
&=\left(1+2x+x^2\right)^{1/x}\\
&=\sum_{k=0}^\infty\binom{1/x}{k}(1+2x)^{1/x-k}x^{2k}\\
&=(1+2x)^{1/x}+(1+2x)^{1/x-1}x+O\!\left(x^2\right)
\end{align}
$$
Therefore,
$$
\begin{align}
\lim_{x\to0}\frac{(1+2x)^{1/x}-(1+x)^{2/x}}x
&=\lim_{x\to0}\left[-(1+2x)^{1/x-1}+O(x)\right]\\[6pt]
&=-e^2
\end{align}
$$
A: By using well-known Taylor expansions and Landau notation,
$$\begin{eqnarray*}&&\lim_{x\to 0}\frac{1}{x}\left[\exp\frac{\log(1+2x)}{x}-\exp\frac{2\log(1+x)}{x}\right]\\&=&\lim_{x\to 0}\frac{1}{x}\left[\exp(2-2x+o(x))-\exp(2-x+o(x))\right]\\&=&e^2 \lim_{x\to 0}\frac{1}{x}\left[(1-2x+o(x))(1+o(x))-(1-x+o(x))(1+o(x))\right]\\&=&e^2\lim_{x\to 0}\frac{-x+o(x)}{x}=\color{red}{-e^2}.\end{eqnarray*} $$
A: Using Taylor expansion:
$$(1+2x)^{1/x}\approx e^2-2e^2x+o(x^2)$$
$$(1+x)^{2/x}\approx e^2-e^2x+o(x^2)$$
$$\lim_{x \rightarrow 0} \frac{(1+2x)^{\frac{1}{x}} - (1+x)^{\frac{2}{x}}}{x} \approx \lim _{x\to 0}\left(\frac{e^2-2e^2x+o\left(x^2\right)-e^2+e^2x+o\left(x^2\right)}{x}\right)$$
$$= \lim _{x\to 0}\left(\frac{-e^2x+o\left(x^2\right)}{x}\right)\rightarrow_0 \color{red}{-e^2}$$
