Algebra 2Rational Functions1 of 4
Rational Functions · 1

Graphing Rational Functions

We want to graph rational functions (fractions with polynomials on top and bottom) and see how dividing by expressions with xx can create branches, asymptotes, and missing points.

1

Why rational functions have vertical asymptotes

When the bottom of a fraction equals zero and the top does not, the graph shoots straight up or down along a vertical line called a vertical asymptote. Let's look at why this happens on

y\displaystyle y =1x−2\displaystyle = \frac{1}{\step{x - 2}}
Why rational functions have vertical asymptotes
xx
yy
y=1x−2y = \dfrac{1}{\htmlClass{lc-pink}{x - 2}}
x=2x = 2

At x=2\asym{x = 2}, the denominator is 2−2=0\step{2 - 2} = \step{0}, so the fraction 10\frac{1}{\step{0}} is undefined and the graph has a vertical asymptote at x=2\asym{x = 2}. Stepping right next to x=2\asym{x = 2} on either side divides 11 by a tiny positive or negative number:

Right of 2 (x=2.000001):y=12.000001−2=10.000001=1,000,000Left of 2 (x=1.999):y=11.999−2=1−0.001=−1,000\displaystyle \begin{aligned} &\text{Right of } 2 \ (x = 2.000001): \\ y &= \frac{1}{\step{2.000001 - 2}} = \frac{1}{\step{0.000001}} \\ &= \curve{1{,}000{,}000} \\[6pt] &\text{Left of } 2 \ (x = 1.999): \\ y &= \frac{1}{\step{1.999 - 2}} = \frac{1}{\step{-0.001}} \\ &= \curve{-1{,}000} \end{aligned}

As xx gets close to 22 on y=1x−2y = \frac{1}{\step{x - 2}}, the denominator x−2\step{x - 2} shrinks toward zero so the height y\curve{y} gets huge, and stepping across x=2\asym{x = 2} flips the sign of x−2\step{x - 2} and sends the curve to the opposite infinity.

Watch how shrinking the denominator toward zero makes the graph shoot up, and stepping across zero flips it to shoot down instead.
2

Graphing in shifted form

The curve y=1x−2y = \frac{1}{x - \asym{2}} is a shifted version of the parent function y=1xy = \frac{1}{x}. When a rational function is written in shifted form with a≠0\step{a} \neq 0,

y\displaystyle y =ax−h+k\displaystyle = \frac{\step{a}}{x - \asym{h}} + \asym{k}

we can graph it and find its domain and range directly from the shifts and vertical stretch, as in

y\displaystyle y =3x−2+4\displaystyle = \frac{\step{3}}{x - \asym{2}} + \asym{4}
Graphing in shifted form
xx
yy
y=1xy = \dfrac{1}{x}
xx
yy
y=3x−2+4y = \dfrac{\htmlClass{lc-pink}{3}}{x - \htmlClass{lc-violet}{2}} + \htmlClass{lc-violet}{4}
Text solution
Set the denominator to zero for the vertical asymptoteThe denominator x−2\asym{x - 2} equals zero at x=2\asym{x = 2}, which shifts the vertical asymptote from x=0x = 0 to x=2\asym{x = 2}.
x−2\displaystyle \asym{x - 2} =0  ⟹  x=2\displaystyle = 0 \implies \asym{x = 2}
Let xx get huge for the horizontal asymptoteWhen xx is huge, the fraction 3x−2\frac{\step{3}}{x - 2} shrinks to 00, lifting the horizontal asymptote from y=0y = 0 to y=4\asym{y = 4}.
y≈0+4\displaystyle y \approx 0 + \asym{4} =4  ⟹  y=4\displaystyle = \asym{4} \implies \asym{y = 4}
Step 1\step{1} unit right and left from (2,4)\asym{(2, 4)} and stretch vertically by a=3\step{a = 3}Starting where the asymptotes meet at (2,4)\asym{(2, 4)}, step 1\step{1} unit right and 3\step{3} units up, and 1\step{1} unit left and 3\step{3} units down, to get a point on each branch.
Right 1, up 3:(2+1, 4+3)=(3,7)Left 1, down 3:(2−1, 4−3)=(1,1)\displaystyle \begin{aligned} &\text{Right } \step{1}, \text{ up } \step{3}: \\ &\quad (\asym{2} \step{+ 1},\, \asym{4} \step{+ 3}) = \curve{(3, 7)} \\[6pt] &\text{Left } \step{1}, \text{ down } \step{3}: \\ &\quad (\asym{2} \step{- 1},\, \asym{4} \step{- 3}) = \curve{(1, 1)} \end{aligned}
Leave the asymptotes out of the domain and rangeMoving left to right uses every xx except the vertical asymptote at x=2\asym{x = 2}, and moving bottom to top reaches every height yy except the horizontal asymptote at y=4\asym{y = 4}.
Domain: x≠2, or (−∞,2)∪(2,∞)Range: y≠4, or (−∞,4)∪(4,∞)\displaystyle \begin{aligned} \text{Domain: } &\domain{x \neq 2}, \text{ or } \\ &\domain{(-\infty, 2) \cup (2, \infty)} \\[4pt] \text{Range: } &\range{y \neq 4}, \text{ or } \\ &\range{(-\infty, 4) \cup (4, \infty)} \end{aligned}
xx
yy
(0,0)\htmlClass{lc-mute}{(0, 0)}
(1,1)\htmlClass{lc-mute}{(1, 1)}
(−1,−1)\htmlClass{lc-mute}{(-1, -1)}
y=1xy = \dfrac{1}{x}
xx
yy
x=2\htmlClass{lc-violet}{x = 2}
y=4\htmlClass{lc-violet}{y = 4}
(2,4)\htmlClass{lc-violet}{(2, 4)}
1\htmlClass{lc-pink}{1}
3\htmlClass{lc-pink}{3}
(3,7)\htmlClass{lc-blue}{(3, 7)}
1\htmlClass{lc-pink}{1}
3\htmlClass{lc-pink}{3}
(1,1)\htmlClass{lc-blue}{(1, 1)}
y=3x−2+4y = \dfrac{\htmlClass{lc-pink}{3}}{x - \htmlClass{lc-violet}{2}} + \htmlClass{lc-violet}{4}
xx
yy
(0,0)\htmlClass{lc-mute}{(0, 0)}
(1,1)\htmlClass{lc-mute}{(1, 1)}
(−1,−1)\htmlClass{lc-mute}{(-1, -1)}
y=1xy = \dfrac{1}{x}
xx
yy
x=2\htmlClass{lc-violet}{x = 2}
y=4\htmlClass{lc-violet}{y = 4}
(2,4)\htmlClass{lc-violet}{(2, 4)}
1\htmlClass{lc-pink}{1}
3\htmlClass{lc-pink}{3}
(3,7)\htmlClass{lc-blue}{(3, 7)}
1\htmlClass{lc-pink}{1}
3\htmlClass{lc-pink}{3}
(1,1)\htmlClass{lc-blue}{(1, 1)}
y=3x−2+4y = \dfrac{\htmlClass{lc-pink}{3}}{x - \htmlClass{lc-violet}{2}} + \htmlClass{lc-violet}{4}

