
Asymptotes of a function
Hello everyone
I am asked to find the asymptotes of $\displaystyle f(x)=\frac{x^2+1}{x+2} $
One of these is x=2 , but when I try to arrive at the other asymptote, I get differing answers depending on the method I use.
First I tried to simplify the function
$\displaystyle
\frac{x^2 (1\frac{1}{x^2})}{x(1+\frac{2}{x})}$
Looking at this it seems that when x approaches infinity, the function f(x) approaches the asymptote y=x.
However, if I use long division of polynomials of nested synthetic division I always get that the function will approach y=x2.
Can someone please help me figure out what I'm doing wrong?

$\displaystyle (x^2 + 1) : (x + 2) = x 2 + \frac{5}{x + 2}$
$\displaystyle (x^2 + 2x)$

$\displaystyle 2x+1$
$\displaystyle (2x  4)$

$\displaystyle 5$
yeah it is y = x 2
I can't think of a way to do this with limits, since both x and y go to + infinity.

So why did the simplification yield a different result?