<s>[INST] Find $\lim_{x \to \infty} \left(\frac{x^2+1}{x^2-1}\right)^{x^2}$ How to calculate the following limit?
$$\lim\limits_{x \to \infty} \left(\frac{x^2+1}{x^2-1}\right)^{x^2}$$
 [/INST] Recall that, as $u \to 0$, by the Taylor series expansion, we readily have
$$
\begin{align}
e^u& =1+u+\mathcal{O}(u^2)\\
\ln (1+u)&=u+\mathcal{O}(u^2)
\end{align}
$$ giving, as $x \to \infty$,
$$
x^2\ln \left(1+\frac {2}{x^2-1}\right)=x^2 \left(\frac {2}{x^2-1}+\mathcal{O}\left(\frac {1}{x^4}\right)\right)=2+\mathcal{O}\left(\frac {1}{x^2}\right)
$$ and
$$
\begin{align}
\Big(\frac{x^2+1}{x^2-1}\Big)^{x^2}&=\Big(\frac{x^2-1+2}{x^2-1}\Big)^{x^2}\\\\
&= \left(1+\frac {2}{x^2-1}\right)^{x^2}\\\\
&=e^{\large x^2\ln \left(1+\frac {2}{x^2-1}\right)}\\\\
&=e^{\large 2+\mathcal{O}(\frac {1}{x^2})}\\\\
&\to e^2
\end{align}
$$
</s>