Precalculus · Rational Functions

Rational Functions — Complete Guide

Domain, vertical asymptotes, holes, horizontal asymptotes, oblique asymptotes, and graphing. Master every type of rational function behavior with worked examples.

Quick Reference — Asymptote Rules

Vertical Asymptotes & Holes

  • Step 1: Factor numerator and denominator
  • Common factors cancel → holes (removable discontinuities)
  • Remaining denominator zeros → vertical asymptotes
  • Hole coordinate: plug x into simplified form

Horizontal Asymptotes

  • deg(num) < deg(den) → y = 0
  • deg(num) = deg(den) → y = leading coeff ratio
  • deg(num) > deg(den) → no HA
  • deg(num) = deg(den) + 1 → oblique asymptote

What Is a Rational Function?

A rational function is a ratio of two polynomials:

f(x) = p(x) / q(x)

where p(x) and q(x) are polynomials and q(x) ≠ 0

The domain excludes any x-values that make the denominator zero. Always set q(x) = 0 and solve — those solutions are not in the domain.

Example: Find the domain of f(x) = (x + 3) / (x² − 9)

Set denominator = 0: x² − 9 = 0 → (x − 3)(x + 3) = 0 → x = 3 or x = −3

Domain: all real numbers except x = 3 and x = −3

Write as: (−∞, −3) ∪ (−3, 3) ∪ (3, ∞)

Vertical Asymptotes

A vertical asymptote is a vertical line x = a where the function grows without bound. It occurs where the denominator equals zero and the numerator does not. You must factor and cancel common factors first — those give holes, not asymptotes.

1

Factor both numerator and denominator completely

2

Cancel any common factors — each canceled factor produces a hole

3

Set the remaining denominator equal to zero and solve — each solution is a vertical asymptote

Critical reminder

Always factor and simplify before identifying asymptotes. A canceled factor is a hole, not a vertical asymptote. Skipping this step is the most common mistake on rational function problems.

Holes (Removable Discontinuities)

A hole appears when the same factor cancels from both numerator and denominator. The function is undefined at that single x-value, but the graph looks continuous everywhere else — picture a curve with one invisible pinhole missing.

How to Find the Hole Coordinate

1

Identify the common factor that cancels, e.g. (x − a). The x-coordinate of the hole is x = a.

2

Plug x = a into the simplified (reduced) form of the rational function — not the original. This gives the y-coordinate.

3

Write the hole as a coordinate pair: (a, y). Plot it as an open circle on the graph.

Example: f(x) = (x² − 4) / (x − 2)

Factor: (x − 2)(x + 2) / (x − 2)

Cancel (x − 2) → simplified form: x + 2, with x ≠ 2

Hole at x = 2: plug into simplified form → 2 + 2 = 4 → hole at (2, 4)

No vertical asymptote — denominator has no remaining factors after cancellation.

Horizontal Asymptotes

A horizontal asymptote is a horizontal line y = k that the function approaches as x → ±∞. It is determined entirely by comparing the degrees of the numerator (n) and denominator (d).

Degree ComparisonHorizontal AsymptoteExampleNote
deg(num) < deg(den)y = 0(x + 1) / (x² + 4)Numerator degree 1 < denominator degree 2
deg(num) = deg(den)y = a/b (ratio of leading coefficients)(2x² + 3) / (5x² − 1)y = 2/5
deg(num) > deg(den)None (check for oblique if deg(num) = deg(den) + 1)(x² − 1) / (x − 2)Do polynomial long division

Important distinction

Unlike vertical asymptotes, a rational function can cross its horizontal asymptote for finite x-values. The horizontal asymptote only describes behavior as x → ±∞.

Oblique (Slant) Asymptotes

When the degree of the numerator is exactly one more than the degree of the denominator, there is no horizontal asymptote but there is an oblique asymptote — a slanted line y = mx + b that the graph approaches at the extremes.

How to Find the Oblique Asymptote

Perform polynomial long division of p(x) ÷ q(x). The quotient (ignoring the remainder) is the equation of the oblique asymptote.

Example: f(x) = (x² − 1) / (x − 2). Divide x² − 1 by x − 2.

x² ÷ x = x

x · (x − 2) = x² − 2x

Subtract: (x² − 1) − (x² − 2x) = 2x − 1

2x ÷ x = 2

2 · (x − 2) = 2x − 4

Subtract: (2x − 1) − (2x − 4) = 3 (remainder)

Result: x + 2 remainder 3 → f(x) = (x + 2) + 3/(x − 2)

Oblique asymptote: y = x + 2 (the remainder vanishes as x → ±∞)

Graphing Rational Functions — Step-by-Step

Follow these steps in order to produce an accurate sketch of any rational function.

1

Find the domain

Set the denominator equal to zero and solve. Every solution is excluded from the domain.

2

Factor and cancel

Factor numerator and denominator completely. Cancel common factors — each canceled factor is a hole, not an asymptote.

3

Find vertical asymptotes

Set the remaining denominator equal to zero. Each solution gives a vertical asymptote x = a.

4

Find holes

For each canceled factor (x − a), find the y-coordinate by plugging a into the simplified form. Plot as an open circle.

5

Find horizontal or oblique asymptote

