<s>[INST] 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.
 [/INST] 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 }}$$

</s>