In the family y=3x−h+ky = \frac{\step{3}}{x - \asym{h}} + \asym{k}, the vertical asymptote x=h\asym{x = h} and horizontal asymptote y=k\asym{y = k} act like a shifted set of axes centered at (h,k)\asym{(h, k)} that carry both branches with them, and h\asym{h} and k\asym{k} are the exact values left out of the domain and range.

Moving the asymptotes carries both branches along like a shifted set of axes and sets the exact x-value and y-value left out of the domain and range.
3

Factoring to find asymptotes, intercepts, and holes

When a rational function is written with polynomials on top and bottom instead of shifted form, we can't read its features straight off the equation. We want to find the vertical asymptote, xx-intercept, and any missing point on the graph of

y\displaystyle y =x2−x−6x2−4\displaystyle = \frac{x^2 - x - 6}{x^2 - 4}
Factoring to find asymptotes, intercepts, and holes
x2−x−6\displaystyle x^2 - x - 6 =(  ?  )(  ?  )\displaystyle = (\;?\;)(\;?\;)
x2−x−6x2−4\displaystyle \hphantom{x^2 - x - 6}\mathllap{x^2 - 4} =(  ?  )(  ?  )\displaystyle = (\;?\;)(\;?\;)
Text solution
Factor the numerator and denominatorFactoring shows which xx-values make the top or the bottom equal zero.
y\displaystyle y =x2−x−6x2−4\displaystyle = \frac{x^2 - x - 6}{x^2 - 4} =(x−3)(x+2)(x−2)(x+2)\displaystyle = \frac{(\curve{x - 3})(\shared{x + 2})}{(\asym{x - 2})(\shared{x + 2})}
Cancel matching factors to find the holeBecause x+2\shared{x + 2} is on both top and bottom, it cancels to 11 for every xx except x=−2\domain{x = -2} (where the original fraction is 00\frac{0}{0}), leaving a hole at x=−2\domain{x = -2} on the simplified curve.
y=x−3x−2(x≠−2)Hole at x=−2:y=−2−3−2−2=−5−4=1.25  ⟹  (−2,1.25)\displaystyle \begin{aligned} y &= \frac{\curve{x - 3}}{\asym{x - 2}} \quad (\domain{x \neq -2}) \\[6pt] &\text{Hole at } \domain{x = -2}: \\ y &= \frac{-2 - 3}{-2 - 2} = \frac{-5}{-4} \\ &= 1.25 \implies \curve{(-2, 1.25)} \end{aligned}
Set the remaining numerator factor to zero for the xx-interceptWhen the leftover top factor is zero, the whole fraction equals zero.
x−3\displaystyle \curve{x - 3} =0  ⟹  x\displaystyle = 0 \implies x =3  ⟹  (3,0)\displaystyle = 3 \implies \curve{(3, 0)}
Set the remaining denominator factor to zero for the vertical asymptoteWhen the leftover bottom factor is zero, the top is not zero, so the fraction grows huge.
x−2\displaystyle \asym{x - 2} =0  ⟹  x=2\displaystyle = 0 \implies \asym{x = 2}

Near x=−2\domain{x = -2}, the matching x+2\shared{x + 2} factors in y=(x−3)(x+2)(x−2)(x+2)y = \frac{(\curve{x - 3})(\shared{x + 2})}{(\asym{x - 2})(\shared{x + 2})} shrink at the same rate and cancel to 11, so the curve follows y=x−3x−2y = \frac{\curve{x - 3}}{\asym{x - 2}} smoothly with a single open circle at (−2,1.25)\curve{(-2, 1.25)} where 00\frac{0}{0} happens.

