Why i calculate this limit like this? Calculate $ \lim_{x \to ∞} f(x) = ($$\frac{x^2-2x+7}{x^2+3x+1})^\frac{1}{\sin(1/x)}$
The solution involves using $ \lim_{t \to 0} (1+t)^\frac{1}{t}=e $
But can i say that if $ \lim_{x \to ∞}  ($$\frac{x^2-2x+7}{x^2+3x+1})$ = 1
and  $ \lim_{x \to ∞}\frac{1}{\sin(1/x)} = 1 $
then $ \lim_{x \to ∞} f(x) = ($$\frac{x^2-2x+7}{x^2+3x+1})^\frac{1}{\sin(1/x)} = 1$?
I guess it's wrong but I don't really know why

Assuming the limit exists, let
$\displaystyle L:= \lim_{x \to +\infty} \left(\frac{x^2-2x+7}{x^2+3x+1}\right)^\frac{1}{\sin(1/x)}$
Then we have:
$$\log L=\lim_{x \to +\infty} \frac{1}{\sin(1/x)} \log \left(\frac{x^2-2x+7}{x^2+3x+1}\right)$$
Since
$$\sin \left(\frac{1}{x}\right) \sim  \frac{1}{x} \quad \text{as}\quad x\to+\infty\\
\log \left(\frac{x^2-2x+7}{x^2+3x+1}\right)=\log \left(1+\frac{-5x+6}{x^2+3x+1}\right)\sim \frac{-5x+6}{x^2+3x+1}
$$
It follows that:
$$\frac{1}{\sin(1/x)} \log \left(\frac{x^2-2x+7}{x^2+3x+1}\right)\sim \frac{6x-5x^2}{x^2+3x+1} \to -5 \quad \text{as}\quad x\to+\infty$$
Finally $$\boxed{L=\text{e}^{-5}}$$