Compare degrees of numerator and denominator. Use the three-case rule for HA, or do long division for oblique.

6

Find intercepts

y-intercept: evaluate f(0). x-intercepts: set numerator of simplified form equal to zero and solve.

7

Sign chart and sketch

Test the sign of f(x) in each interval created by vertical asymptotes and x-intercepts. Use sign info to determine whether branches go up or down near asymptotes. Sketch with smooth curves.

Worked Examples

1

f(x) = (x + 2) / (x² − 4)

Find all asymptotes, holes, intercepts, and domain.

Step 1 — Factor

Denominator: x² − 4 = (x + 2)(x − 2)

f(x) = (x + 2) / [(x + 2)(x − 2)]

Step 2 — Cancel common factor (x + 2)

Simplified: f(x) = 1 / (x − 2), x ≠ −2

Hole at x = −2: plug into simplified → 1/(−2 − 2) = −1/4

Hole at (−2, −1/4)

Step 3 — Vertical asymptote

Remaining denominator: x − 2 = 0 → x = 2 (vertical asymptote)

Step 4 — Horizontal asymptote

Simplified has deg(num) = 0 < deg(den) = 1 → y = 0

Step 5 — Intercepts

y-intercept: f(0) = 1/(0 − 2) = −1/2 → point (0, −1/2)

x-intercept: numerator of simplified = 1 ≠ 0 → no x-intercept

2

f(x) = (2x² + 3x − 2) / (x² − 1)

Find all asymptotes, holes, and the horizontal asymptote.

Step 1 — Factor both

Numerator: 2x² + 3x − 2 = (2x − 1)(x + 2)

Denominator: x² − 1 = (x − 1)(x + 1)

No common factors → no holes

Step 2 — Vertical asymptotes

Denominator zeros: x − 1 = 0 → x = 1; x + 1 = 0 → x = −1

Vertical asymptotes at x = 1 and x = −1

Step 3 — Horizontal asymptote

deg(num) = 2 = deg(den) = 2 → y = leading coeff ratio

y = 2/1 = 2 (horizontal asymptote)

Step 4 — Intercepts

y-intercept: f(0) = (0 + 0 − 2)/(0 − 1) = −2/−1 = 2 → point (0, 2)

x-intercepts: set numerator = 0 → (2x − 1)(x + 2) = 0 → x = 1/2 or x = −2

Both are in the domain → x-intercepts at (1/2, 0) and (−2, 0)

3

f(x) = (x² − 1) / (x − 2)

Find the oblique asymptote using polynomial long division.

Step 1 — Check degrees

deg(num) = 2, deg(den) = 1. Since 2 = 1 + 1, there is an oblique asymptote.

Step 2 — No common factors, so vertical asymptote at x = 2

Domain: all real numbers except x = 2

Step 3 — Polynomial long division

Divide x² − 1 by x − 2:

x² ÷ x = x → x(x − 2) = x² − 2x

Subtract: (x² − 1) − (x² − 2x) = 2x − 1

2x ÷ x = 2 → 2(x − 2) = 2x − 4

Subtract: (2x − 1) − (2x − 4) = 3

f(x) = x + 2 + 3/(x − 2)

Result

As x → ±∞, the term 3/(x − 2) → 0, so f(x) ≈ x + 2

Oblique asymptote: y = x + 2

Intercepts

y-intercept: f(0) = (0 − 1)/(0 − 2) = 1/2 → point (0, 1/2)

x-intercepts: x² − 1 = 0 → (x − 1)(x + 1) = 0 → x = 1 or x = −1 → points (1, 0) and (−1, 0)

Frequently Asked Questions

How do you find vertical asymptotes of a rational function?

First factor both the numerator and denominator completely. Cancel any common factors — each canceled factor gives a hole, not an asymptote. The remaining values that make the denominator equal zero are the vertical asymptotes. For example, in f(x) = (x+2)/(x²-4), factor the denominator to get (x+2)(x-2). The factor (x+2) cancels, giving a hole at x=-2. The remaining denominator factor (x-2) gives a vertical asymptote at x=2.

What are the three cases for horizontal asymptotes?

Horizontal asymptotes depend on comparing the degrees of the numerator n and denominator d. Case 1: if n < d, the horizontal asymptote is y = 0 (the x-axis). Case 2: if n = d, the horizontal asymptote is y = (leading coefficient of numerator) / (leading coefficient of denominator). Case 3: if n > d, there is no horizontal asymptote — instead there may be an oblique (slant) asymptote when n = d + 1.

What is a hole in a rational function?

A hole (removable discontinuity) occurs when the same factor cancels from both the numerator and denominator. The function is undefined at that x-value, but the graph looks like a continuous curve with a single missing point. To find the hole: set the canceled factor equal to zero to get the x-coordinate, then plug that x-value into the simplified (reduced) rational function to get the y-coordinate. For example, if (x+2) cancels and the simplified form is 1/(x-2), plug in x=-2 to get y = 1/(-2-2) = -1/4, so the hole is at (-2, -1/4).

Practice rational function problems

Work through asymptotes, holes, domain, and graphing with step-by-step solutions. Free to start — no account required.

Start Practicing Free

Related Topics