Matching factors on top and bottom shrink together and cancel out everywhere except the one spot where both hit zero, which leaves a single hole in the graph.
4

Zooming out for horizontal and slant asymptotes

Factoring tells us what happens in the middle of the graph where factors equal zero, but a polynomial fraction has no +k+ \asym{k} on the end to show where the far ends flatten out. We want to find the horizontal or slant asymptote when xx gets huge (like x=±1,000,000x = \pm 1{,}000{,}000) for

y\displaystyle y =3x2+5x−2x2−4,y\displaystyle = \frac{3x^2 + 5x - 2}{x^2 - 4}, \qquad y =5x+1x2−4,y\displaystyle = \frac{5x + 1}{x^2 - 4}, \qquad y =x2+2xx−1\displaystyle = \frac{x^2 + 2x}{x - 1}
Zooming out for horizontal and slant asymptotes
xx
yy
x=2\htmlClass{lc-violet}{x = 2}
x=−1,000,000  ⟵x = -1{,}000{,}000\;\longleftarrow
⟶  x=1,000,000\longrightarrow\; x = 1{,}000{,}000
Text solution
Same highest power on top and bottomIn y=3x2+5x−2x2−4y = \frac{\lead{3x^2} + 5x - 2}{\lead{x^2} - 4}, the lower-power terms barely matter at huge xx and the x2\lead{x^2} factors cancel, leaving a horizontal asymptote at the ratio of the leading terms.
y≈3x2x2\displaystyle y \approx \frac{\lead{3x^2}}{\lead{x^2}} =3  ⟹  Horizontal asymptote: y=3\displaystyle = \asym{3} \implies \text{Horizontal asymptote: } \asym{y = 3}
Bigger power on the bottomIn y=5x+1x2−4y = \frac{\lead{5x} + 1}{\lead{x^2} - 4}, the denominator grows much faster than the numerator at huge xx and pulls the fraction down to zero.
y≈5xx2\displaystyle y \approx \frac{\lead{5x}}{\lead{x^2}} =5x≈0  ⟹  Horizontal asymptote: y=0\displaystyle = \frac{5}{x} \approx \asym{0} \implies \text{Horizontal asymptote: } \asym{y = 0}
Top degree exactly one higherIn y=x2+2xx−1y = \frac{\lead{x^2} + 2x}{\lead{x} - 1}, the leading terms give y≈x2x=xy \approx \frac{\lead{x^2}}{\lead{x}} = x, so the ends climb along a diagonal line; dividing x2+2xx^2 + 2x by x−1x - 1 writes the function as a line plus a remainder fraction that shrinks to zero at huge xx.
y\displaystyle y =x2+2xx−1\displaystyle = \frac{x^2 + 2x}{x - 1} =x+3+3x−1  ⟹  Slant asymptote: y=x+3\displaystyle = \asym{x + 3} + \gap{\frac{3}{x - 1}} \implies \text{Slant asymptote: } \asym{y = x + 3}

As we zoom out on y=3x2+5x−2x2−4y = \frac{\lead{3x^2} + 5x - 2}{\lead{x^2} - 4} to x=±1,000,000x = \pm 1{,}000{,}000, the smaller terms +5x−2+ 5x - 2 and −4- 4 barely matter next to 3x2\lead{3x^2} and x2\lead{x^2}, and the far ends of the curve flatten onto the horizontal line y=3\asym{y = 3}.

As you zoom way out, the smaller terms stop mattering and the leading terms flatten the ends of the graph onto a horizontal line.
5

Graphing a rational function from start to finish

Now we can combine factoring with end behavior to sketch the complete graph and find the domain and range of

