Skip to content
Family Table Math
Auto

Graphs of Rational Functions

A rational function is one polynomial divided by another. This page focuses on the simplest interesting kind, a linear expression over a linear expression, like f(x)=2x+1x−1f(x) = \dfrac{2x + 1}{x - 1}. Once you can find its two asymptotes and its intercepts, you can sketch it in a minute. You’ll also see what happens when the top and bottom share a factor.

f(x)=ax+bcx+d,c≠0f(x) = \frac{ax + b}{cx + d}, \qquad c \ne 0

Its graph looks like a transformed y=1xy = \dfrac{1}{x}: two branches separated by a vertical asymptote, both levelling off toward a horizontal asymptote.

The function is undefined where the denominator is 00. If the numerator is not also 00 there, the graph has a vertical asymptote:

cx+d=0⇒x=−dccx + d = 0 \quad\Rightarrow\quad x = -\frac{d}{c}

Near the asymptote, the numerator is close to a fixed number and the denominator is tiny, so f(x)f(x) is huge, positive on one side and negative on the other. Test a value just to each side to see which.

For very large xx (positive or negative), the constants bb and dd hardly matter, so

f(x)=ax+bcx+d≈axcx=acf(x) = \frac{ax + b}{cx + d} \approx \frac{ax}{cx} = \frac{a}{c}

The horizontal asymptote is y=acy = \dfrac{a}{c}, the ratio of the leading coefficients. For example, f(1000)=2001999≈2.003f(1000) = \dfrac{2001}{999} \approx 2.003 for f(x)=2x+1x−1f(x) = \dfrac{2x + 1}{x - 1}, very close to 21=2\dfrac{2}{1} = 2.

  • xx-intercept: the fraction is 00 when the numerator is 00: ax+b=0ax + b = 0.
  • yy-intercept: f(0)=bdf(0) = \dfrac{b}{d} (if d≠0d \ne 0).
  • Domain: {x∈R∣x≠−dc}\left\{x \in \mathbb{R} \mid x \ne -\frac{d}{c}\right\}.
  • Range: {y∈R∣y≠ac}\left\{y \in \mathbb{R} \mid y \ne \frac{a}{c}\right\} (as long as the top and bottom have no common factor; otherwise the graph is a horizontal line with a hole).

On each branch, a graph of this type is either always increasing or always decreasing, and both branches do the same. Once you have the asymptotes and one or two points, the sketch shows you which.

If the numerator and denominator share a factor, cancel it, but remember the restriction. Where the cancelled factor is 00, the graph has a hole (a single missing point), not an asymptote. For example,

g(x)=x2−9x2+x−6=(x−3)(x+3)(x−2)(x+3)=x−3x−2,x≠−3g(x) = \frac{x^2 - 9}{x^2 + x - 6} = \frac{(x - 3)(x + 3)}{(x - 2)(x + 3)} = \frac{x - 3}{x - 2}, \quad x \ne -3

has a vertical asymptote x=2x = 2 but only a hole at x=−3x = -3 (Example 3).

If the numerator’s degree is one more than the denominator’s, use polynomial division to split off a linear part:

x2+2x−1x−1=x+3+2x−1\frac{x^2 + 2x - 1}{x - 1} = x + 3 + \frac{2}{x - 1}

For large xx, the fraction 2x−1\dfrac{2}{x - 1} is almost 00, so the graph gets closer and closer to the slanted line y=x+3y = x + 3. That line is an oblique asymptote. There’s no horizontal asymptote in this case.

  1. Factor and cancel any common factors (note the holes).
  2. Draw the vertical and horizontal asymptotes as dashed lines.
  3. Plot the intercepts.
  4. Test a point just to each side of the vertical asymptote, and draw each branch approaching the asymptotes.

Example 1: Sketching from the key features

Section titled “Example 1: Sketching from the key features”

Sketch f(x)=2x+1x−1f(x) = \dfrac{2x + 1}{x - 1}. State the domain, range, intercepts, positive and negative intervals, and intervals of increase or decrease.

Solution.

  • Vertical asymptote: x−1=0x - 1 = 0, so x=1x = 1. (The numerator is 3≠03 \ne 0 there.)
  • Horizontal asymptote: y=21=2y = \dfrac{2}{1} = 2.
  • xx-intercept: 2x+1=02x + 1 = 0, so x=−12x = -\dfrac{1}{2}.
  • yy-intercept: f(0)=1−1=−1f(0) = \dfrac{1}{-1} = -1.
  • Near x=1x = 1: f(1.1)=3.20.1=32f(1.1) = \dfrac{3.2}{0.1} = 32 and f(0.9)=2.8−0.1=−28f(0.9) = \dfrac{2.8}{-0.1} = -28. So the graph goes up on the right of the asymptote and down on the left.
