Limit of Function raised to a power of another function I'm trying to evaluate the following limit:

$$A =\lim_{x\to\infty}\left(\frac{x^2-3x+1}{x^2+x+2}\right)^{2x-5}$$

So far, I have exponentiated the limit and whatnot and now I am at this stage:

$$A =\exp\left(\lim_{x\to\infty}(2x-5)\ln\frac{x^2-3x+1}{x^2+x+2}\right)$$

Now, I don't know what to do here, I know via simple algebra that:

$$\lim_{x\to\infty}\ln\frac{x^2-3x+1}{x^2+x+2}=0$$

But $2x-5$ has no limit, and thus I cannot separate $A$ into the product of two limits. Perhaps I am missing something? WolframAlpha says

$$\lim_{x\to\infty}(2x-5)\ln\frac{x^2-3x+1}{x^2+x+2}=-8$$

And that therefore $A = e^{-8}$, but gives no insight as to how this is the case.
 A: Let $L=Lim_{x\to a} f(x)^{g(x)}\to 1^{\infty}$ as $\lim_{x \to a}f(x)=1+\epsilon, \lim_{x \to a} g(x)=\infty$, then
$$L=\lim_{x\to a} f(x)^{g(x)}= \exp[\lim_{x\to a}g(x)\log f(x)] =\lim_{x\to a} \exp[g(x)\log(1+\epsilon)]$$
Used $\log(1+\epsilon)\approx \epsilon$ and $\epsilon$ is in turn $f(x)-1$.
So we have $$L=\exp[\lim_{x \to a} g(x)[f(x)-1]]~~~~(1).$$
Using this here we get $$L=\exp\left[\lim_{x\to \infty} (2x-5)\frac{-4x-1}{x^2+x+2}\right]= e^{-8}.$$
A: One of favorite way to see this so quickly as follows
$$\lim_{x\to\infty}\left(\frac{x^2-3x+1}{x^2+x+2}\right)^{2x-5}= \lim_{x\to\infty}\left(1-\frac{4x+2}{x^2+x+2}\right)^{2x-5}=\lim_{x\to\infty}\left(1-\frac{1}{\frac{x^2+x+2}{4x+2}}\right)^{\frac{x^2+x+2}{4x+2}\frac{4x+2}{x^2+x+2} (2x-5)} $$
So, since $\lim_{x\to\infty}\frac{(4x+2)(2x-5)}{x^2+x+2}=8.$ Then,
$$\lim_{x\to\infty}\left(\frac{x^2-3x+1}{x^2+x+2}\right)^{2x-5}= e^{-8}$$
A: As I use to say (joke) "we are always closer to $0$ then to $\infty$"
So, start making $x=\frac 1 y$
$$A=\left(\frac{x^2-3 x+1}{x^2+x+2}\right)^{2 x-5}\implies A=\left(\frac{1-3 y+y^2}{1+y+2 y^2}\right)^{\frac{2}{y}-5}$$
Take the logarihm
$$\log(A)=\left(\frac{2}{y}-5\right)\Big[\log(1-3 y+y^2)-\log(1+y+2 y^2)\Big]$$
Work the logarithms separately ... and just finish $\log(A)$.
Continue with Taylor using
$$A=e^{\log(A)}$$ and you are done.