y\displaystyle y =2x2−4x−6x2−4x+3\displaystyle = \frac{2x^2 - 4x - 6}{x^2 - 4x + 3}
Graphing a rational function from start to finish
xx
yy
y=2x2−4x−6x2−4x+3y = \dfrac{2x^2 - 4x - 6}{x^2 - 4x + 3}
Domain=  ?Range=  ?\text{Domain} = \;?\qquad \text{Range} = \;?
Text solution
Factor and cancel to find the holePulling out 22 on top and factoring both polynomials gives a matching x−3\shared{x - 3} factor, which cancels to give the simplified equation and a hole at x=3\domain{x = 3}.
y=2(x−3)(x+1)(x−3)(x−1)=2(x+1)x−1(x≠3)Hole at x=3:y=2(3+1)3−1=82=4  ⟹  (3,4)\displaystyle \begin{aligned} y &= \frac{2(\shared{x - 3})(\curve{x + 1})}{(\shared{x - 3})(\asym{x - 1})} \\ &= \frac{2(\curve{x + 1})}{\asym{x - 1}} \quad (\domain{x \neq 3}) \\[6pt] &\text{Hole at } \domain{x = 3}: \\ y &= \frac{2(3 + 1)}{3 - 1} = \frac{8}{2} \\ &= 4 \implies \curve{(3, 4)} \end{aligned}
Use the simplified equation for the intercepts and vertical asymptoteSetting the top to zero gives the xx-intercept, setting the bottom to zero gives the vertical asymptote, and plugging in x=0x = 0 gives the yy-intercept.
Top =0:2(x+1)=0  ⟹  (−1,0)Bottom =0:x−1=0  ⟹  x=1Plug in x=0:y=2(0+1)0−1=−2  ⟹  (0,−2)\displaystyle \begin{aligned} &\text{Top } = 0: \\ &2(\curve{x + 1}) = 0 \implies \curve{(-1, 0)} \\[6pt] &\text{Bottom } = 0: \\ &\asym{x - 1} = 0 \implies \asym{x = 1} \\[6pt] &\text{Plug in } x = 0: \\ &y = \frac{2(0 + 1)}{0 - 1} = -2 \implies \curve{(0, -2)} \end{aligned}
Compare the leading terms for the horizontal asymptoteKeeping only the highest power of xx on top and bottom shows where the far ends flatten out.
y≈2x2x2\displaystyle y \approx \frac{\lead{2x^2}}{\lead{x^2}} =2  ⟹  y=2\displaystyle = \asym{2} \implies \asym{y = 2}
Expanding the top to 2x+22x + 2 and dividing by x−1x - 1 gives 22 with remainder 44. That rewrites the simplified equation as y=2+4x−1y = \asym{2} + \frac{\step{4}}{x - \asym{1}} and gives the shifted graph, with the point (3,4)\curve{(3, 4)} removed.
Leave the asymptotes and the hole out of the domain and rangeEven though x−3\shared{x - 3} canceled out, x=3\domain{x = 3} still divides by zero in the original equation, so both the vertical asymptote x=1\asym{x = 1} and the hole x=3\domain{x = 3} are left out of the domain, and both the horizontal asymptote y=2\asym{y = 2} and the hole's height y=4\curve{y = 4} are left out of the range.
Domain: x≠1,3, or (−∞,1)∪(1,3)∪(3,∞)Range: y≠2,4, or (−∞,2)∪(2,4)∪(4,∞)\displaystyle \begin{aligned} \text{Domain: } &\domain{x \neq 1, 3}, \text{ or } \\ &\domain{(-\infty, 1) \cup (1, 3) \cup (3, \infty)} \\[4pt] \text{Range: } &\range{y \neq 2, 4}, \text{ or } \\ &\range{(-\infty, 2) \cup (2, 4) \cup (4, \infty)} \end{aligned}
xx
yy
x=1\htmlClass{lc-violet}{x = 1}
y=2\htmlClass{lc-violet}{y = 2}
(−1,0)\htmlClass{lc-blue}{(-1, 0)}
(0,−2)\htmlClass{lc-blue}{(0, -2)}
(3,4)\htmlClass{lc-blue}{(3, 4)}
y=2(x−3)(x+1)(x−3)(x−1)y = \dfrac{2(\htmlClass{lc-green}{x - 3})(\htmlClass{lc-blue}{x + 1})}{(\htmlClass{lc-green}{x - 3})(\htmlClass{lc-violet}{x - 1})}
6

When a graph crosses its horizontal asymptote

In the previous graph, the curve never touched its horizontal asymptote y=2\asym{y = 2}. A graph can never cross a vertical asymptote because that would divide by zero, but a horizontal asymptote only describes the far ends where xx is huge. So in the middle of the graph, where the smaller terms still matter, the curve can cross it. We want to test whether the graph crosses its horizontal asymptote, and find where, for

y\displaystyle y =2x+2x−1andy\displaystyle = \frac{2x + 2}{x - 1} \quad \text{and} \quad y =x2−3x−4x2−x−6\displaystyle = \frac{x^2 - 3x - 4}{x^2 - x - 6}
When a graph crosses its horizontal asymptote
2x+2x−1\displaystyle \dfrac{2x + 2}{x - 1} =2\displaystyle = \asym{2}
x\displaystyle x =  ?\displaystyle = \;?
Text solution
Set the first function equal to its horizontal asymptote y=2\asym{y = 2}Multiplying by the denominator and subtracting 2x2x cancels xx and leaves an impossible statement, which means the graph never reaches y=2\asym{y = 2}.
2x+2x−1=22x+2=2(x−1)2x+2=2x−2  ⟹  2=−2(never crosses)\displaystyle \begin{aligned} \frac{2x + 2}{x - 1} &= \asym{2} \\ 2x + 2 &= \asym{2}(x - 1) \\ 2x + 2 &= 2x - 2 \\ \implies 2 &= -2 \quad (\text{never crosses}) \end{aligned}
Find the horizontal asymptote of the second function from its leading termsKeeping only the x2\lead{x^2} terms gives a horizontal asymptote at y=1\asym{y = 1}.
y≈x2x2\displaystyle y \approx \frac{\lead{x^2}}{\lead{x^2}} =1  ⟹  y=1\displaystyle = \asym{1} \implies \asym{y = 1}
Set the second function equal to 11 and solve for xxMultiplying by the denominator and subtracting x2x^2 gives x=1x = 1. The original numerator and denominator are both −6-6 there, so (1,1)(1, 1) is on the graph. To check that the graph crosses, test a point on each side of x=1x = 1. At x=0x = 0 the graph is below y=1y = 1, and at x=2x = 2 it is above y=1y = 1.
x2−3x−4x2−x−6\displaystyle \frac{x^2 - 3x - 4}{x^2 - x - 6} =1\displaystyle = 1
x2−3x−4\displaystyle x^2 - 3x - 4 =x2−x−6\displaystyle = x^2 - x - 6
−3x−4\displaystyle -3x - 4 =−x−6\displaystyle = -x - 6
2\displaystyle 2 =2x  ⟹  x\displaystyle = 2x \implies x =1,y\displaystyle = 1, \qquad y =−6−6\displaystyle = \frac{-6}{-6} =1\displaystyle = 1
x\displaystyle x =0: y\displaystyle = 0:\ y =−4−6\displaystyle = \frac{-4}{-6} =23<1,x\displaystyle = \frac{2}{3} < 1, \qquad x =2: y\displaystyle = 2:\ y =−6−4\displaystyle = \frac{-6}{-4} =32>1  ⟹  Crosses at (1,1)\displaystyle = \frac{3}{2} > 1 \implies \text{Crosses at } (1, 1)
7

