How to Graph Rational Functions
Graphing a rational function is more involved than graphing a line or a parabola, but there's a clear process. Work through these steps in order and you'll have a reliable sketch every time.
The Graphing Process
Step 1 — Factor. Factor the numerator and denominator completely.
Step 2 — Find the domain. Any value that makes the original denominator zero is excluded.
Step 3 — Identify holes and vertical asymptotes. Factors that cancel from both numerator and denominator create holes. Factors that remain in the denominator create vertical asymptotes.
Step 4 — Find the horizontal asymptote. Compare the degrees of numerator and denominator:
- Numerator degree < denominator degree → \(y = 0\)
- Equal degrees → \(y = \frac{\text{leading coefficient of numerator}}{\text{leading coefficient of denominator}}\)
- Numerator degree > denominator degree → no horizontal asymptote
Step 5 — Find intercepts. Set \(y = 0\) (i.e., set the numerator equal to zero) for x-intercepts. Set \(x = 0\) for the y-intercept.
Step 6 — Plot points and sketch. Choose a few x-values on each side of every vertical asymptote and connect the pieces, keeping the curve approaching (but never crossing) the asymptotes.
Example 1 — Simple Rational Function
Graph \(f(x) = \dfrac{x+3}{x-2}\).
Factor: Already in simplest form — no cancellation possible.
Domain: \(x \neq 2\).
Asymptotes: Vertical asymptote at \(x = 2\). Degrees are equal (both 1), leading coefficients both 1, so horizontal asymptote at \(y = 1\).
Intercepts:
- x-intercept: set numerator = 0 → \(x = -3\), giving the point \((-3, 0)\)
- y-intercept: \(f(0) = \frac{3}{-2} = -\frac{3}{2}\), giving \((0, -\frac{3}{2})\)
Sample points around \(x = 2\):
| \(x\) | \(f(x)\) |
|---|---|
| 0 | \(-3/2\) |
| 1 | \(-4\) |
| 1.9 | \(-49\) |
| 2.1 | \(51\) |
| 3 | \(6\) |
| 5 | \(8/3\) |
The curve has two branches separated by the vertical asymptote at \(x = 2\). The left branch comes from the upper left, crosses \((-3, 0)\) and \((0, -3/2)\), and plunges toward \(-\infty\) as \(x \to 2^-\). The right branch rises from \(+\infty\) near \(x = 2\) and flattens out toward \(y = 1\) as \(x \to +\infty\).
Example 2 — Hole and Asymptote
Graph \(g(x) = \dfrac{x^2 - x - 12}{x^2 - x - 6}\).
Factor:
- Numerator: \(x^2 - x - 12 = (x-4)(x+3)\)
- Denominator: \(x^2 - x - 6 = (x-3)(x+2)\)
No common factors — no holes.
Domain: \(x \neq 3, -2\).
Vertical asymptotes: \(x = 3\) and \(x = -2\).
Horizontal asymptote: Equal degrees, leading coefficients both 1 → \(y = 1\).
Intercepts:
- x-intercepts: \(x = 4\) and \(x = -3\)
- y-intercept: \(g(0) = \frac{-12}{-6} = 2\)
The graph has three separate branches, one in each region between and around the asymptotes. Each branch approaches \(y = 1\) far from the asymptotes.
Example 3 — Full Analysis with a Hole
Graph \(h(x) = \dfrac{x^2 - 4}{x^2 + x - 6}\).
Factor:
- Numerator: \(x^2 - 4 = (x-2)(x+2)\)
- Denominator: \(x^2 + x - 6 = (x-2)(x+3)\)
The factor \((x-2)\) cancels → hole at \(x = 2\).
Simplified: \(h(x) = \dfrac{x+2}{x+3}\), \(x \neq 2\).
Vertical asymptote: \(x = -3\) (the remaining denominator root).
Horizontal asymptote: Equal degrees, leading coefficients both 1 → \(y = 1\).
Hole location: At \(x = 2\), use the simplified form to find the y-value: \(\frac{2+2}{2+3} = \frac{4}{5}\). The hole is at \(\left(2, \frac{4}{5}\right)\) — an open circle on the graph.
Intercepts:
- x-intercept: set \(x + 2 = 0\) → \(x = -2\), point \((-2, 0)\)
- y-intercept: \(h(0) = \frac{2}{3}\)
Summary of features:
| Feature | Location |
|---|---|
| Hole | \(\left(2, \frac{4}{5}\right)\) |
| Vertical asymptote | \(x = -3\) |
| Horizontal asymptote | \(y = 1\) |
| x-intercept | \((-2, 0)\) |
| y-intercept | \(\left(0, \frac{2}{3}\right)\) |
Plot these features first, then fill in the curve on each side of the vertical asymptote, remembering the hole is an open circle rather than a filled point.
Practice Problems
1. Find all asymptotes, holes, and intercepts of \(\dfrac{x-1}{x^2-1}\). Show answerFactor denominator: \((x-1)(x+1)\). Factor \((x-1)\) cancels → hole at \(x=1\). Vertical asymptote: \(x=-1\). Simplified: \(\frac{1}{x+1}\). Horizontal asymptote: \(y=0\) (numerator degree < denominator degree). No x-intercept (numerator is 1). y-intercept: \(f(0) = 1\).
2. Describe the end behavior of \(\dfrac{5x^2 - 3}{2x^2 + 1}\) as \(x \to \pm\infty\). Show answerEqual degrees, leading coefficients 5 and 2. Horizontal asymptote: \(y = \frac{5}{2}\). The function approaches \(\frac{5}{2}\) in both directions.
3. How many separate branches does the graph of \(\dfrac{(x+1)}{(x-2)(x+4)}\) have, and why? Show answerTwo vertical asymptotes (\(x=2\) and \(x=-4\)) divide the x-axis into three regions, so the graph has three branches.
4. Find the hole and vertical asymptote of \(\dfrac{x^2+2x-3}{x^2-4x+3}\). Show answerFactor numerator: \((x+3)(x-1)\). Factor denominator: \((x-3)(x-1)\). Cancel \((x-1)\) → hole at \(x=1\). Vertical asymptote: \(x=3\).