We want to graph rational functions (fractions with polynomials on top and bottom) and see how dividing by expressions with x 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=x−21
Why rational functions have vertical asymptotes
At x=2, the denominator is 2−2=0, so the fraction 01 is undefined and the graph has a vertical asymptote at x=2. Stepping right next to x=2 on either side divides 1 by a tiny positive or negative number:
yyRight of 2(x=2.000001):=2.000001−21=0.0000011=1,000,000Left of 2(x=1.999):=1.999−21=−0.0011=−1,000
As x gets close to 2 on y=x−21, the denominator x−2 shrinks toward zero so the height y gets huge, and stepping across x=2 flips the sign of 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=x−21 is a shifted version of the parent function y=x1. When a rational function is written in shifted form with a=0,
y=x−ha+k
we can graph it and find its domain and range directly from the shifts and vertical stretch, as in
y=x−23+4
Graphing in shifted form
Text solution
Set the denominator to zero for the vertical asymptoteThe denominator x−2 equals zero at x=2, which shifts the vertical asymptote from x=0 to x=2.
x−2=0⟹x=2
Let x get huge for the horizontal asymptoteWhen x is huge, the fraction x−23 shrinks to 0, lifting the horizontal asymptote from y=0 to y=4.
y≈0+4=4⟹y=4
Step 1 unit right and left from (2,4) and stretch vertically by a=3Starting where the asymptotes meet at (2,4), step 1 unit right and 3 units up, and 1 unit left and 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)
Leave the asymptotes out of the domain and rangeMoving left to right uses every x except the vertical asymptote at x=2, and moving bottom to top reaches every height y except the horizontal asymptote at y=4.
Domain: Range: x=2, or (−∞,2)∪(2,∞)y=4, or (−∞,4)∪(4,∞)
In the family y=x−h3+k, the vertical asymptote x=h and horizontal asymptote y=k act like a shifted set of axes centered at (h,k) that carry both branches with them, and h and 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, x-intercept, and any missing point on the graph of
y=x2−4x2−x−6
Factoring to find asymptotes, intercepts, and holes
x2−x−6=(?)(?)
x2−x−6x2−4=(?)(?)
Text solution
Factor the numerator and denominatorFactoring shows which x-values make the top or the bottom equal zero.
y=x2−4x2−x−6=(x−2)(x+2)(x−3)(x+2)
Cancel matching factors to find the holeBecause x+2 is on both top and bottom, it cancels to 1 for every x except x=−2 (where the original fraction is 00), leaving a hole at x=−2 on the simplified curve.
yy=x−2x−3(x=−2)Hole at x=−2:=−2−2−2−3=−4−5=1.25⟹(−2,1.25)
Set the remaining numerator factor to zero for the x-interceptWhen the leftover top factor is zero, the whole fraction equals zero.
x−3=0⟹x=3⟹(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=0⟹x=2
Near x=−2, the matching x+2 factors in y=(x−2)(x+2)(x−3)(x+2) shrink at the same rate and cancel to 1, so the curve follows y=x−2x−3 smoothly with a single open circle at (−2,1.25) where 00 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 on the end to show where the far ends flatten out. We want to find the horizontal or slant asymptote when x gets huge (like x=±1,000,000) for
y=x2−43x2+5x−2,y=x2−45x+1,y=x−1x2+2x
Zooming out for horizontal and slant asymptotes
x
y
x=2
x=−1,000,000⟵
⟶x=1,000,000
Text solution
Same highest power on top and bottomIn y=x2−43x2+5x−2, the lower-power terms barely matter at huge x and the x2 factors cancel, leaving a horizontal asymptote at the ratio of the leading terms.
y≈x23x2=3⟹Horizontal asymptote: y=3
Bigger power on the bottomIn y=x2−45x+1, the denominator grows much faster than the numerator at huge x and pulls the fraction down to zero.
y≈x25x=x5≈0⟹Horizontal asymptote: y=0
Top degree exactly one higherIn y=x−1x2+2x, the leading terms give y≈xx2=x, so the ends climb along a diagonal line; dividing x2+2x by x−1 writes the function as a line plus a remainder fraction that shrinks to zero at huge x.
y=x−1x2+2x=x+3+x−13⟹Slant asymptote: y=x+3
As we zoom out on y=x2−43x2+5x−2 to x=±1,000,000, the smaller terms +5x−2 and −4 barely matter next to 3x2 and x2, and the far ends of the curve flatten onto the horizontal line 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=x2−4x+32x2−4x−6
Graphing a rational function from start to finish
x
y
y=x2−4x+32x2−4x−6
Domain=?Range=?
Text solution
Factor and cancel to find the holePulling out 2 on top and factoring both polynomials gives a matching x−3 factor, which cancels to give the simplified equation and a hole at x=3.
yy=(x−3)(x−1)2(x−3)(x+1)=x−12(x+1)(x=3)Hole at x=3:=3−12(3+1)=28=4⟹(3,4)
Use the simplified equation for the intercepts and vertical asymptoteSetting the top to zero gives the x-intercept, setting the bottom to zero gives the vertical asymptote, and plugging in x=0 gives the y-intercept.
Top =0:2(x+1)=0⟹(−1,0)Bottom =0:x−1=0⟹x=1Plug in x=0:y=0−12(0+1)=−2⟹(0,−2)
Compare the leading terms for the horizontal asymptoteKeeping only the highest power of x on top and bottom shows where the far ends flatten out.
y≈x22x2=2⟹y=2
Expanding the top to 2x+2 and dividing by x−1 gives 2 with remainder 4. That rewrites the simplified equation as y=2+x−14 and gives the shifted graph, with the point (3,4) removed.
Leave the asymptotes and the hole out of the domain and rangeEven though x−3 canceled out, x=3 still divides by zero in the original equation, so both the vertical asymptote x=1 and the hole x=3 are left out of the domain, and both the horizontal asymptote y=2 and the hole's height y=4 are left out of the range.
Domain: Range: x=1,3, or (−∞,1)∪(1,3)∪(3,∞)y=2,4, or (−∞,2)∪(2,4)∪(4,∞)
x
y
x=1
y=2
(−1,0)
(0,−2)
(3,4)
y=(x−3)(x−1)2(x−3)(x+1)
6
When a graph crosses its horizontal asymptote
In the previous graph, the curve never touched its horizontal asymptote 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 x 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=x−12x+2andy=x2−x−6x2−3x−4
When a graph crosses its horizontal asymptote
x−12x+2=2
x=?
Text solution
Set the first function equal to its horizontal asymptote y=2Multiplying by the denominator and subtracting 2x cancels x and leaves an impossible statement, which means the graph never reaches y=2.
Find the horizontal asymptote of the second function from its leading termsKeeping only the x2 terms gives a horizontal asymptote at y=1.
y≈x2x2=1⟹y=1
Set the second function equal to 1 and solve for xMultiplying by the denominator and subtracting x2 gives x=1. The original numerator and denominator are both −6 there, so (1,1) is on the graph. To check that the graph crosses, test a point on each side of x=1. At x=0 the graph is below y=1, and at x=2 it is above y=1.
x2−x−6x2−3x−4=1
x2−3x−4=x2−x−6
−3x−4=−x−6
2=2x⟹x=1,y=−6−6=1
x=0:y=−6−4=32<1,x=2:y=−4−6=23>1⟹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−1 or x+1, where the graph crosses straight through the x-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 x-intercept when a factor is squared, as in
y=(x−1)21,y=x+2x+1,y=x+2(x+1)2
Squared factors at asymptotes and intercepts
x
y
x=1
y=x−11
x
y
x=1
y=(x−1)21
Stepping across x=1 from x=0.99 to x=1.01 flips the sign of x−1, sending the two branches of y=x−11 in opposite directions, whereas squaring (x−1)2 keeps both sides positive so both branches of y=(x−1)21 go in the same direction:
After canceling all matching factors, the same sign rule applies to a numerator factor at an x-intercept: a single factor like x+1 flips sign across x=−1 so the graph crosses straight through the x-axis, while a squared factor (x+1)2 keeps the same sign on both sides so the graph touches the x-axis at x=−1 and turns back.
x=1
y=x−11
sign flips
x=1
y=(x−1)21
same sign
x=−2
(−1,0)
y=x+2x+1
sign flips
x=−2
(−1,0)
y=x+2(x+1)2
same sign
x=1
y=x−11
sign flips
x=1
y=(x−1)21
same sign
x=−2
(−1,0)
y=x+2x+1
sign flips
x=−2
(−1,0)
y=x+2(x+1)2
same sign
Key concepts
Recap: reading a rational function
y=x2−4x+32x2−4x−6
x
y
x=1
y=2
(−1,0)
(0,−2)
(3,4)
Here is how all the pieces fit together when you graph any rational function:
Shifted form
An equation of the form y=x−ha+k shifts the graph of y=xa so its vertical asymptote is x=h and its horizontal asymptote is y=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 x-value into the simplified equation to get its height). From the simplified fraction, top =0 gives x-intercepts, x=0 gives the y-intercept, and bottom =0 gives vertical asymptotes.
End behavior
Compare the leading terms (highest powers of x) on top and bottom: a higher power on the bottom gives the horizontal asymptote y=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 x-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 y-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=x+1−2+3, find the vertical asymptote, horizontal asymptote, two reference points one unit left and right of the vertical asymptote, domain, and range.
Watch out: don't read x+1 as x=1; writing x+1 as x−(−1) shows the graph shifts left to x=−1, whereas using x=1 puts the center at (1,3) and gives the wrong reference points (0,5) and (2,1).
What value of x makes the denominator x+1 equal zero, and which way do the vertical steps go from where the asymptotes meet when a=−2 is negative?
Set the denominator x+1 to zero to find the vertical asymptote:
x+1=0⟹x=−1
(Watch out: don't read x+1 as x=1; writing x+1 as x−(−1) shows the graph shifts left to x=−1, whereas using x=1 puts the center at (1,3) and gives the wrong reference points (0,5) and (2,1).)
When x is huge, x+1−2 shrinks to 0, giving the horizontal asymptote:
y=3
Starting where the asymptotes meet at (−1,3), use a=−2 to step 1 unit left and 2 units up, and 1 unit right and 2 units down:
Left 1, up 2:Right 1, down 2:(−1−1,3+2)=(−2,5)(−1+1,3−2)=(0,1)
(Watch out: ignoring the negative sign on a=−2 flips the branches and gives (−2,1) and (0,5).)
Leave the vertical asymptote out of the domain and the horizontal asymptote out of the range: Vertical asymptote: x=−1; Horizontal asymptote: y=3; Reference points: (−2,5) and (0,1); Domain: x=−1, or (−∞,−1)∪(−1,∞); Range: y=3, or (−∞,3)∪(3,∞).
2
Find the x-intercept, vertical asymptotes, and horizontal asymptote of y=x2−94x−8.
Factor the top and bottom first to check whether any factor cancels, then compare the highest powers of x on top and bottom for huge x.
Factor the numerator and denominator:
y=(x−3)(x+3)4(x−2)
No factors cancel. Set the numerator factor to zero for the x-intercept and the denominator factors to zero for the vertical asymptotes:
x−2=0⟹(2,0)
x−3=0 and x+3=0⟹x=3 and x=−3
For the horizontal asymptote, keep only the highest power of x on top and bottom at huge x:
y≈x24x=x4≈0⟹y=0
(Watch out: don't just divide the first numbers 14 to get y=4; because x2 on the bottom has a higher power than 4x on top, the denominator grows much faster and pulls the fraction down to y=0.)
x-intercept: (2,0); Vertical asymptotes: x=−3 and x=3; Horizontal asymptote: y=0.
3
Find the vertical asymptote and slant asymptote of y=x−4x2−2x−3.
Factor the top first to check if x−4 cancels, then divide x2−2x−3 by x−4 since the top has a higher power of x.
Factoring the numerator gives y=x−4(x−3)(x+1), so x−4 does not cancel. Setting the denominator to zero gives the vertical asymptote:
x−4=0⟹x=4
Because the numerator has a higher power of x than the denominator, divide x2−2x−3 by x−4:
y=x−4x2−2x−3=x+2+x−45
(Watch out: when subtracting x(x−4)=x2−4x from x2−2x during division, subtracting a negative gives −2x−(−4x)=+2x; forgetting to flip the sign gives −6x and leads to the wrong slant asymptote y=x−6.)
As x gets huge, the remainder fraction x−45 shrinks to 0: Vertical asymptote: x=4; Slant asymptote: y=x+2.
4
Graph y=x2−x−23x2−9x+6 by finding its hole, x-intercept, y-intercept, vertical asymptote, horizontal asymptote, domain, and range.
Pull out the common factor of 3 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 factor:
Plug x=2 into the simplified equation to find the hole:
y=2+13(2−1)=33=1⟹(2,1)
(Watch out: don't drop the leading factor of 3 when simplifying, which gives a hole height of 31 instead of 1, and don't treat the canceled x−2 factor as a vertical asymptote at x=2.)
From the simplified equation y=x+13(x−1), find the intercepts and asymptotes:
For the shape, expand the top to 3x−3 and divide by x+1 to get 3 with remainder −6, rewriting the simplified equation as y=3−x+16. Leave both the asymptotes and the hole's coordinates out of the domain and range (watch out: forgetting the canceled hole leaves x=2 in the domain and y=1 in the range): Factoring gives y=(x−2)(x+1)3(x−2)(x−1), which simplifies to y=x+13(x−1). Hole: (2,1);x-intercept: (1,0);y-intercept: (0,−3); Vertical asymptote: x=−1; Horizontal asymptote: y=3; the left branch lies above y=3 and rises toward +∞ along the left of x=−1, while the right branch rises from −∞ along the right of x=−1 through (0,−3) and (1,0), leaving a hole at (2,1) and approaching y=3; Domain: x=−1,2, or (−∞,−1)∪(−1,2)∪(2,∞); Range: y=1,3, or (−∞,1)∪(1,3)∪(3,∞).
5
Find the horizontal asymptote of y=x2−4x+32x2−6x−8 and determine whether the graph crosses it. If it does, find the coordinates of the crossing point.
Find the horizontal asymptote height y from the leading terms first, then set the fraction equal to that y-value and solve for x.
Compare the leading terms at huge x to find the horizontal asymptote:
y≈x22x2=2⟹y=2
Set the equation equal to 2 and multiply both sides by the denominator:
(Watch out: make sure to distribute the 2 to every term in x2−4x+3; multiplying only the first term gives 2x2−4x+3 and leads to the wrong answer x=−211.)
Subtract 2x2 from both sides and solve for x:
−6x−82x=−8x+6=14⟹x=7
At x=7, the original denominator is 49−28+3=24, so the point is defined. To check that the graph crosses, test a point on each side of x=7:
x=6:y=62−4(6)+32(6)2−6(6)−8=1528<2
x=8:y=82−4(8)+32(8)2−6(8)−8=3572>2
The graph is below y=2 at x=6 and above y=2 at x=8, so it crosses the asymptote. Since the asymptote has height y=2: Horizontal asymptote: y=2; the graph crosses it at (7,2).
6
Without graphing the full function, describe how y=(x−2)2(x+1)(x+3)2(x−1) behaves at each of its x-intercepts and on the two sides of each of its vertical asymptotes.
Separate the numerator factors (where y=0) from the denominator factors (where the fraction grows huge), then check which factors are squared.
Set each numerator factor to zero for the x-intercepts at (−3,0) and (1,0), and set each denominator factor to zero for the vertical asymptotes at x=2 and 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) and (−1,0) and the vertical asymptotes to x=−2 and x=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. This is positive for x<−1 and x>1, and negative for −1<x<1, apart from the zeros and excluded inputs. At (−3,0), the graph touches the x-axis from above and turns back up. At (1,0), it crosses from below to above. At the vertical asymptote x=2, the graph goes to +∞ on both sides. At x=−1, it goes to +∞ on the left and −∞ on the right.