Squared factors at asymptotes and intercepts

So far, every factor on top and bottom has been a single power like x−1x - 1 or x+1x + 1, where the graph crosses straight through the xx-axis at an intercept and goes to opposite infinities on the two sides of a vertical asymptote. Now we want to see what happens at a vertical asymptote or xx-intercept when a factor is squared, as in

y\displaystyle y =1(x−1)2,y\displaystyle = \frac{1}{(\asym{x - 1})^2}, \qquad y =x+1x+2,y\displaystyle = \frac{\curve{x + 1}}{\asym{x + 2}}, \qquad y =(x+1)2x+2\displaystyle = \frac{(\curve{x + 1})^2}{\asym{x + 2}}
Squared factors at asymptotes and intercepts
xx
yy
x=1\htmlClass{lc-violet}{x = 1}
y=1x−1y = \dfrac{1}{\htmlClass{lc-violet}{x - 1}}
xx
yy
x=1\htmlClass{lc-violet}{x = 1}
y=1(x−1)2y = \dfrac{1}{(\htmlClass{lc-violet}{x - 1})^2}

Stepping across x=1\asym{x = 1} from x=0.99x = 0.99 to x=1.01x = 1.01 flips the sign of x−1\asym{x - 1}, sending the two branches of y=1x−1y = \frac{1}{\asym{x - 1}} in opposite directions, whereas squaring (x−1)2(\asym{x - 1})^2 keeps both sides positive so both branches of y=1(x−1)2y = \frac{1}{(\asym{x - 1})^2} go in the same direction:

Single factor x−1:0.99−1=−0.01<0,1.01−1=+0.01>0(sign flips)Squared factor (x−1)2:(−0.01)2>0,(+0.01)2>0(same sign)\displaystyle \begin{aligned} &\text{Single factor } \asym{x - 1}: \\ &\quad 0.99 - 1 = \step{-0.01} < 0, \\ &\quad 1.01 - 1 = \step{+0.01} > 0 \quad (\text{sign flips}) \\[6pt] &\text{Squared factor } (\asym{x - 1})^2: \\ &\quad (\step{-0.01})^2 > 0, \\ &\quad (\step{+0.01})^2 > 0 \quad (\text{same sign}) \end{aligned}

After canceling all matching factors, the same sign rule applies to a numerator factor at an xx-intercept: a single factor like x+1\curve{x + 1} flips sign across x=−1x = -1 so the graph crosses straight through the xx-axis, while a squared factor (x+1)2(\curve{x + 1})^2 keeps the same sign on both sides so the graph touches the xx-axis at x=−1x = -1 and turns back.

x=1\htmlClass{lc-violet}{x = 1}
y=1x−1y = \dfrac{1}{\htmlClass{lc-violet}{x - 1}}
sign flips\text{sign flips}
x=1\htmlClass{lc-violet}{x = 1}
y=1(x−1)2y = \dfrac{1}{(\htmlClass{lc-violet}{x - 1})^2}
same sign\text{same sign}
x=−2\htmlClass{lc-violet}{x = -2}
(−1,0)\htmlClass{lc-blue}{(-1, 0)}
y=x+1x+2y = \dfrac{\htmlClass{lc-blue}{x + 1}}{\htmlClass{lc-violet}{x + 2}}
sign flips\text{sign flips}
x=−2\htmlClass{lc-violet}{x = -2}
(−1,0)\htmlClass{lc-blue}{(-1, 0)}
y=(x+1)2x+2y = \dfrac{(\htmlClass{lc-blue}{x + 1})^2}{\htmlClass{lc-violet}{x + 2}}
same sign\text{same sign}
x=1\htmlClass{lc-violet}{x = 1}
y=1x−1y = \dfrac{1}{\htmlClass{lc-violet}{x - 1}}
sign flips\text{sign flips}
x=1\htmlClass{lc-violet}{x = 1}
y=1(x−1)2y = \dfrac{1}{(\htmlClass{lc-violet}{x - 1})^2}
same sign\text{same sign}
x=−2\htmlClass{lc-violet}{x = -2}
(−1,0)\htmlClass{lc-blue}{(-1, 0)}
y=x+1x+2y = \dfrac{\htmlClass{lc-blue}{x + 1}}{\htmlClass{lc-violet}{x + 2}}
sign flips\text{sign flips}
x=−2\htmlClass{lc-violet}{x = -2}
(−1,0)\htmlClass{lc-blue}{(-1, 0)}
y=(x+1)2x+2y = \dfrac{(\htmlClass{lc-blue}{x + 1})^2}{\htmlClass{lc-violet}{x + 2}}
same sign\text{same sign}

Key concepts

Recap: reading a rational function
y=2x2−4x−6x2−4x+3y = \dfrac{2x^2 - 4x - 6}{x^2 - 4x + 3}
xx
yy
x=1\htmlClass{lc-violet}{x = 1}
y=2\htmlClass{lc-violet}{y = 2}
(−1,0)\htmlClass{lc-blue}{(-1, 0)}
(0,−2)\htmlClass{lc-blue}{(0, -2)}
(3,4)\htmlClass{lc-blue}{(3, 4)}