Graph of y = (2x + 1)/(x - 1) with vertical asymptote x = 1, horizontal asymptote y = 2, x-intercept -0.5 and y-intercept -1 −4 −2 2 4 6 −4 −2 2 4 6 (−0.5, 0) (0, −1) x = 1 y = 2 y = (2x + 1)/(x − 1)
y=2x+1x−1y = \dfrac{2x + 1}{x - 1} has asymptotes x=1x = 1 and y=2y = 2.

Domain: {x∈R∣x≠1}\{x \in \mathbb{R} \mid x \ne 1\}. Range: {y∈R∣y≠2}\{y \in \mathbb{R} \mid y \ne 2\}.

The sign changes only at the xx-intercept and the asymptote. From the graph (or test points), f(x)>0f(x) \gt 0 for x<−12x \lt -\frac{1}{2} or x>1x \gt 1, and f(x)<0f(x) \lt 0 for −12<x<1-\frac{1}{2} \lt x \lt 1.

The graph is decreasing on both branches: for x<1x \lt 1 and for x>1x \gt 1.

Find the key features of h(x)=x−42x+6h(x) = \dfrac{x - 4}{2x + 6} and describe its graph.

Solution.

  • Vertical asymptote: 2x+6=02x + 6 = 0, so x=−3x = -3.
  • Horizontal asymptote: y=12y = \dfrac{1}{2}.
  • xx-intercept: x=4x = 4. yy-intercept: h(0)=−46=−23h(0) = \dfrac{-4}{6} = -\dfrac{2}{3}.
  • Near the asymptote: h(−2.9)=−6.90.2=−34.5h(-2.9) = \dfrac{-6.9}{0.2} = -34.5, and h(−3.1)=−7.1−0.2=35.5h(-3.1) = \dfrac{-7.1}{-0.2} = 35.5.

For very large xx, h(100)=96206≈0.47h(100) = \dfrac{96}{206} \approx 0.47 and h(−100)=−104−194≈0.54h(-100) = \dfrac{-104}{-194} \approx 0.54.

Putting this together: the left branch starts just above y=12y = \frac{1}{2} on the far left and rises toward the top beside x=−3x = -3. The right branch starts very low beside x=−3x = -3, rises through (0,−23)\left(0, -\frac{2}{3}\right) and (4,0)(4, 0), and levels off just below y=12y = \frac{1}{2}.

Domain: {x∈R∣x≠−3}\{x \in \mathbb{R} \mid x \ne -3\}. Range: {y∈R∣y≠12}\left\{y \in \mathbb{R} \mid y \ne \frac{1}{2}\right\}. The graph is increasing on both branches. It is positive for x<−3x \lt -3 or x>4x \gt 4 and negative for −3<x<4-3 \lt x \lt 4.

Sketch g(x)=x2−9x2+x−6g(x) = \dfrac{x^2 - 9}{x^2 + x - 6}.

Solution. Factor and cancel:

g(x)=(x−3)(x+3)(x−2)(x+3)=x−3x−2,x≠−3, 2g(x) = \frac{(x - 3)(x + 3)}{(x - 2)(x + 3)} = \frac{x - 3}{x - 2}, \qquad x \ne -3,\ 2
  • The factor x+3x + 3 cancelled, so there’s a hole at x=−3x = -3. Its height comes from the simplified form: −3−3−3−2=65=1.2\dfrac{-3 - 3}{-3 - 2} = \dfrac{6}{5} = 1.2. The hole is at (−3,1.2)(-3, 1.2).
  • Vertical asymptote: x=2x = 2. Horizontal asymptote: y=11=1y = \dfrac{1}{1} = 1.
  • xx-intercept: x=3x = 3. yy-intercept: g(0)=−3−2=1.5g(0) = \dfrac{-3}{-2} = 1.5.
Graph of y = (x squared - 9)/(x squared + x - 6), which is y = (x - 3)/(x - 2) with a hole at (-3, 1.2). Vertical asymptote x = 2, horizontal asymptote y = 1 −4 −2 2 4 −2 2 4 hole (−3, 1.2) (3, 0) (0, 1.5) x = 2 y = 1
The cancelled factor leaves a hole at (−3,1.2)(-3, 1.2); the remaining factor gives the asymptote x=2x = 2.

Domain: {x∈R∣x≠−3,2}\{x \in \mathbb{R} \mid x \ne -3, 2\}. Range: {y∈R∣y≠1, y≠1.2}\{y \in \mathbb{R} \mid y \ne 1,\ y \ne 1.2\}. (The graph reaches the height 1.21.2 only at x=−3x = -3, where the hole is.)

Example 4: Writing an equation from features

Section titled “Example 4: Writing an equation from features”

