Simplify (x²-9)/(x²-x-6) by factoring numerator and denominator, then cancelling the common factor (x-3). State domain restrictions x≠3 and x≠-2.

Example

Factor, cancel the common factor, and keep original domain restrictions.

highlighted = computed this step

Step 1 — Set up

Set up the expression.

x29x2x6\frac{ x^{2} - 9 }{ x^{2} -x- 6 }

Step 2 — Factor numerator

Factor the numerator: use 3 and 3 for x squared minus 9.

x29=(x+3)(x3)x^{2} - 9 =(x+ \hl{3} )(x- \hl{3} )

Step 3 — Factor denominator

Factor the denominator: use 2 and 3 for x squared minus x minus 6.

x2x6=(x+2)(x3)x^{2} -x- 6 =(x+ \hl{2} )(x- \hl{3} )

Step 4 — Cancel common factor

Cancel the common factor x minus 3; it matches x minus 3.

(x+3)(x3)(x+2)(x3)\frac{(x+ 3 )(x- \hl{3} )}{(x+ 2 )(x- \hl{3} )}

Step 5 — Simplified expression

Keep the uncancelled factors: x plus 3 over x plus 2.

x+3x+2\frac{x+ \hl{3} }{x+ \hl{2} }

Step 6 — Domain restrictions

State original restrictions: x cannot be 3 or negative 2.

x3,x2x\ne \hl{3} ,\quad x\ne - \hl{2}
rational-expression-simplify Factor both numerator and denominator completely. Cancel common factors. State all x values that make the original denominator zero as domain restrictions.