Graphing Rational Functions

Graphing rational functions starts with their asymptotes. Factor the numerator and denominator, cancel any common factor to find holes, and set the simplified denominator equal to zero for the vertical asymptotes. Compare degrees to find the horizontal asymptote. Then plot the intercepts and a few test points on each side of each asymptote.

Before this lesson: You should know Inverse Variation, Simplifying Rational Expressions, Transformations of Functions and End Behavior of Polynomials.

What Makes the Graph Break Apart

A rational function is a function like f(x) = \frac{x + 1}{x - 2}, a polynomial divided by a polynomial. It is undefined wherever the denominator is zero, so its graph breaks there.

Near such a value, the graph usually shoots up or down along a vertical asymptote, a line the graph gets close to but never touches. Far to the left and right, the graph often levels off toward a horizontal asymptote.

Graph of f(x) = (x + 1)/(x − 2). A dashed vertical line at x = 2 and a dashed horizontal line at y = 1 are the asymptotes. The curve has two branches: one in the lower left crossing the x-axis at (−1, 0) and the y-axis at (0, −1/2), and one in the upper right passing through (3, 4) and (5, 2).
The graph of (x + 1)/(x − 2) never touches x = 2 or y = 1. It crosses the axes at (−1, 0) and (0, −1/2).

The Rules

FeatureHow to find it
HoleA factor that cancels from the top and bottom. Its x-value makes a hole (an open circle).
Vertical asymptoteZeros of the denominator after canceling
x-interceptsZeros of the numerator after canceling
y-interceptf(0), if 0 is in the domain
Horizontal asymptoteCompare the degree of the top (n) and the bottom (m)
DegreesHorizontal asymptoteExample
n \lt my = 0\frac{6}{x^2 - 9} has y = 0
n = my = \frac{\text{leading coefficient of top}}{\text{leading coefficient of bottom}}\frac{4x^2 + 1}{2x^2 - 5} has y = 2
n \gt mNone\frac{x^3 + 1}{x^2 + 4} has none

The graph can never touch a vertical asymptote. It can sometimes cross a horizontal one in the middle, because a horizontal asymptote only describes the far ends.

Worked Examples

Example 1: A shifted reciprocal function

Graph f(x) = \frac{3}{x - 2} + 1.

  1. This is y = \frac{3}{x} (see inverse variation) shifted right 2 and up 1 (see transformations of functions).
  2. Vertical asymptote: x = 2. Horizontal asymptote: y = 1.
  3. f(3) = \frac{3}{1} + 1 = 4
  4. f(5) = \frac{3}{3} + 1 = 2
  5. f(1) = \frac{3}{-1} + 1 = -2
  6. f(-1) = \frac{3}{-3} + 1 = 0, so the x-intercept is (-1, 0).

Answer: Two branches, upper right and lower left of the point (2, 1), through the points above.

Example 2: Equal degrees

Graph f(x) = \frac{x + 1}{x - 2}. This is the graph above.

  1. Nothing cancels, so there are no holes.
  2. Vertical asymptote: x - 2 = 0, so x = 2.
  3. Degrees are equal (1 and 1), so the horizontal asymptote is y = \frac{1}{1} = 1.
  4. x-intercept: x + 1 = 0, so (-1, 0).
  5. y-intercept: f(0) = \frac{1}{-2} = -\frac{1}{2}.
  6. Test points: f(3) = \frac{4}{1} = 4 and f(5) = \frac{6}{3} = 2.
  7. One more on the left: f(-4) = \frac{-3}{-6} = \frac{1}{2}.

Answer: A lower-left branch through (-4, \frac{1}{2}), (-1, 0) and (0, -\frac{1}{2}), and an upper-right branch through (3, 4) and (5, 2).

Example 3: A hole

Graph f(x) = \frac{x^2 - 4}{x - 2}.

  1. Factor the top (see factoring the difference of squares): \frac{(x - 2)(x + 2)}{x - 2}
  2. Cancel (x - 2) (see simplifying rational expressions): f(x) = x + 2, with x \ne 2
  3. Find the y-value of the hole with the simplified form: 2 + 2 = 4

Answer: The line y = x + 2 with an open circle (a hole) at (2, 4). There is no vertical asymptote, because the factor canceled.

Example 4: Two vertical asymptotes

Graph f(x) = \frac{6}{x^2 - 9}.

  1. Factor the bottom: (x - 3)(x + 3)
  2. Vertical asymptotes: x = 3 and x = -3.
  3. The top has degree 0 and the bottom degree 2, so the horizontal asymptote is y = 0.
  4. The top is never 0, so there is no x-intercept.
  5. y-intercept: f(0) = \frac{6}{-9} = -\frac{2}{3}.
  6. Test x = 4: \frac{6}{16 - 9} = \frac{6}{7}, above the axis. By symmetry, f(-4) = \frac{6}{7} too.

Answer: Three pieces: a middle arch below the x-axis through (0, -\frac{2}{3}), and two outer branches above the x-axis that level off toward y = 0.

Example 5: Word problem with average cost

A club pays $500 to set up a T-shirt order, plus $2 per shirt. The average cost per shirt for x shirts is C(x) = \frac{500 + 2x}{x}. Find the horizontal asymptote and the average cost for 100 and 1000 shirts.

  1. Degrees are equal (1 and 1). Leading coefficients are 2 and 1, so the horizontal asymptote is y = \frac{2}{1} = 2.
  2. C(100) = \frac{500 + 200}{100} = \frac{700}{100} = 7
  3. C(1000) = \frac{500 + 2000}{1000} = \frac{2500}{1000} = 2.5

