Sub topic 11
Holes: when a factor cancels
Prerequisites and scope
This chapter assumes you can factor polynomials, simplify a rational expression by cancelling common factors, and find the domain of a rational function. It also assumes you know how to locate a vertical asymptote from a zero of the denominator. Here you will learn why some zeros of the denominator produce a hole in the graph instead of an asymptote, and how to find the hole's coordinates.
Two kinds of denominator zero
Take a rational function f(x) = p(x)/q(x) written in lowest terms or not. Every real zero of q(x) is excluded from the domain. What the graph does near that excluded value depends on whether the matching factor survives cancellation.
- If the factor (x - a) appears in the denominator and still remains after you cancel all common factors, the graph has a vertical asymptote at x = a.
- If the factor (x - a) appears in both the numerator and the denominator and cancels, the graph has a hole at x = a. This is also called a removable discontinuity.
The word "removable" means you could repair the function by defining one extra value at x = a. The cancelled form already gives that value.
A worked example
Consider the function
f(x) = (x² - 1)/(x - 1).
- Factor the numerator: x² - 1 = (x - 1)(x + 1).
- Write the function as f(x) = (x - 1)(x + 1)/(x - 1).
- Note the excluded value before cancelling: x = 1 makes the original denominator zero.
- Cancel the common factor to get g(x) = x + 1, valid for x ≠ 1.
- Find the height of the hole by putting x = 1 into the cancelled form: g(1) = 2.
The graph of f is the line y = x + 1 with a single point missing at (1, 2). The missing point is drawn as an open circle.
from sympy import symbols, cancel
x = symbols('x')
f = (x**2 - 1) / (x - 1)
g = cancel(f)
print(g) # x + 1
print(g.subs(x, 1)) # 2 -> hole at (1, 2)The code shows the two steps clearly. cancel produces the simplified form, and substituting into that form gives the y-coordinate of the hole. Substituting x = 1 into the original f would give a division by zero.
Order matters: record the exclusion first
Cancelling changes the formula but must not change the function's domain. The expressions (x² - 1)/(x - 1) and x + 1 are equal everywhere except at x = 1. The first is undefined there. The second is not.
To avoid losing this information, follow the same order every time:
- Factor the numerator and the denominator completely.
- List every value that makes the original denominator zero.
- Cancel the common factors, noting which values they came from.
- Classify each excluded value. A value whose factor cancelled is a hole. A value whose factor remains in the denominator is a vertical asymptote.
- Compute each hole's y-coordinate from the cancelled form.
Why a hole and not an asymptote
Near x = 1, the function (x - 1)(x + 1)/(x - 1) equals x + 1 for every x that is not 1. As x gets close to 1 from either side, the output gets close to 2. The limit exists and is finite, so the graph approaches a definite point and that single point is missing.
A vertical asymptote behaves differently. In (x + 1)/(x - 1), the factor x - 1 is not cancelled. As x approaches 1, the numerator approaches 2 and the denominator approaches 0, so the outputs grow without bound in size. Nothing finite can be approached, so the graph shoots up or down.
| Feature | Factor after cancelling | Behavior near x = a | Marker on graph |
|---|---|---|---|
| Hole | Factor is gone from the denominator | Outputs approach a finite number | Open circle |
| Vertical asymptote | Factor remains in the denominator | Outputs grow without bound | Dashed vertical line |
Partial cancellation: multiplicity
Factors can appear more than once. Compare how many copies of (x - a) sit in the numerator and in the denominator.
Take h(x) = (x - 2)²/(x - 2)³. Cancelling two copies leaves 1/(x - 2). One copy remains in the denominator, so x = 2 is a vertical asymptote and not a hole.
Now take k(x) = (x - 2)³/(x - 2)². Cancelling two copies leaves x - 2. No copy remains in the denominator, so x = 2 is a hole. Its height is the value of x - 2 at x = 2, which is 0, so the hole is at (2, 0).
The rule is a comparison of exponents. Let m be the power of (x - a) in the numerator and n the power in the denominator.
- If m ≥ n, the factor is gone from the denominator after cancelling, and x = a is a hole.
- If m < n, a factor remains in the denominator, and x = a is a vertical asymptote.
When m ≥ n, the hole's y-value is the cancelled form evaluated at a. If m > n, that value is 0, so the hole sits on the x-axis. That is a hole at an x-intercept position, and it means the point is not a true intercept because the function is undefined there.
A function with a hole and an asymptote together
Many exam problems combine both features. Consider
f(x) = (x² - 9)/(x² - 5x + 6).
Factor: f(x) = (x - 3)(x + 3)/((x - 2)(x - 3)).
The original denominator is zero at x = 2 and x = 3. The factor x - 3 cancels, leaving
g(x) = (x + 3)/(x - 2).
- At x = 3 the factor cancelled, so there is a hole. Its height is g(3) = 6/1 = 6, so the hole is at (3, 6).
- At x = 2 the factor x - 2 remains, so there is a vertical asymptote at x = 2.
from sympy import symbols, cancel
x = symbols('x')
expr = (x**2 - 9) / (x**2 - 5*x + 6)
print(cancel(expr)) # (x + 3)/(x - 2)The output confirms the simplified form. cancel removes the common factor (x - 3), but the original expression is still undefined at both x = 2 and x = 3.
The following diagram summarizes the decision process.
Common errors
- Reading the domain from the simplified form. The domain comes from the original denominator.
- Treating every denominator zero as an asymptote. A zero whose factor cancels is a hole.
- Substituting into the original function to find the hole's height. This divides by zero. Use the cancelled form.
- Cancelling terms instead of factors. In (x + 3)/(x - 2) you cannot cancel the x values. Only factors that multiply the whole numerator and the whole denominator can be cancelled.
- Forgetting that a hole can lie on the x-axis. When the cancelled form is zero at a, the point (a, 0) is a hole and not an x-intercept.
- Ignoring multiplicity. Compare the exponents, not just whether the factor appears on both sides.
Holes versus other discontinuities
A rational function has only two kinds of discontinuity at real numbers: holes and vertical asymptotes. A hole is a removable discontinuity because the limit exists. A vertical asymptote is an infinite discontinuity because the limit does not exist as a finite number. This makes classification a purely algebraic task: compare factor counts.
Holes also matter for later work. In graphing, the hole is plotted as an open circle on the simplified curve. In rational inequalities, the hole's x-value stays out of every solution interval because the function is not defined there, even though a sign chart of the simplified form might seem to allow it.
Exercises
Exercise
Find all holes and vertical asymptotes of f(x) = (x² - 4x + 3)/(x² - 1). Give the coordinates of each hole.
Show answer
Factor: f(x) = (x - 1)(x - 3)/((x - 1)(x + 1)). The original denominator is zero at x = 1 and x = -1. The factor x - 1 cancels, leaving g(x) = (x - 3)/(x + 1). At x = 1 there is a hole with height g(1) = (1 - 3)/(1 + 1) = -1, so the hole is at (1, -1). At x = -1 the factor x + 1 remains, so there is a vertical asymptote x = -1.
Exercise
Classify x = 2 for k(x) = (x - 2)³(x + 1)/(x - 2)². Give the coordinates if it is a hole.
Show answer
The numerator has three copies of (x - 2) and the denominator has two, so m = 3 ≥ n = 2 and x = 2 is a hole. The cancelled form is (x - 2)(x + 1). At x = 2 this equals 0, so the hole is at (2, 0). Because the function is undefined at x = 2, the point (2, 0) is not an x-intercept.