<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] $$ 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.
</s>