Given: #(x^3 + x^2 - 22x - 40)/(x^4 - x^3 - 7x^2 + x + 6)#

This type of function is called a rational function.

#(N(x))/(D(x)) = (a_nx^n + ...)/(b_b x^m + ...)#, where #a_n " & " b_m# are the leading coefficients and #n# and #m# are the degrees of the two functions.

#color(blue)"Factor"# both the numerator and the denominator need to be factored.

The easiest way is to graph each function individually and find the zeros (#x#-intercepts).

This is the graph of #N(x) = x^3 + x^2 - 22x - 40#

graph{x^3 + x^2 - 22x - 40 [-5, 6, -80, 10]}

It has #x#-intercepts at #x = -4, -2 and 5#

This means #color (red)(N(x)) = x^3 + x^2 - 22x - 40 = color (red)((x +4)(x+2)(x-5))#

This is the graph of #D(x) = x^4 - x^3 - 7x^2 + x + 6#:

graph{x^4 - x^3 - 7x^2 + x + 6 [-5, 6, -15, 10]}

It has #x#-intercepts at #x = -2, -1, 1 and 3#

This means #color (red)(D(x)) = x^4 - x^3 - 7x^2 + x + 6 = color(red)((x+2)(x+1)(x-1)(x-3))#

#color(blue)"Factored function:"#

#f(x) = ((x +4)cancel((x+2))(x-5))/(cancel((x+2))(x+1)(x-1)(x-3))#

#color(magenta)("Finding the Domain depends on holes, and vertical asymptotes.")#

If you can cancel a factor that is both in the numerator and the denominator, that is where you have a hole; a removable discontinuity.

#color (magenta)("Hole at " x = -2#

Vertical asymptotes are found by setting #D(x) = 0# after the holes are eliminated.

#color (magenta)("Vertical asymptotes are at " x = -1, 1, x = 3#

Domain: #(-oo, -2) uu (-2, -1) uu (-1, 1) uu (1, 3) uu (3, oo)#