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.

 A: Another way: Note it is easy to show for large enough $n$, (in this case $n>7$):
$$\frac4{n+1} < \frac{4n+1}{n^2+n+2} < \frac4{n}$$
$$\implies \left(1 + \frac4{n+1}\right)^n < \left(\frac{n^2+5n+3}{n^2+n+2} \right)^n < \left(1 + \frac4{n}\right)^n$$
Now squeezing does the rest.
A: $$ y = \lim_{n\to\infty}\left(\frac{n^2+5n+3}{n^2+n+2}\right)^n$$
$$ y = \lim_{n\to\infty}\left(1 + \frac{4n+1}{n^2+n+2}\right)^n$$
$$\ln y = \lim_{n\to\infty}n \ln\left(1 + \frac{4n+1}{n^2+n+2}\right)$$
$$\ln y = \lim_{n\to\infty}n \left(\frac{4n+1}{n^2+n+2} - \left(\frac{4n+1}{n^2+n+2}\right)^2 + \left(\frac{4n+1}{n^2+n+2}\right)^3 \cdots\right)$$
$$\ln y = \lim_{n\to\infty}\left(\frac{4n^2+n}{n^2+n+2} + O(n^{-1})\cdots\right)$$
$$\ln y = \lim_{n\to\infty}\left(4 + \frac{-3n - 8}{n^2+n+2} + O(n^{-1})\cdots\right)$$
$$\ln y = 4$$
The expansion of $\ln(1 + z)$ around $z = 0$ only works because $\frac{4n+1}{n^2+n+2}$ approaches zero.


$\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$.

No because you have two different terms , the $n$ and the $\log\left(\dfrac{1+5/n+3/n^2}{1+1/n+2/n^2}\right)$, which can't be treated separately.  The first goes to infinity, the second goes to zero, you have to figure out what the relative speed of them going to their limit is.  If both went to zero or both went to infinity then you could conclude their product does as well, but that's not the case here.
A: 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}. $$
A: Another way
$$\dfrac{n^2+5n+3}{n^2+n+2}=\dfrac{n^2+5n+3}{n^2\left(1+\dfrac{1}{n}+\dfrac{2}{n^2}\right)}\sim \left(1+\dfrac{5}{n}+\dfrac{3}{n^2}\right)\left(1-\dfrac{1}{n}-\dfrac{2}{n^2}\right)\sim 1+\dfrac{4}{n}$$
$$\lim_{n\to\infty}\left( 1+\dfrac{4}{n}\right)^n=\lim_{t\to\infty}\left( 1+\dfrac{4}{4t}\right)^{4t}=\lim_{t\to\infty}\left( 1+\dfrac{1}{t}\right)^{4t}=e^4$$
A: I've also posted this answer with the thought that some readers might find it useful.

Using high school algebra trick, we have:
$$
\begin{align}&\lim_{n\to\infty}\left(\frac{n^2+5n+3}{n^2+n+2}\right)^n\\
=~&\lim_{n\to\infty}\left(1+\frac{4n+1}{n^2+n+2}\right)^n\\
=~&\lim_{n\to\infty}\left(\left(1+\frac {1}{\frac{n^2+n+2}{4n+1}}\right)^{\frac {n^2+n+2}{4n+1}}\right)^{\frac {4n^2+n}{n^2+n+2}}\\
=~&\lim_{n\to\infty}\left(\left(1+\frac {1}{\frac{n+1+2/n}{4+1/n}}\right)^{\frac {n+1+2/n}{4+1/n}}\right)^{\frac {4+1/n}{1+1/n+2/n^2}}\\
=~&~e^4~.\end{align}
$$
That's all.
