Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 38 · Rational Expressions

Rational Functions and Asymptotes

Find vertical, horizontal and slant asymptotes, holes and intercepts of rational functions, and use them to sketch graphs with plots you can run.

A rational function is a function of the form f(x) = p(x)/q(x) where p and q are polynomials and q is not the zero polynomial. The graph of f(x) = 1/x is the classic example: two separate curves that approach the axes but never touch them.

These lines that a graph approaches without reaching (or, in some cases, crosses only in the middle) are called asymptotes. Rational functions model situations with a limit: the concentration of a drug as time passes, the average cost per item as production grows, the force between two objects as their distance changes.

Domain, intercepts and holes

  • Domain: all real numbers except the zeros of the denominator.
  • x-intercepts: zeros of the numerator, after canceling any common factors (and not zeros of the denominator).
  • y-intercept: f(0), if 0 is in the domain.
  • Hole: if a factor (x - a) cancels from top and bottom, the graph has a hole at x = a, not an asymptote.

Example 1. f(x) = (x² - 4)/(x - 2) = (x - 2)(x + 2)/(x - 2). After canceling, f(x) = x + 2 for x ≠ 2. The graph is the line y = x + 2 with a hole at (2, 4). No asymptote.

Vertical asymptotes

After canceling common factors, a zero of the denominator gives a vertical asymptote at that x. Near it, the function values grow without bound, upward or downward.

Example 2. f(x) = (x + 1)/((x - 3)(x + 2)). Nothing cancels. Vertical asymptotes: x = 3 and x = -2. The x-intercept is x = -1. The y-intercept is f(0) = 1/(-6) = -1/6.

Horizontal asymptotes

A horizontal asymptote describes the behavior as x → ±∞. Compare the degrees of the numerator (n) and denominator (m):

Case Horizontal asymptote
n < m y = 0
n = m y = (leading coeff of p) / (leading coeff of q)
n > m none (but if n = m + 1, there is a slant asymptote)

Example 3. f(x) = (3x² + 1)/(x² - 5): degrees are equal, so y = 3/1 = 3. For f(x) = (2x + 1)/(x² + 4): n = 1 < 2, so y = 0.

Slant asymptotes

When the numerator's degree is exactly one more than the denominator's, divide the polynomials. The quotient (without the remainder) is the equation of the slant (oblique) asymptote.

Example 4. f(x) = (x² + 3x + 1)/(x - 1). Synthetic division with r = 1 on 1, 3, 1: bring 1; 3 + 1 = 4; 1 + 4 = 5. Quotient x + 4, remainder 5. So f(x) = x + 4 + 5/(x - 1). As x grows large, 5/(x - 1) approaches 0, so the graph approaches the line y = x + 4. There is also a vertical asymptote at x = 1.

Python An asymptote analyzer

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The last function simplifies to x + 2 and shows no vertical asymptote, because x - 2 cancels. Its hole at x = 2 is something the cancelled form no longer remembers; you must read it from the original.

Graphing

  1. Factor, cancel, and list holes.
  2. Draw vertical asymptotes as dashed lines.
  3. Draw the horizontal or slant asymptote.
  4. Plot intercepts.
  5. Check the sign of f on each interval (between vertical asymptotes and zeros) to know whether the curve is above or below the axis.
flowchart TD
    A["Factor numerator and denominator"] --> B["Cancel common factors: holes"]
    B --> C["Zeros of the denominator: vertical asymptotes"]
    C --> D["Compare degrees: horizontal or slant asymptote"]
    D --> E["Plot intercepts, test signs, sketch"]

A routine for sketching any rational function.

Python Plot a rational function with its asymptotes

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Plotting from -8 to 0.95 and from 1.05 to 10 avoids connecting the two branches across the asymptote. If you plot straight through x = 1, the plotting library draws a misleading near-vertical line.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the vertical asymptote of f(x) = 3/(x + 4)?

    The denominator is zero at x = -4. The line y = 0 is the horizontal asymptote.
  2. 2. What is the horizontal asymptote of f(x) = (6x² + 1)/(2x² - 7)?

    Equal degrees: ratio of leading coefficients 6/2 = 3.
  3. 3. f(x) = (x - 5)(x + 1)/(x - 5) has

    The factor x - 5 cancels, so the graph has a hole where x = 5.
  4. 4. When does a rational function have a slant asymptote?

    A numerator exactly one degree higher gives a quotient of degree 1 — a slanted line.

Summary

  • A rational function is a polynomial divided by a polynomial.
  • Cancelled factors give holes; remaining zeros of the denominator give vertical asymptotes.
  • Compare degrees for the horizontal asymptote: n < m gives y = 0; n = m gives the ratio of leading coefficients.
  • A numerator one degree higher gives a slant asymptote found by polynomial division.
  • Sketch with asymptotes, intercepts and sign tests.

Next: nth Roots and Radical Notation