Math Core

Lesson 6.2 · Rational Functions

Graphing rational functions

A rational function is a fraction whose numerator and denominator are both polynomials, like f(x)=2x−4x+1f(x) = \dfrac{2x - 4}{x + 1}. Its graph can break apart, shoot off toward infinity, and level off near a line it never quite reaches. Once you know where to look for these features, you can sketch any rational function quickly.

Definition

Rational function

A rational function has the form f(x)=p(x)q(x)f(x) = \dfrac{p(x)}{q(x)}, where pp and qq are polynomials and qq is not the zero polynomial. Its domain is every real number except the zeros of q(x)q(x).

Transformations of y=1xy = \dfrac{1}{x}

The simplest rational function is the parent function y=1xy = \dfrac{1}{x}, the inverse variation graph from the last lesson. It has a vertical asymptote at x=0x = 0 and a horizontal asymptote at y=0y = 0.

The transformations you know from other parent functions work here too. In

y=ax−h+k,y = \frac{a}{x - h} + k,

the graph of y=1xy = \dfrac{1}{x} is stretched by aa (and reflected if a<0a < 0), shifted right hh units and up kk units. The asymptotes move with it: the vertical asymptote becomes x=hx = h and the horizontal asymptote becomes y=ky = k.

Worked example: A shifted hyperbola

Graph y=2x−3+1y = \dfrac{2}{x - 3} + 1.

Here a=2a = 2, h=3h = 3 and k=1k = 1. Draw the asymptotes first: x=3x = 3 and y=1y = 1. Then plot a couple of points on each side of x=3x = 3:

xx1245
yy0−1-132

Since a>0a > 0, the branches sit in the upper right and lower left of the new "center" (3,1)(3, 1).

y = 2/(x − 3) + 1 with asymptotes x = 3 and y = 1 (dashed).Open in grapher →

Features of a general rational function

Most rational functions aren't written in shifted form. To graph f(x)=p(x)q(x)f(x) = \dfrac{p(x)}{q(x)}, factor both polynomials and then find these features.

Holes. If a factor (x−c)(x - c) appears in both the numerator and the denominator, it cancels. The graph looks just like the simplified function but with a single missing point (a hole) at x=cx = c. To find the yy-coordinate of the hole, plug cc into the simplified function.

Vertical asymptotes. After canceling, any remaining zero of the denominator gives a vertical asymptote. Near it, the function values grow without bound in the positive or negative direction.

xx-intercepts. After canceling, the zeros of the numerator are the xx-intercepts.

yy-intercept. Evaluate f(0)f(0), if 00 is in the domain.

Horizontal asymptote. This describes what happens as xx gets very large or very negative. It depends only on the leading terms, so compare the degree of the numerator (nn) with the degree of the denominator (dd).

Horizontal asymptote rules

For f(x)=axn+⋯bxd+⋯f(x) = \dfrac{a x^n + \cdots}{b x^d + \cdots}:

degreeshorizontal asymptote
n<dn < dy=0y = 0
n=dn = dy=aby = \dfrac{a}{b}, the ratio of leading coefficients
n>dn > dnone

Why? For huge xx, the leading terms swamp everything else. If n=dn = d, the fraction behaves like axnbxn=ab\dfrac{a x^n}{b x^n} = \dfrac{a}{b}. If n<dn < d, the denominator grows faster and the fraction shrinks toward 00. If n>dn > d, the numerator wins and the function keeps growing. (When n=d+1n = d + 1, polynomial division shows the graph approaches a slanted line, called a slant asymptote.)

Worked example: Finding every feature

Graph f(x)=2x−4x+1f(x) = \dfrac{2x - 4}{x + 1}.

  • Nothing cancels, since 2x−4=2(x−2)2x - 4 = 2(x - 2) shares no factor with x+1x + 1.
  • Vertical asymptote: x+1=0x + 1 = 0, so x=−1x = -1.
  • xx-intercept: 2x−4=02x - 4 = 0, so x=2x = 2.
  • yy-intercept: f(0)=−41=−4f(0) = \dfrac{-4}{1} = -4.
  • Horizontal asymptote: both degrees are 11, so y=21=2y = \dfrac{2}{1} = 2.
