Help with the limit of a function in the $\frac{0}{0}$ case The limit is this one:

$$\lim_{x \rightarrow 0}\frac{(1+2x)^\frac{1}{x}-(1+x)^\frac{2}{x}}{x}$$

I have found that both $(1+2x)^\frac{1}{x}$ and $(1+x)^\frac{2}{x}$ tend to $e^2$, so the numerator tends to 0. I think that the book said that the result of this limit is $-e^2$ if I recall correctly.
 A: Note that we use here two well known limits $$\lim _{ \quad x\rightarrow 0 }{ { \left( 1+x \right)  }^{ \frac { 1 }{ x }  } } =e\\ \lim _{ x\rightarrow 0 }{ \frac { { e }^{ x }-1 }{ x }  } =1$$ 

$$\lim _{ x\rightarrow 0 } \frac { (1+2x)^{ \frac { 1 }{ x }  }-(1+x)^{ \frac { 2 }{ x }  } }{ x } =\lim _{ x\rightarrow 0 } \frac { { e }^{ \frac { 1 }{ x } \ln { \left( 1+2x \right)  }  }-{ e }^{ \frac { 2 }{ x } \ln { \left( 1+x \right)  }  } }{ x } =\\ =\lim _{ x\rightarrow 0 } \frac { { e }^{ \frac { 2 }{ x } \ln { \left( 1+x \right)  }  }\left[ { e }^{ \frac { 1 }{ x } \ln { \left( 1+2x \right)  } -\frac { 2 }{ x } \ln { \left( 1+x \right)  }  }-1 \right]  }{ x } =\\\lim _{ x\rightarrow 0 } \frac { \left[ { e }^{ \frac { 1 }{ x } \ln { \left( 1+2x \right)  } -\frac { 2 }{ x } \ln { \left( 1+x \right)  }  }-1 \right]  }{ \frac { 1 }{ x } \ln { \left( 1+2x \right)  } -\frac { 2 }{ x } \ln { \left( 1+x \right)  }  } \cdot \frac { { e }^{ \frac { 2 }{ x } \ln { \left( 1+x \right)  }  } }{ x } \cdot \left[ \frac { 1 }{ x } \ln { \left( 1+2x \right)  } -\frac { 2 }{ x } \ln { \left( 1+x \right)  }  \right] =\\\ =\lim _{ x\rightarrow 0 } \frac { { e }^{ \frac { 2 }{ x } \ln { \left( 1+x \right)  }  } }{ x } \cdot \left[ \frac { 1 }{ x } \ln { \left( 1+2x \right)  } -\frac { 2 }{ x } \ln { \left( 1+x \right)  }  \right] =\lim _{ x\rightarrow 0 } \frac { (1+x)^{ \frac { 2 }{ x }  } }{ { x }^{ 2 } } \cdot \ln { \left( \frac { 1+2x }{ { \left( 1+x \right)  }^{ 2 } }  \right)  } =\\=\lim _{ x\rightarrow 0 } (1+x)^{ \frac { 2 }{ x }  }\cdot \ln { { \left( \frac { 1+2x }{ 1+2x+{ x }^{ 2 } }  \right)  }^{ \frac { 1 }{ { x }^{ 2 } }  } } =\\ =\lim _{ x\rightarrow 0 } (1+x)^{ \frac { 2 }{ x }  }\cdot \\\ln { { \left( 1+\frac { -{ x }^{ 2 } }{ 1+2x+{ x }^{ 2 } }  \right)  }^{ \frac { 1 }{ { x }^{ 2 } }  } } =\lim _{ x\rightarrow 0 } (1+x)^{ \frac { 2 }{ x }  }\cdot \ln { { \left[ { \left( 1+\frac { -{ x }^{ 2 } }{ 1+2x+{ x }^{ 2 } }  \right)  }^{ \frac { 1+2x+{ x }^{ 2 } }{ -{ x }^{ 2 } }  } \right]  }^{ \frac { 1 }{ { x }^{ 2 } } \cdot \frac { -{ x }^{ 2 } }{ 1+2x+{ x }^{ 2 } }  } } =\lim _{ x\rightarrow 0 } (1+x)^{ \frac { 2 }{ x }  }\cdot \frac { 1 }{ { x }^{ 2 } } \cdot \frac { -{ x }^{ 2 } }{ 1+2x+{ x }^{ 2 } } =\color{red}{-{ e }^{ 2 }}$$

A: You can do it with l'Hôpital. Consider $f_{a,b}(x)=(1+ax)^{b/x}$; then
$$
\log f_{a,b}(x)=b\frac{\log(1+ax)}{x}
$$
and so
$$
\frac{f_{a,b}'(x)}{f_{a,b}(x)}=b\frac{\frac{ax}{1+ax}-\log(1+ax)}{x^2}=
\frac{b}{1+ax}\frac{ax-(1+ax)\log(1+ax)}{x^2}
$$
Since you know that $\lim_{x\to0}f_{a,b}(x)=e^{ab}$, by a basic limit, we have
\begin{align}
\lim_{x\to0}f_{a,b}'(x)
&=be^{ab}\lim_{x\to0}\frac{ax-(1+ax)\log(1+ax)}{x^2}\\
&=be^{ab}\lim_{x\to0}\frac{a-a\log(1+ax)-a}{2x}\\
&=-\frac{ab}{2}e^{ab}\lim_{x\to0}\frac{\log(1+ax)}{x}\\
&=-\frac{a^2b}{2}e^{ab}
\end{align}
Thus we have
$$
\lim_{x\to0}\frac{f_{2,1}(x)-f_{1,2}(x)}{x}=
\lim_{x\to0}\bigl(f_{2,1}'(x)-f_{1,2}'(x)\bigr)=
-2e^2+e^2=-e^2
$$