Answer: The average cost approaches $2 per shirt as the order grows. It is $7 per shirt for 100 shirts and $2.50 for 1000. The vertical asymptote x = 0 makes sense too: with almost no shirts, the setup fee makes each one very expensive.

Common Mistakes

MistakeExample of the errorFix
Calling a hole an asymptote\frac{x^2 - 4}{x - 2} has an asymptote at x = 2The factor cancels, so x = 2 is a hole at (2, 4).
Wrong horizontal asymptote rule\frac{6}{x^2 - 9} has HA y = 6The top’s degree is smaller, so the HA is y = 0.
Using the original denominator for asymptotesListing x = 1 for \frac{x - 1}{x^2 - 1}Cancel first: \frac{1}{x + 1} has its asymptote at x = -1; x = 1 is a hole.
Connecting the branches across an asymptoteDrawing one curve through x = 2The graph breaks at a vertical asymptote. Draw each branch separately.
Thinking a graph can never cross a horizontal asymptoteBending the curve to avoid y = 0 in the middleA horizontal asymptote only describes the far ends. Check points.

Practice Problems

  1. Find the asymptotes of f(x) = \frac{5}{x + 4}.
  2. Find the asymptotes of f(x) = \frac{2}{x - 1} - 3.
  3. Find the asymptotes and intercepts of f(x) = \frac{2x - 6}{x + 3}.
  4. Find the hole in f(x) = \frac{x^2 - 9}{x + 3}.
  5. Find the hole and asymptotes of f(x) = \frac{x - 1}{x^2 - 1}.
  6. Find the horizontal asymptote of f(x) = \frac{4x^2 + 1}{2x^2 - 5}.
  7. Find the horizontal asymptote of f(x) = \frac{x^3 + 1}{x^2 + 4}.
  8. Find the asymptotes and intercepts of f(x) = \frac{x}{x^2 - 4}.
  9. For f(x) = \frac{x + 1}{x - 2}, find f(8) and f(-10).
  10. A printer costs $1200 to set up plus $5 per poster. The average cost is C(x) = \frac{1200 + 5x}{x}. Find the horizontal asymptote, C(200) and C(600).
Show answers
  1. Vertical: x + 4 = 0, so x = -4
    Horizontal: degree 0 is less than degree 1, so y = 0
  2. Shift of \frac{2}{x} right 1 and down 3
    Answer: vertical x = 1, horizontal y = -3
  3. Vertical: x = -3
    Horizontal: equal degrees, y = \frac{2}{1} = 2
    x-intercept: 2x - 6 = 0, so (3, 0)
    y-intercept: f(0) = \frac{-6}{3} = -2, so (0, -2)
  4. Factor: \frac{(x - 3)(x + 3)}{x + 3}
    Cancel: x - 3, with x \ne -3
    Hole y-value: -3 - 3 = -6
    Answer: hole at (-3, -6)
  5. Factor: \frac{x - 1}{(x - 1)(x + 1)}
    Cancel: \frac{1}{x + 1}, with x \ne 1
    Hole y-value: \frac{1}{1 + 1} = \frac{1}{2}, so a hole at (1, \frac{1}{2})
    Vertical asymptote x = -1; horizontal y = 0
  6. Equal degrees (2 and 2)
    Answer: y = \frac{4}{2} = 2
  7. Top degree 3 is bigger than bottom degree 2
    Answer: no horizontal asymptote
  8. Factor the bottom: (x - 2)(x + 2)
    Vertical asymptotes: x = 2 and x = -2
    Horizontal: degree 1 is less than 2, so y = 0
    Intercepts: f(0) = 0, so (0, 0) is both
  9. f(8) = \frac{9}{6} = \frac{3}{2}
    f(-10) = \frac{-9}{-12} = \frac{3}{4}
  10. Equal degrees: y = \frac{5}{1} = 5
    C(200) = \frac{1200 + 1000}{200} = \frac{2200}{200} = 11
    C(600) = \frac{1200 + 3000}{600} = \frac{4200}{600} = 7
    Answer: approaches $5; $11 and $7 per poster

FAQ

How do you find vertical asymptotes?

Factor and cancel any common factors. Then set the remaining denominator equal to zero. Each solution is a vertical asymptote.

How do you find the horizontal asymptote?

Compare degrees. If the top’s degree is smaller, it is y = 0. If the degrees are equal, divide the leading coefficients. If the top’s degree is bigger, there is none.

What is the difference between a hole and a vertical asymptote?

Both come from zeros of the denominator. If the factor cancels with the top, you get a hole. If it doesn’t cancel, you get a vertical asymptote.

Can a graph cross its horizontal asymptote?

Yes, in the middle of the graph it can. The horizontal asymptote only describes what happens as x goes far to the left or right.

Summary

  • Factor the top and bottom completely.
  • Canceled factors give holes; remaining zeros of the bottom give vertical asymptotes.
  • Zeros of the simplified top give x-intercepts; f(0) gives the y-intercept.
  • Compare degrees to find the horizontal asymptote.
  • Plot test points on each side of every vertical asymptote, then draw each branch.

Previous lesson: Solving Rational Equations

Next lesson: The Number e

Back to the Algebra 2 Index