Here is how all the pieces fit together when you graph any rational function:

Shifted form

An equation of the form y=ax−h+ky = \frac{a}{x - h} + k shifts the graph of y=axy = \frac{a}{x} so its vertical asymptote is x=hx = h and its horizontal asymptote is y=ky = k.

Factoring, holes, intercepts, and vertical asymptotes

Factor the numerator and denominator first. A common factor that cancels out of the denominator gives a hole (plug its xx-value into the simplified equation to get its height). From the simplified fraction, top =0= 0 gives xx-intercepts, x=0x = 0 gives the yy-intercept, and bottom =0= 0 gives vertical asymptotes.

End behavior

Compare the leading terms (highest powers of xx) on top and bottom: a higher power on the bottom gives the horizontal asymptote y=0y = 0, the same power gives the horizontal asymptote from dividing those leading terms, and one power higher on top gives a slant asymptote from polynomial division.

Domain, range, and crossing

Leave every vertical asymptote and every hole's xx-value out of the domain, and read the range from the graph, leaving out any heights the graph never hits (such as a hole's yy-value or an uncrossed horizontal asymptote). A graph never crosses a vertical asymptote, but to check if it crosses a horizontal asymptote, set the fraction equal to that height, keep only solutions in the original domain, and check that the graph is above the line on one side and below it on the other.

8

Practice

1

For y=−2x+1+3y = \frac{-2}{x + 1} + 3, find the vertical asymptote, horizontal asymptote, two reference points one unit left and right of the vertical asymptote, domain, and range.

What value of xx makes the denominator x+1x + 1 equal zero, and which way do the vertical steps go from where the asymptotes meet when a=−2a = -2 is negative?

