Sub topic 3
Holes: when a factor cancels
This chapter assumes you can factor polynomials, solve linear and quadratic equations, and plot points on a coordinate plane. It covers holes first, then asymptotes, graphing, inequalities, applications, and partial fractions.
Holes
A hole is a removable discontinuity: one point missing from a graph. It appears when a factor cancels from both the numerator and the denominator. For f(x) = (x^2 - 1)/(x - 1), the numerator factors to (x - 1)(x + 1). The factor x - 1 cancels, leaving x + 1, but f is still undefined at x = 1.
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, so the hole is at (1, 2)Horizontal asymptotes and end behavior
Compare the degree n of the numerator with the degree m of the denominator.
| Condition | Horizontal asymptote |
|---|---|
| n < m | y = 0 |
| n = m | y = a/b, the ratio of leading coefficients |
| n > m | None |
For (2x^2 + 1)/(x^2 - 4), the degrees are equal, so y = 2.
Slant asymptotes and long division
When n = m + 1, the graph follows a slant line. Divide the numerator by the denominator. The quotient is the slant asymptote.
from sympy import symbols, div
x = symbols('x')
quotient, remainder = div(x**2 + 1, x - 1, x)
print(quotient, remainder) # x + 1 2Putting it together: graphing a rational function
Factor the function first, then work through the steps in order.
Rational inequalities and sign charts
Move every term to one side and factor. Mark the zeros of the numerator and the denominator as critical values. Test one value in each interval between them. Always exclude zeros of the denominator, even when the inequality allows equality.
Applications: work, rate and mixture problems
Work problems produce rational equations. If A finishes a job in tA hours and B in tB hours, together they finish in T hours where 1/tA + 1/tB = 1/T. Solve the equation, then reject any solution that makes a denominator zero or gives a negative time.
Partial fraction decomposition
Partial fractions split a proper fraction into simpler pieces, reversing the common-denominator step. Use SymPy to check your work.
from sympy import symbols, apart
x = symbols('x')
print(apart(1/(x**2 - 1), x)) # equivalent to 1/(2*(x - 1)) - 1/(2*(x + 1))Exercise
What is the hole in f(x) = (x^2 - 4)/(x - 2), and what is the simplified function?
Show answer
The factor x - 2 cancels, leaving x + 2. The hole is at (2, 4).