<s>[INST] What am I doing wrong finding $\lim_{x\to 0} \left( \frac{1+x\cdot2^x}{1+x\cdot3^x} \right)^{1/x^2}$? It has an answer here, but I'd like to know where my solution went wrong.
$$\lim_{x\to 0} \left( \frac{1+x\cdot2^x}{1+x\cdot3^x} \right)^{\frac{1}{x^2}} $$
$$\lim_{x\to 0} \left( \frac{1+x\cdot2^x +x\cdot 3^x-x\cdot 3^x}{1+x\cdot3^x} \right)^\frac{1}{x^2} $$
$$\lim_{x\to 0} \left( 1 + \frac{x\cdot2^x-x\cdot 3^x}{1+x\cdot3^x} \right)^\frac{1}{x^2} $$
$$\lim_{x\to 0} \left( 1 + \frac{x\cdot2^x-x\cdot 3^x}{1+x\cdot3^x} \right)^{\frac{1}{x^2}\cdot \frac{1+x\cdot 3^x}{x\cdot2^x-x\cdot 3^x}\cdot\frac{x\cdot2^x-x\cdot 3^x}{1+x\cdot3^x}} $$
$$\lim_{x\to 0}  e^{\frac{1}{x^2}\cdot \frac{x\cdot2^x-x\cdot 3^x}{1+x\cdot3^x}} $$
$$\lim_{x\to 0}  e^{\frac{1}{x}\cdot \frac{2^x-3^x}{1+x\cdot3^x}} $$
$$\lim_{x\to 0}  e^{\frac{1}{x}\cdot \frac{(1+1)^x-(2+1)^x}{1+x\cdot3^x}} $$
$$\lim_{x\to 0}  e^{\frac{1}{x}\cdot \frac{1+x+o(x)-1-x2-o(x)}{1+x\cdot3^x}} $$
$$\lim_{x\to 0}  e^{\frac{-1}{1+x\cdot3^x}} $$
$$e^{-1}$$
The answer in the book is $\frac{2}{3}$.
 [/INST] You went wrong in this step
$$\ldots=\lim_{x\to 0} \left( 1 + \frac{x\cdot2^x-x\cdot 3^x}{1+x\cdot3^x} \right)^{\frac{1}{x^2}\cdot \frac{1+x\cdot 3^x}{x\cdot2^x-x\cdot 3^x}\cdot\frac{x\cdot2^x-x\cdot 3^x}{1+x\cdot3^x}} =\lim_{x\to 0}  \color{red}{e^{\frac{1}{x^2}\cdot \frac{x\cdot2^x-x\cdot 3^x}{1+x\cdot3^x}}}= \ldots$$
since you take the limit for a part of the expression.
Refer also to the related


*

*Problem with limit solving

*Analyzing limits problem Calculus (tell me where I'm wrong).
</s>