f(x) = (2x − 4)/(x + 1), with asymptotes x = −1 and y = 2 and intercepts (2, 0) and (0, −4).Open in grapher →

Worked example: A hole and an asymptote

Find the holes, asymptotes and intercepts of g(x)=x2−1x2−x−2g(x) = \dfrac{x^2 - 1}{x^2 - x - 2}.

Factor:

g(x)=(x−1)(x+1)(x−2)(x+1).g(x) = \frac{(x - 1)(x + 1)}{(x - 2)(x + 1)}.

The factor (x+1)(x + 1) cancels, so there is a hole at x=−1x = -1. The simplified function is x−1x−2\dfrac{x - 1}{x - 2}, and −1−1−1−2=23\dfrac{-1 - 1}{-1 - 2} = \dfrac{2}{3}, so the hole is at (−1,23)\left(-1, \dfrac{2}{3}\right).

  • Vertical asymptote: x=2x = 2 (the remaining zero of the denominator).
  • xx-intercept: x=1x = 1.
  • yy-intercept: g(0)=−1−2=12g(0) = \dfrac{-1}{-2} = \dfrac{1}{2}.
  • Horizontal asymptote: degrees are equal (both 22) with leading coefficients 11 and 11, so y=1y = 1.
g(x) = (x² − 1)/(x² − x − 2). The curve has a hole at (−1, 2/3), where x = −1 is not in the domain.Open in grapher →

Common mistake

Don't find vertical asymptotes from the unfactored denominator. In g(x)g(x) above, x=−1x = -1 makes the denominator zero, but it is a hole, not an asymptote, because the factor cancels. Always factor and cancel first, then read off the asymptotes.

Worked example: Comparing degrees

Find the horizontal asymptote, if any.

  1. h(x)=3xx2+1h(x) = \dfrac{3x}{x^2 + 1}: degree 11 over degree 22, so y=0y = 0.
  2. k(x)=6x2−52x2+xk(x) = \dfrac{6x^2 - 5}{2x^2 + x}: equal degrees, so y=62=3y = \dfrac{6}{2} = 3.
  3. m(x)=x2+1x−1m(x) = \dfrac{x^2 + 1}{x - 1}: degree 22 over degree 11, so there is no horizontal asymptote. (Dividing gives x+1+2x−1x + 1 + \dfrac{2}{x - 1}, so the graph follows the slant line y=x+1y = x + 1.)

Tip

A graph can cross its horizontal asymptote in the middle; the asymptote only describes the far left and far right. For instance, h(x)=3xx2+1h(x) = \dfrac{3x}{x^2 + 1} passes through (0,0)(0, 0), right on its asymptote y=0y = 0. A graph can never cross a vertical asymptote, because the function is undefined there.

Practice

Practice 1

For f(x)=3x−2+1f(x) = \dfrac{3}{x - 2} + 1, the vertical asymptote is x=cx = c. What is cc?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

For f(x)=3x−2+1f(x) = \dfrac{3}{x - 2} + 1, the horizontal asymptote is y=cy = c. What is cc?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

The graph of f(x)=2x+1x−3f(x) = \dfrac{2x + 1}{x - 3} has horizontal asymptote y=cy = c. What is cc?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

What is the xx-intercept of f(x)=x−4x+2f(x) = \dfrac{x - 4}{x + 2}? Give the xx-value.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Find all vertical asymptotes of f(x)=x+1x2−x−6f(x) = \dfrac{x + 1}{x^2 - x - 6}. Enter the xx-values.

Separate answers with commas, e.g. 2, -5

Practice 6

What is the horizontal asymptote of f(x)=4x2−12x2+x−3f(x) = \dfrac{4x^2 - 1}{2x^2 + x - 3}?

Practice 7

The graph of f(x)=x2−9x−3f(x) = \dfrac{x^2 - 9}{x - 3} is a line with one hole. Give the coordinates of the hole as an ordered pair.

Enter a point like (2, -3)

Practice 8

Which statement about f(x)=x−1x2−1f(x) = \dfrac{x - 1}{x^2 - 1} is true?