Find an equation of the form f(x)=ax+bcx+df(x) = \dfrac{ax + b}{cx + d} with vertical asymptote x=3x = 3, horizontal asymptote y=−2y = -2, and xx-intercept 11.

Solution. The xx-intercept 11 means the numerator has the factor (x−1)(x - 1). The asymptote x=3x = 3 means the denominator has the factor (x−3)(x - 3). So try

f(x)=k(x−1)x−3f(x) = \frac{k(x - 1)}{x - 3}

The horizontal asymptote is the ratio of leading coefficients, k1\dfrac{k}{1}, so k=−2k = -2:

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

Check: numerator 00 at x=1x = 1 ✓; denominator 00 at x=3x = 3 (numerator −4≠0-4 \ne 0) ✓; leading coefficients give −21=−2\frac{-2}{1} = -2 ✓.

Setting the numerator to zero to find the vertical asymptote. The numerator gives the xx-intercept. The denominator gives the vertical asymptote.

Using the constants for the horizontal asymptote. For x−42x+6\dfrac{x - 4}{2x + 6}, the asymptote is y=12y = \frac{1}{2} (leading coefficients), not y=−46y = \frac{-4}{6}. That second number is the yy-intercept.

Drawing an asymptote where a factor cancels. If a factor cancels, it leaves a hole. Factor first, every time.

Forgetting the hole in the domain and range. The hole’s xx-value is still excluded from the domain, and its yy-value is missing from the range (unless the graph reaches that height somewhere else).

Guessing which way each branch goes. Don’t rely on memory: test one value just left and one just right of the vertical asymptote.

Thinking a graph can never cross its horizontal asymptote. For the functions on this page it doesn’t, but for other rational functions it can, especially for small xx. A horizontal asymptote describes the far-left and far-right behaviour only.

1. (Warm-up) State the asymptotes, domain, and range of y=3x−2x+4y = \dfrac{3x - 2}{x + 4}.

Solution

Vertical asymptote x=−4x = -4; horizontal asymptote y=31=3y = \frac{3}{1} = 3.

Domain: {x∈R∣x≠−4}\{x \in \mathbb{R} \mid x \ne -4\}. Range: {y∈R∣y≠3}\{y \in \mathbb{R} \mid y \ne 3\}.

2. (Warm-up) Find the intercepts of y=2x−6x+3y = \dfrac{2x - 6}{x + 3}.

Solution

xx-intercept: 2x−6=02x - 6 = 0, so x=3x = 3.

yy-intercept: −63=−2\dfrac{-6}{3} = -2.

3. (Core) For f(x)=x+2x−3f(x) = \dfrac{x + 2}{x - 3}, find the asymptotes, intercepts, positive and negative intervals, and intervals of increase or decrease. Sketch the graph.

Solution
  • Vertical asymptote x=3x = 3; horizontal asymptote y=1y = 1.
  • xx-intercept −2-2; yy-intercept −23-\frac{2}{3}.
  • f(3.1)=5.10.1=51f(3.1) = \frac{5.1}{0.1} = 51 and f(2.9)=4.9−0.1=−49f(2.9) = \frac{4.9}{-0.1} = -49: up on the right of x=3x = 3, down on the left.

Positive for x<−2x \lt -2 or x>3x \gt 3; negative for −2<x<3-2 \lt x \lt 3.

The left branch comes in just below y=1y = 1, passes through (−2,0)(-2, 0) and (0,−23)\left(0, -\frac{2}{3}\right), and drops beside x=3x = 3. The right branch comes down from the top and levels off above y=1y = 1. It’s decreasing on both branches.

4. (Core) Sketch y=−x+52x+4y = \dfrac{-x + 5}{2x + 4}, and state where it is increasing or decreasing.

Solution
  • Vertical asymptote: 2x+4=02x + 4 = 0, so x=−2x = -2.
  • Horizontal asymptote: y=−12=−12y = \frac{-1}{2} = -\frac{1}{2}.
  • xx-intercept 55; yy-intercept 54\frac{5}{4}.
  • Test: at x=−1.9x = -1.9, y=6.90.2=34.5y = \frac{6.9}{0.2} = 34.5; at x=−2.1x = -2.1, y=7.1−0.2=−35.5y = \frac{7.1}{-0.2} = -35.5.
  • Far right: at x=100x = 100, y=−95204≈−0.47y = \frac{-95}{204} \approx -0.47, just above −12-\frac{1}{2}. Far left: at x=−100x = -100, y=105−196≈−0.54y = \frac{105}{-196} \approx -0.54, just below −12-\frac{1}{2}.