Set the denominator x+1\asym{x + 1} to zero to find the vertical asymptote:
x+1\displaystyle \asym{x + 1} =0  ⟹  x=−1\displaystyle = 0 \implies \asym{x = -1}
(Watch out: don't read x+1x + 1 as x=1x = 1; writing x+1x + 1 as x−(−1)x - (-1) shows the graph shifts left to x=−1x = -1, whereas using x=1x = 1 puts the center at (1,3)(1, 3) and gives the wrong reference points (0,5)(0, 5) and (2,1)(2, 1).)
When xx is huge, −2x+1\frac{\step{-2}}{x + 1} shrinks to 00, giving the horizontal asymptote:
y=3\displaystyle \asym{y = 3}
Starting where the asymptotes meet at (−1,3)\asym{(-1, 3)}, use a=−2\step{a = -2} to step 1\step{1} unit left and 2\step{2} units up, and 1\step{1} unit right and 2\step{2} units down:
Left 1, up 2:(−1−1, 3+2)=(−2,5)Right 1, down 2:(−1+1, 3−2)=(0,1)\displaystyle \begin{aligned} \text{Left } \step{1}, \text{ up } \step{2}: &\quad (\asym{-1} \step{- 1},\, \asym{3} \step{+ 2}) = \curve{(-2, 5)} \\ \text{Right } \step{1}, \text{ down } \step{2}: &\quad (\asym{-1} \step{+ 1},\, \asym{3} \step{- 2}) = \curve{(0, 1)} \end{aligned}
(Watch out: ignoring the negative sign on a=−2a = -2 flips the branches and gives (−2,1)(-2, 1) and (0,5)(0, 5).)
Leave the vertical asymptote out of the domain and the horizontal asymptote out of the range: Vertical asymptote: x=−1\asym{x = -1}; Horizontal asymptote: y=3\asym{y = 3}; Reference points: (−2,5)\curve{(-2, 5)} and (0,1)\curve{(0, 1)}; Domain: x≠−1\domain{x \neq -1}, or (−∞,−1)∪(−1,∞)\domain{(-\infty, -1) \cup (-1, \infty)}; Range: y≠3\range{y \neq 3}, or (−∞,3)∪(3,∞)\range{(-\infty, 3) \cup (3, \infty)}.
2

Find the xx-intercept, vertical asymptotes, and horizontal asymptote of y=4x−8x2−9y = \frac{4x - 8}{x^2 - 9}.

Factor the top and bottom first to check whether any factor cancels, then compare the highest powers of xx on top and bottom for huge xx.

Factor the numerator and denominator:
y\displaystyle y =4(x−2)(x−3)(x+3)\displaystyle = \frac{4(\curve{x - 2})}{(\asym{x - 3})(\asym{x + 3})}
No factors cancel. Set the numerator factor to zero for the xx-intercept and the denominator factors to zero for the vertical asymptotes:
x−2\displaystyle x - 2 =0  ⟹  (2,0)\displaystyle = 0 \implies (2, 0)
x−3\displaystyle x - 3 =0 and x+3\displaystyle = 0 \text{ and } x + 3 =0  ⟹  x\displaystyle = 0 \implies x =3 and x\displaystyle = 3 \text{ and } x =−3\displaystyle = -3
For the horizontal asymptote, keep only the highest power of xx on top and bottom at huge xx:
y≈4xx2\displaystyle y \approx \frac{\lead{4x}}{\lead{x^2}} =4x≈0  ⟹  y=0\displaystyle = \frac{4}{x} \approx \asym{0} \implies \asym{y = 0}
(Watch out: don't just divide the first numbers 41\frac{4}{1} to get y=4y = 4; because x2x^2 on the bottom has a higher power than 4x4x on top, the denominator grows much faster and pulls the fraction down to y=0y = 0.)
xx-intercept: (2,0)\curve{(2, 0)}; Vertical asymptotes: x=−3\asym{x = -3} and x=3\asym{x = 3}; Horizontal asymptote: y=0\asym{y = 0}.
3

Find the vertical asymptote and slant asymptote of y=x2−2x−3x−4y = \frac{x^2 - 2x - 3}{x - 4}.

Factor the top first to check if x−4x - 4 cancels, then divide x2−2x−3x^2 - 2x - 3 by x−4x - 4 since the top has a higher power of xx.

Factoring the numerator gives y=(x−3)(x+1)x−4y = \frac{(\curve{x - 3})(\curve{x + 1})}{\asym{x - 4}}, so x−4\asym{x - 4} does not cancel. Setting the denominator to zero gives the vertical asymptote:
x−4\displaystyle \asym{x - 4} =0  ⟹  x=4\displaystyle = 0 \implies \asym{x = 4}
Because the numerator has a higher power of xx than the denominator, divide x2−2x−3x^2 - 2x - 3 by x−4x - 4:
y\displaystyle y =x2−2x−3x−4\displaystyle = \frac{x^2 - 2x - 3}{x - 4} =x+2+5x−4\displaystyle = \asym{x + 2} + \gap{\frac{5}{x - 4}}
(Watch out: when subtracting x(x−4)=x2−4xx(x - 4) = x^2 - 4x from x2−2xx^2 - 2x during division, subtracting a negative gives −2x−(−4x)=+2x-2x - (-4x) = +2x; forgetting to flip the sign gives −6x-6x and leads to the wrong slant asymptote y=x−6y = x - 6.)
As xx gets huge, the remainder fraction 5x−4\gap{\frac{5}{x - 4}} shrinks to 00: Vertical asymptote: x=4\asym{x = 4}; Slant asymptote: y=x+2\asym{y = x + 2}.
4

Graph y=3x2−9x+6x2−x−2y = \frac{3x^2 - 9x + 6}{x^2 - x - 2} by finding its hole, xx-intercept, yy-intercept, vertical asymptote, horizontal asymptote, domain, and range.

Pull out the common factor of 33 in the numerator before factoring, cancel the matching factor to get the simplified equation, and use the simplified equation to find the hole's height and the remaining features.

Factor the numerator and denominator and cancel the matching x−2\shared{x - 2} factor:
y=3(x2−3x+2)x2−x−2=3(x−2)(x−1)(x−2)(x+1)=3(x−1)x+1(x≠2)\displaystyle \begin{aligned} y &= \frac{3(x^2 - 3x + 2)}{x^2 - x - 2} \\ &= \frac{3(\shared{x - 2})(\curve{x - 1})}{(\shared{x - 2})(\asym{x + 1})} \\ &= \frac{3(\curve{x - 1})}{\asym{x + 1}} \quad (\domain{x \neq 2}) \end{aligned}
Plug x=2\domain{x = 2} into the simplified equation to find the hole:
y\displaystyle y =3(2−1)2+1\displaystyle = \frac{3(2 - 1)}{2 + 1} =33\displaystyle = \frac{3}{3} =1  ⟹  (2,1)\displaystyle = 1 \implies \curve{(2, 1)}
(Watch out: don't drop the leading factor of 33 when simplifying, which gives a hole height of 13\frac{1}{3} instead of 11, and don't treat the canceled x−2x - 2 factor as a vertical asymptote at x=2x = 2.)
From the simplified equation y=3(x−1)x+1y = \frac{3(\curve{x - 1})}{\asym{x + 1}}, find the intercepts and asymptotes:
x-intercept (top =0):3(x−1)=0  ⟹  (1,0)y-intercept (x=0):y=3(0−1)0+1=−3  ⟹  (0,−3)Vertical asymptote (bottom =0):x+1=0  ⟹  x=−1Horizontal asymptote (leading terms):y≈3x2x2=3  ⟹  y=3\displaystyle \begin{aligned} x\text{-intercept (top } = 0\text{):} &\quad 3(\curve{x - 1}) = 0 \implies \curve{(1, 0)} \\ y\text{-intercept (}x = 0\text{):} &\quad y = \frac{3(0 - 1)}{0 + 1} = -3 \implies \curve{(0, -3)} \\ \text{Vertical asymptote (bottom } = 0\text{):} &\quad \asym{x + 1} = 0 \implies \asym{x = -1} \\ \text{Horizontal asymptote (leading terms):} &\quad y \approx \frac{\lead{3x^2}}{\lead{x^2}} = \asym{3} \implies \asym{y = 3} \end{aligned}
For the shape, expand the top to 3x−33x - 3 and divide by x+1x + 1 to get 33 with remainder −6-6, rewriting the simplified equation as y=3−6x+1y = \asym{3} \step{-} \frac{\step{6}}{x + \asym{1}}. Leave both the asymptotes and the hole's coordinates out of the domain and range (watch out: forgetting the canceled hole leaves x=2x = 2 in the domain and y=1y = 1 in the range): Factoring gives y=3(x−2)(x−1)(x−2)(x+1)y = \frac{3(\shared{x - 2})(\curve{x - 1})}{(\shared{x - 2})(\asym{x + 1})}, which simplifies to y=3(x−1)x+1y = \frac{3(\curve{x - 1})}{\asym{x + 1}}. Hole: (2,1)\curve{(2, 1)}; xx-intercept: (1,0)\curve{(1, 0)}; yy-intercept: (0,−3)\curve{(0, -3)}; Vertical asymptote: x=−1\asym{x = -1}; Horizontal asymptote: y=3\asym{y = 3}; the left branch lies above y=3\asym{y = 3} and rises toward +∞+\infty along the left of x=−1\asym{x = -1}, while the right branch rises from −∞-\infty along the right of x=−1\asym{x = -1} through (0,−3)\curve{(0, -3)} and (1,0)\curve{(1, 0)}, leaving a hole at (2,1)\curve{(2, 1)} and approaching y=3\asym{y = 3}; Domain: x≠−1,2\domain{x \neq -1, 2}, or (−∞,−1)∪(−1,2)∪(2,∞)\domain{(-\infty, -1) \cup (-1, 2) \cup (2, \infty)}; Range: y≠1,3\range{y \neq 1, 3}, or (−∞,1)∪(1,3)∪(3,∞)\range{(-\infty, 1) \cup (1, 3) \cup (3, \infty)}.
5

Find the horizontal asymptote of y=2x2−6x−8x2−4x+3y = \frac{2x^2 - 6x - 8}{x^2 - 4x + 3} and determine whether the graph crosses it. If it does, find the coordinates of the crossing point.

Find the horizontal asymptote height yy from the leading terms first, then set the fraction equal to that yy-value and solve for xx.

Compare the leading terms at huge xx to find the horizontal asymptote:
y≈2x2x2\displaystyle y \approx \frac{\lead{2x^2}}{\lead{x^2}} =2  ⟹  y=2\displaystyle = \asym{2} \implies \asym{y = 2}
Set the equation equal to 2\asym{2} and multiply both sides by the denominator:
2x2−6x−8x2−4x+3=22x2−6x−8=2(x2−4x+3)2x2−6x−8=2x2−8x+6\displaystyle \begin{aligned} \frac{2x^2 - 6x - 8}{x^2 - 4x + 3} &= \asym{2} \\ 2x^2 - 6x - 8 &= \asym{2}(x^2 - 4x + 3) \\ 2x^2 - 6x - 8 &= 2x^2 - 8x + 6 \end{aligned}
(Watch out: make sure to distribute the 22 to every term in x2−4x+3x^2 - 4x + 3; multiplying only the first term gives 2x2−4x+32x^2 - 4x + 3 and leads to the wrong answer x=−112x = -\frac{11}{2}.)
Subtract 2x22x^2 from both sides and solve for xx:
−6x−8=−8x+62x=14  ⟹  x=7\displaystyle \begin{aligned} -6x - 8 &= -8x + 6 \\ 2x &= 14 \implies x = 7 \end{aligned}
At x=7x = 7, the original denominator is 49−28+3=2449 - 28 + 3 = 24, so the point is defined. To check that the graph crosses, test a point on each side of x=7x = 7:
x\displaystyle x =6: y\displaystyle = 6:\ y =2(6)2−6(6)−862−4(6)+3\displaystyle = \frac{2(6)^2 - 6(6) - 8}{6^2 - 4(6) + 3} =2815<2\displaystyle = \frac{28}{15} < 2
x\displaystyle x =8: y\displaystyle = 8:\ y =2(8)2−6(8)−882−4(8)+3\displaystyle = \frac{2(8)^2 - 6(8) - 8}{8^2 - 4(8) + 3} =7235>2\displaystyle = \frac{72}{35} > 2
The graph is below y=2\asym{y = 2} at x=6x = 6 and above y=2\asym{y = 2} at x=8x = 8, so it crosses the asymptote. Since the asymptote has height y=2\asym{y = 2}: Horizontal asymptote: y=2\asym{y = 2}; the graph crosses it at (7,2)(7, 2).
6

Without graphing the full function, describe how y=(x+3)2(x−1)(x−2)2(x+1)y = \frac{(x + 3)^2(x - 1)}{(x - 2)^2(x + 1)} behaves at each of its xx-intercepts and on the two sides of each of its vertical asymptotes.

Separate the numerator factors (where y=0y = 0) from the denominator factors (where the fraction grows huge), then check which factors are squared.

Set each numerator factor to zero for the xx-intercepts at (−3,0)\curve{(-3, 0)} and (1,0)\curve{(1, 0)}, and set each denominator factor to zero for the vertical asymptotes at x=2\asym{x = 2} and x=−1\asym{x = -1}. (Watch out: set each factor equal to zero and solve rather than reading the signs directly, which would flip the intercepts to (3,0)(3, 0) and (−1,0)(-1, 0) and the vertical asymptotes to x=−2x = -2 and x=1x = 1.)
Check which factors are squared so their sign does not flip across their zero: The squared factors are positive away from their zeros, so the sign of the function is the sign of x−1x+1\frac{\curve{x - 1}}{\asym{x + 1}}. This is positive for x<−1x < -1 and x>1x > 1, and negative for −1<x<1-1 < x < 1, apart from the zeros and excluded inputs. At (−3,0)\curve{(-3, 0)}, the graph touches the xx-axis from above and turns back up. At (1,0)\curve{(1, 0)}, it crosses from below to above. At the vertical asymptote x=2\asym{x = 2}, the graph goes to +∞+\infty on both sides. At x=−1\asym{x = -1}, it goes to +∞+\infty on the left and −∞-\infty on the right.