<s>[INST] Limits problem to find the values of constants - a and b If $\lim_{x \to \infty}(1+\frac{a}{x}+\frac{b}{x^2})^{2x}=e^2$ Find the value of $a$ and $b$. Problem : 
If $\lim\limits_{x \to \infty}\left(1+\frac{a}{x}+\frac{b}{x^2}\right)^{2x}=e^2$ Find the value of $a$ and $b$.
Please suggest how to proceed this problem : 
If we know that $\lim\limits_{x \to \infty}\left( 1+\frac{1}{x}\right)^x= e$ 
Will this work somehow... please suggest
 [/INST] Take logs of both sides to get
$$2 = \lim_{x \to \infty} 2 x \log{\left ( 1+ \frac{a}{x} + \frac{b}{x^2}\right)}$$
Use $\log{(1+y)} \sim y - (y^2)/2$ as $y \to 0$ to get
$$2 = \lim_{x \to \infty} \left ( 2 a + \frac{2 b-a^2}{x}\right)$$
So we require $a=1$.  The value of $b$ is unimportant.
ADDENDUM
Details of the expansion of the log term to $O(1/x^2)$:
$$\begin{align}\log{\left ( 1+ \frac{a}{x} + \frac{b}{x^2}\right)} &= \frac{a}{x} + \frac{b}{x^2} - \frac12 \left ( \frac{a}{x} + \frac{b}{x^2} \right )^2 + O\left(\frac{1}{x^3}\right)\\ &=  \frac{a}{x} + \frac{b}{x^2} - \frac{a^2}{2 x^2} - \frac{a b}{x^3} - \frac{b^2}{2 x^4}+ O\left(\frac{1}{x^3}\right)\\ &= \frac{a}{x} + \frac{b}{x^2} - \frac{a^2}{2 x^2} + O\left(\frac{1}{x^3}\right) \end{align}$$
</s>