Let #y=f(x)#
Find the limits of the function as it tends to the limits of its domain except infinity. If their result is infinity, than that #x# line is an asymptote. Here, the domain is:
#x in(-oo,1)uu(1,3)uu(3,+oo)#
So the 4 possible vertical asymptotes are:
#lim_(x->1^-)f(x)#
#lim_(x->1^+)f(x)#
#lim_(x->3^-)f(x)#
#lim_(x->3^+)f(x)#
Asymptote #x->1^-#
#lim_(x->1^-)f(x)=lim_(x->1^-)(x+1)^2/((x-1)(x-3))=2^2/(0^-*(-2))=#
#=-2^2/(0*(-2))=4/(0*2)=4/0=+oo# Vertical asymptote for #x=1#
Note: for #x-1# since #x# is slightly lower than 1 the result will be something a bit lower than 0, so the sign will be negative, hence the note #0^-# which later translates to a negative sign.
Confirmation for asymptote #x->1^+#
#lim_(x->1^+)f(x)=lim_(x->1^+)(x+1)^2/((x-1)(x-3))=2^2/(0^+*(-2))=#
#=2^2/(0*(-2))=-4/(0*2)=-4/0=-oo# Confirmed
Asymptote #x->3^-#
#lim_(x->3^-)f(x)=lim_(x->3^-)(x+1)^2/((x-1)(x-3))=3^2/(2*0^-)=#
#=-3^2/(2*0)=-9/0=-oo# Vertical asymptote for #x=3#
Confirmation for asymptote #x->3^+#
#lim_(x->3^+)f(x)=lim_(x->3^+)(x+1)^2/((x-1)(x-3))=3^2/(2*0^+)=#
#=3^2/(2*0)=9/0=+oo# Confirmed
Find both limits as the function tends to #+-oo#
Minus infinity #x->-oo#
#lim_(x->-oo)f(x)=lim_(x->-oo)(x+1)^2/((x-1)(x-3))=#
#=lim_(x->-oo)(x^2+2x+1)/(x^2-4x-3)=lim_(x->-oo)(x^2(1+2/x+1/x^2))/(x^2(1-4/x-3/x^2))=#
#=lim_(x->-oo)(cancel(x^2)(1+2/x+1/x^2))/(cancel(x^2)(1-4/x-3/x^2))=lim_(x->-oo)(1+2/x+1/x^2)/(1-4/x-3/x^2)=#
#=(1+0+0)/(1-0-0)=1# Horizontal asymptote for #y=1#
Plus infinity #x->+oo#
#lim_(x->+oo)f(x)=lim_(x->+oo)(x+1)^2/((x-1)(x-3))=#
#=lim_(x->+oo)(x^2+2x+1)/(x^2-4x-3)=lim_(x->+oo)(x^2(1+2/x+1/x^2))/(x^2(1-4/x-3/x^2))=#
#=lim_(x->+oo)(cancel(x^2)(1+2/x+1/x^2))/(cancel(x^2)(1-4/x-3/x^2))=lim_(x->+oo)(1+2/x+1/x^2)/(1-4/x-3/x^2)=#
#=(1+0+0)/(1-0-0)=1# Horizontal asymptote for #y=1#
Note: it just so happens that this function has a common horizontal for both #-oo# and #+oo#. You should always check both.
You must first find both limits:
#lim_(x->+-oo)f(x)/x#
For each, if this limit is a real number, then the asymptote exists and the limit is its slope. The #y# intercept of each is the limit:
#lim_(x->+-oo)(f(x)-m*x)#
However, to save us the trouble, you can use some function "knowledge" to avoid this. Since we know #f(x)# has horizontal asymptote for both #+-oo# the only way of having an oblique is having another line as #x->+-oo#. However, #f(x)# is a #1-1# function so there can't be two #y# values for one #x#, hence a second line is impossible, so it's impossible to have oblique asymptotes.