<s>[INST] How to solve $\lim_{n\to\infty}\left(\dfrac{n^2+5n+3}{n^2+n+2}\right)^n$ Question:
$$\lim_{n\to\infty}\left(\dfrac{n^2+5n+3}{n^2+n+2}\right)^n=?$$
My work:
$\lim_{n\to\infty}\left(\dfrac{n^2+5n+3}{n^2+n+2}\right)^n=\lim_{n\to\infty}\left(\dfrac{n^2(1+5/n+3/n^2}{n^2(1+1/n+2/n^2)}\right)^n=\lim_{n\to\infty}\left(\dfrac{1+5/n+3/n^2}{1+1/n+2/n^2}\right)^n$
$\log L=n\log\left(\dfrac{1+5/n+3/n^2}{1+1/n+2/n^2}\right)$
Is this equal to 0? Then the answer would be $e^0=1$.

The answer was given as $e^4$ and I have no idea how to get to that.

 [/INST] By using $$ \lim_{n \to \infty} \, \left(1 + \frac{x}{n}\right)^n = e^{x}, $$ $n^2 + 5 n + 3 = (n+a_{1})(n+a_{2}),$ and $n^2 + n + 2 = (n+b_{1})(n+b_{2})$ then
\begin{align}
L &= \lim_{n \to \infty} \, \left( \frac{n^2 + 5 n + 3}{n^2 + n + 2} \right)^n \\
&= \lim_{n \to \infty} \, \left( \frac{(n+a_{1})(n+a_{2})}{(n+b_{1})(n+b_{2})} \right)^n \\
&= \lim_{n \to \infty} \, \left( \frac{\left(1+\frac{a_{1}}{n}\right)\left(1+\frac{a_{2}}{n}\right)}{\left(1+\frac{b_{1}}{n}\right)\left(1+\frac{b_{2}}{n}\right)} \right)^n \\
&= \frac{ e^{a_{1}} \, e^{a_{2}} }{ e^{b_{1}} \, e^{b_{2}} } = e^{a_{1}+a_{2}-b_{1}-b_{2}}.
\end{align}
Now,
$$ a_{1} = \frac{5+\sqrt{13}}{2}, \, a_{2} = \frac{5 -\sqrt{13}}{2}, \, b_{1} = \frac{1+i \, \sqrt{7}}{2}, \, b_{2} = \frac{1 - i \, \sqrt{7}}{2} $$
which gives $a_{1} + a_{2} = 5$, $b_{1} + b_{2} = 1$, and $L = e^{4}$, or
$$ \lim_{n \to \infty} \left(\frac{n^2 + 5 n + 3}{n^2 + n + 2}\right)^n = e^{4}. $$
</s>