The right branch comes down from the top beside x=−2x = -2, passes through (0,54)\left(0, \frac{5}{4}\right) and (5,0)(5, 0), and levels off just above y=−12y = -\frac{1}{2}. The left branch starts just below y=−12y = -\frac{1}{2} on the far left and drops toward the bottom beside x=−2x = -2.

So the graph is decreasing on both branches: for x<−2x \lt -2 and for x>−2x \gt -2.

5. (Core) Find any holes and asymptotes of y=x2−1x2+4x+3y = \dfrac{x^2 - 1}{x^2 + 4x + 3}, and state the domain.

Solutionx2−1x2+4x+3=(x−1)(x+1)(x+1)(x+3)=x−1x+3,x≠−1, −3\frac{x^2 - 1}{x^2 + 4x + 3} = \frac{(x - 1)(x + 1)}{(x + 1)(x + 3)} = \frac{x - 1}{x + 3}, \qquad x \ne -1,\ -3

Hole at x=−1x = -1: −1−1−1+3=−1\frac{-1 - 1}{-1 + 3} = -1, so the hole is at (−1,−1)(-1, -1).

Vertical asymptote x=−3x = -3; horizontal asymptote y=1y = 1.

Domain: {x∈R∣x≠−3,−1}\{x \in \mathbb{R} \mid x \ne -3, -1\}.

6. (Core) Let f(x)=3xx+2f(x) = \dfrac{3x}{x + 2}. Find f(−2.1)f(-2.1), f(−2.01)f(-2.01), f(−1.99)f(-1.99), f(−1.9)f(-1.9), and f(1000)f(1000). What do these values tell you about the graph?

Solutionf(−2.1)=−6.3−0.1=63,f(−2.01)=−6.03−0.01=603f(-2.1) = \frac{-6.3}{-0.1} = 63, \quad f(-2.01) = \frac{-6.03}{-0.01} = 603f(−1.99)=−5.970.01=−597,f(−1.9)=−5.70.1=−57f(-1.99) = \frac{-5.97}{0.01} = -597, \quad f(-1.9) = \frac{-5.7}{0.1} = -57f(1000)=30001002≈2.994f(1000) = \frac{3000}{1002} \approx 2.994

As xx approaches −2-2 from the left, f(x)f(x) grows without bound; from the right, it drops without bound. So x=−2x = -2 is a vertical asymptote, with the left branch going up and the right branch going down. For large xx, f(x)f(x) is close to 33, which is the horizontal asymptote y=31y = \frac{3}{1}.

7. (Core) Write an equation of a function of the form y=ax+bcx+dy = \dfrac{ax + b}{cx + d} with vertical asymptote x=−1x = -1 and horizontal asymptote y=3y = 3, whose graph passes through the origin.

Solution

Through the origin means an xx-intercept at 00, so the numerator is kxkx. The asymptote x=−1x = -1 gives the denominator x+1x + 1. The horizontal asymptote k1=3\frac{k}{1} = 3 gives k=3k = 3:

y=3xx+1y = \frac{3x}{x + 1}

Check: at x=0x = 0, y=0y = 0 ✓; denominator 00 at x=−1x = -1 ✓; ratio of leading coefficients 33 ✓.

8. (Challenge) Use long division to write f(x)=2x2−x+3x+1f(x) = \dfrac{2x^2 - x + 3}{x + 1} as a linear function plus a fraction. What happens to the graph of ff for very large positive and negative xx?

Solution

Divide 2x2−x+32x^2 - x + 3 by x+1x + 1: the quotient is 2x−32x - 3 and the remainder is 66. Check: (x+1)(2x−3)+6=2x2−x−3+6=2x2−x+3(x + 1)(2x - 3) + 6 = 2x^2 - x - 3 + 6 = 2x^2 - x + 3 ✓.

f(x)=2x−3+6x+1f(x) = 2x - 3 + \frac{6}{x + 1}

For very large ∣x∣|x|, 6x+1\dfrac{6}{x + 1} is close to 00, so the graph gets closer and closer to the line y=2x−3y = 2x - 3, an oblique asymptote. (For large positive xx the fraction is positive, so the graph is just above the line; for large negative xx it is just below.) There’s also a vertical asymptote at x=−1x = -1.

9. (Challenge) For which value of kk does f(x)=2x+kx−3f(x) = \dfrac{2x + k}{x - 3} have a hole instead of a vertical asymptote? Describe the graph for that value of kk.

Solution

A hole needs the numerator to be 00 at x=3x = 3 too: 2(3)+k=02(3) + k = 0, so k=−6k = -6.

Then

f(x)=2x−6x−3=2(x−3)x−3=2,x≠3f(x) = \frac{2x - 6}{x - 3} = \frac{2(x - 3)}{x - 3} = 2, \qquad x \ne 3

The graph is the horizontal line y=2y = 2 with a hole at (3,2)(3, 2).