<s>[INST] Possible values of $\lim_{x \rightarrow \infty} \left(\frac{p(x)}{q(x)}\right)^x$ I was asked by some freshmen the follwing two questions regarding the limit:

Using the fact that 
$$\lim_{x \rightarrow \infty} \left(1 + \frac{1}{x}\right)^x = e$$
evaluate
$$\lim_{x \rightarrow \infty} \left(1 + \frac{3}{x^2}\right)^x$$
$$\lim_{x \rightarrow \infty} \left(\frac{x^2-2x-3}{x^2-3x-28}\right)^x$$

I got the answers $1$ and $e$ respectively. Hope nothing wrong.
In the second question, my attempt is like this:
$$\frac{x^2-2x-3}{x^2-3x-28} = \frac{(x-3)(x+1)}{(x-7)(x+4)}$$
$$\lim_{x \rightarrow \infty} \left(\frac{x-3}{x-7}\right)^x = e^{4}$$
$$\lim_{x \rightarrow \infty} \left(\frac{x+1}{x+4}\right)^x = e^{-3}$$
$$\lim_{x \rightarrow \infty} \left(\frac{x^2-2x-3}{x^2-3x-28}\right)^x = e^4e^{-3} = e$$
We can also do the other way round: 
$$\lim_{x \rightarrow \infty} \left(\frac{x-3}{x+4}\right)^x = e^{-7}$$
$$\lim_{x \rightarrow \infty} \left(\frac{x+1}{x-7}\right)^x = e^{8}$$
Indeed, the power of $e$ in the final answer is the difference of the sums of roots of $x^2-2x-3$ in the numerator and $x^2-3x-28$ in the denominator.

From this question, I suspect that
$$\lim_{x \rightarrow \infty} \left(\frac{x^n + \alpha_{n-1} x^{n-1} + \ldots + \alpha_0}{x^n + \beta_{n-1} x^{n-1} + \ldots + \beta_0}\right)^x = e^{\alpha_{n-1} - \beta_{n-1}}$$
is true, but I have no idea how to prove it, if the polynomials are not able to be factorized.
The freshmen had not learnt the rule yet. It would be good if there is a proof without using the rule to let them know an easy way to check their answers and why this way holds.
 [/INST] Let $c=a_{n-1}-b_{n-1}$. Assume $c\ne 0$.
Let $p(x)=(a_{n-1}-b_{n-1})^{-1}\left((a_{n-1}-b_{n-1}) x^{n-1} + \dots + a_0-b_0\right)$.
Let $q(x)=x^n + b_{n-1} x^{n-1} + \dots + b_0$.
Let $f(x)=\left(1+c\frac{p(x)}{q(x)}\right)^\frac{q(x)}{p(x)}$.
Let $g(x)=\frac{xp(x)-q(x)}{q(x)}$.
$$\left(\frac{x^n + a_{n-1} x^{n-1} + \dots + a_0}{x^n + b_{n-1} x^{n-1} + \dots + b_0}\right)^x = \left(1+\frac{(a_{n-1}-b_{n-1}) x^{n-1} + \dots + a_0-b_0}{x^n + b_{n-1} x^{n-1} + \dots + b_0}\right)^x = \left(1+c\frac{p(x)}{q(x)}\right)^x=\left(\left(1+c\frac{p(x)}{q(x)}\right)^\frac{q(x)}{p(x)}\right)^{1+\frac{xp(x)-q(x)}{q(x)}}=f(x)f(x)^{g(x)}$$
$f(x)\to e^c$ as $x\to\infty$, since $\frac{q(x)}{p(x)}\to\infty$.
For large $x$, $f(x)\in e^c\times [\frac{1}{2},2]$.
For large $x$, $g(x)\in M\times[-\frac{1}{x},\frac{1}{x}]$, for some $M$.
So, for large $x$, $f(x)^{g(x)}\in [2^{-M\frac{1}{x}},2^{M\frac{1}{x}}]$, both of which $\to 1$.
So $f(x)^{g(x)}\to 1$ as $x\to\infty$ by squeeze theorem.
Hence $\left(\frac{x^n + a_{n-1} x^{n-1} + \dots + a_0}{x^n + b_{n-1} x^{n-1} + \dots + b_0}\right)^x\to e^c$ as $x\to\infty$.
</s>