Asymptote can be of two types: Horizontal and Vertical.
To find Horizontal asymptote of a rational function we need to check if the polynomial of numerator and denominator have same degree.
Here,the polynomial in numerator and denominator have same degree.
Thus, Horizontal aymptote:
y= Co-efficient of highest degree term in numerator÷ Co-efficient of highest degree term in denominator
⇒y=2/1
⇒y=2
To find Vertical asymptote of a rational function we need to equate the denominator to zero.
x2+x−2=0⇒x2+2x−x−2=0⇒x(x+2)−1(x+2)=0⇒(x+2)(x−1)=0
Either x+2=0⇒x=−2 or x−1=0⇒x=1
Thus asymptotes of the given function are: y=2,x=−2,x=1