A rational number is any number that can be expressed as the fraction $\frac{p}{q}$pq of two integers, a numerator $p$p and a nonzero denominator $q$q. Since $q$q may be equal to $1$1, every integer is a rational number. Similarly, a rational function is a function that can be written in the form of a fraction with expressions in the numerator and denominator.
A rational function is a function of the form $y=\frac{P\left(x\right)}{Q\left(x\right)},Q\left(x\right)\ne0$y=P(x)Q(x),Q(x)≠0, where $P\left(x\right)$P(x) and $Q\left(x\right)$Q(x) are polynomials.
So functions like $y=\frac{x}{x+1}$y=xx+1, $y=\frac{x^29}{2x1}$y=x2−92x−1, $y=5x^31=\frac{5x^31}{1}$y=5x3−1=5x3−11 and $y=\frac{24}{x^25x+6}$y=24x2−5x+6 can all be considered rational functions.
To understand the graph of a rational function, we must attend to the elephant in the room:
Let’s compare the functions $f\left(x\right)=x$f(x)=x and its reciprocal function $g\left(x\right)=\frac{1}{x}$g(x)=1x. We will start by looking at the function as $x$x approaches $\infty$∞.
$x$x  $0$0  $25$25  $50$50  $75$75  $100$100  $125$125 

$f\left(x\right)$f(x)  $0$0  $25$25  $50$50  $75$75  $100$100  $125$125 
As $x$x increases towards positive $\infty$∞, the function approaches positive $\infty$∞. Also, as the $y$y is all real positive numbers.
$\frac{1}{x}$1x  $0$0  $25$25  $50$50  $75$75  $100$100  $125$125 

$f\left(x\right)$f(x)  $undefined$undefined  $0.040$0.040  $0.020$0.020  $0.013$0.013  $0.01$0.01  $0.008$0.008 
As $x$x increases towards positive $\infty$∞, the function approaches $0$0 but never touches $0$0. Also, $y$y is all real positive numbers except $0$0.
Now, what happens when $x$x decreases towards negative $\infty$∞.
$x$x  $0$0  $25$−25  $50$−50  $75$−75  $100$−100  $125$−125 

$f\left(x\right)$f(x)  $0$0  $25$−25  $50$−50  $75$−75  $100$−100  $125$−125 
As $x$x decreases towards negative $\infty$∞, the function approaches negative $\infty$∞. Also, $y$y is all real negative numbers.
$\frac{1}{x}$1x  $0$0  $25$−25  $50$−50  $75$−75  $100$−100  $125$−125 

$f\left(x\right)$f(x)  $undefined$undefined  $0.040$−0.040  $0.020$−0.020  $0.013$−0.013  $0.01$−0.01  $0.008$−0.008 
As $x$x decreases towards negative $\infty$∞, the function approaches $0$0 but never touches $0$0. Also, $y$y is all real negative numbers except $0$0.
{insert f(x) = 1/x image that says where As x approaches  infinity etc}
Because the denominator cannot be equal to zero, the function $g\left(x\right)=\frac{1}{x}$g(x)=1x is undefined at $x=0$x=0 and cannot be contained in the domain. As the input values approach zero from the left side (becoming very small, negative values), the function values decrease without bound (in other words, they approach negative infinity). This behavior creates a vertical asymptote, which is a vertical line that the graph approaches but never crosses. In this case, the graph is approaching the vertical line $x=0$x=0 as the input becomes close to zero.
Also, based on the overall behavior and the graph of $g\left(x\right)=\frac{1}{x}$g(x)=1x, we can see that the function, $g\left(x\right)$g(x) , approaches $0$0 but never actually reaches $0$0; it seems to level off as the inputs become large. This behavior creates a horizontal asymptote, a horizontal line that the graph approaches as the input increases or decreases without bound. In this case, the graph is approaching the horizontal line $y=0$y=0.
The method used to find the horizontal asymptote changes depending on how the degrees of the polynomials in the numerator and denominator of the function compare.
$f\left(x\right)=\frac{2x^3+1}{x^35}$f(x)=2x3+1x3−5
Both are polynomials are $3$3rd degree, therefore the horizontal asymptote is $y=\frac{2}{1}$y=21 or $y=2$y=2.
$g\left(x\right)=\frac{1}{2x1}$g(x)=12x−1
The numerator is a $0$0 degree polynomial and the denominator is a $1$1st degree, therefore the horizontal asymptote is $y=0$y=0.
$h\left(x\right)=\frac{2x^3+1}{x+1}$h(x)=2x3+1x+1
The numerator is a $3$3 rd degree polynomial and the denominator is a $1$1st degree, therefore there is no horizontal asymptote.
If the polynomial in the numerator is a higher degree than the denominator, there is no horizontal asymptote.
Sketch a graph of the following rational function: $y=\frac{x}{x+2}$y=xx+2.
Think: The denominator of a fraction cannot be equal to zero; therefore, we must set the denominator equal to zero to find the vertical asymptote. Therefore, the vertical asymptote is $x=2$x=−2 . Because the numerator and denominator have the same degree, the horizontal asymptote is $y=1$y=1.
Do: First, graph the asymptotes.
{insert image of the two asymptotes using different colors}
Second, find and plot $x$xintercept and $y$yintercepts.
$x$xintercept
$y$y  $=$=  $\frac{x}{x+2}$xx+2 
(Given) 
$0$0  $=$=  $\frac{x}{x+2}$xx+2 
(Substitute $y=0$y=0) 
$0$0  $=$=  $x$x 
(Multiply $x+2$x+2 on both sides) 
Notice, the denominator vanishes.
$y$yintercept
$y$y  $=$=  $\frac{x}{x+2}$xx+2 
(Given) 
$y$y  $=$=  $\frac{0}{0+2}$00+2 
(Substitute $x=0$x=0) 
$y$y  $=$=  $0$0 
(Simplify) 
{insert image of the point(s) on graph with asymptotes}
Third, select $x$x values to the left of asymptote (i.e., $4$−4). We already have a number to the right (the $x$x intercept). Sketch graph.
{insert image graph of $y=\frac{x}{x+2}$y=xx+2}
Find the $x$xintercepts for the function: $y=\frac{x^35x^2+6}{x}$y=x3−5x2+6x.
Think: When finding the $x$x  intercept, set $y=0$y=0. After we multiply both sides by $x$x, we are left with $x^25x+6=0$x2−5x+6=0. This means that all of the function's $x$x intercepts are found by solving this quadratic equation.
Do:
$x^25x+6$x2−5x+6  $=$=  $0$0 
$\left(x2\right)\left(x3\right)$(x−2)(x−3)  $=$=  $0$0 
$\therefore$∴ $x$x  $=$=  $2$2 
or $x$x  $=$=  $3$3 
Sketch the graph of $y=\frac{x1}{x}$y=x−1x
Think: The denominator of a fraction cannot be equal to zero; therefore, we must set the denominator equal to zero to find the vertical asymptote. Therefore, the vertial asymptote is $x=0$x=0. Because the numerator and denominator have the same degree, the horizontal asymptote is $y=1$y=1.
Do:
Graph the rational function $y=\frac{24}{x^25x+6}$y=24x2−5x+6. Clearly label the asymptotes.
Think: The denominator of a fraction cannot be equal to zero; therefore, we must set the denominator equal to zero to find the vertical asymptote. Therefore, the vertical asymptote is $x^25x+6=0$x2−5x+6=0. When factored, the vertical asymptotes are $x=2$x=2 and $x=3$x=3 . Because the numerator has no degree and denominator is a $2$2 nd degree polynomial, the horizontal asymptote is $y=0$y=0.
Do: First, graph the asymptotes.
Second, find the $x$x  and $y$y  intersects and graph.
$x$xintersect
$y$y  $=$=  $\frac{24}{x^25x+6}$24x2−5x+6 
(Given) 
$0$0  $=$=  $\frac{24}{x^25x+6}$24x2−5x+6 
(Substitute $y=0$y=0) 
$0$0  $\ne$≠  $24$24 

There is no $x$xintersect.
$y$yintersect
$y$y  $=$=  $\frac{24}{x^25x+6}$24x2−5x+6 
(Given) 
$y$y  $=$=  $\frac{24}{(0)^25(0)+6}$24(0)2−5(0)+6 
(Substitute $x=0$x=0) 
$y$y  $=$=  $\frac{24}{6}$246 
(Simplify) 
$y$y  $=$=  $4$4 
(Simplify) 
Third, select $x$x values to the left of asymptote. Sketch graph.
$x$x  $1$1  $2.2$2.2  $2.4$2.4  $2.8$2.8  $4$4  $5$5 

$y$y  $12$12  $150$−150  $100$−100  $150$−150  $12$12  $4$4 
Notice, additional points were selected between the asymptotes to determine the shape of the function with restrictions.
Sketch
Reflect: Notice, the denominator is a quadratic expression and the function behaves as a quadratic when restricted by both vertical asymptotes. Let's explore this phenomenon using the graphic calculator. Graph the following rational function and discuss with a classmate whether a parabola will always appear:
$y=\frac{1}{x^2}$y=1x2
$y=\frac{1}{x^2+1}$y=1x2+1
$$
$$
$y=\frac{4x}{x^225}$y=−4xx2−25
$y=\frac{4x^2}{x^225}$y=−4x2x2−25
Think about the impact the numerator has on the graph of the rational function. Take note of the degree of the numerator and the denominator. Does that have an impact on the graph?
Consider the function $f\left(x\right)=\frac{x}{x\left(x5\right)}$f(x)=xx(x−5)
State the equation of the vertical asymptote.
Consider the function
$y=\frac{15x}{5x^2+4}$y=15x5x2+4
State the equation of the horizontal asymptote.
Graph the function $f\left(x\right)=\frac{2x6}{x+4}$f(x)=2x−6x+4 on the axes below:
The multiplicity of a root is determined by the number of times the associated factor is repeated. For a root at $x=a$x=a with multiplicity $2$2 corresponds to the repeated factor $\left(xa\right)^2$(x−a)2 in $P\left(x\right)$P(x). The multiplicity is represented in the graph by being a turning point of the graph on the $x$xaxis.
For rational functions we must pay attention to whether the multiplicity is even or odd. This is based on the degree of the denominator and whether the denominator multiplicity. For example, the following function has an odd multiplicity:
$y=\frac{1}{x+1}$y=1x+1,
because the degree of the denominator is $1$1 and the denominator has multiplicity of $1$1 for $(x+1)^1$(x+1)1.
Likewise, the following function has an even multiplicity:
$$
because the degree of the denominator is $2$2. and the denominator has multiplicity of $2$2 for $(x+1)^2$(x+1)2.
Now, graphically, odd multiplicity rational functions open on opposite sides of the asymptotes (graph located in top right and bottom left or graph located in bottom right and top left). When the rational function has an even multiplicity, then the graph opens on the same side of the asymptotes (graph located in the top right and top left or graph located in bottom right and bottom left).
Is there a connection between the multiplicity of roots and the odd and even multiplicity of rational functions?
Sketch the rational function given by $y=\frac{2}{x^24x+4}$y=2x2−4x+4.
Think: Notice, we can factor the denominator. Factoring is the first step when applicable. The denominator has a degree of $2$2, however we will not know if it has an even multiplicity until the denominator is factored.
Do: First, factor the denominator.
$x^24x+4$x2−4x+4
$(x2)^2$(x−2)2
The function has an even multiplicity because the degree of the denominator is $2$2 and the denominator can be rewritten to show that $(x2)(x2)$(x−2)(x−2).
Second, find the vertical and horizontal asymptotes and graph.
vertical asymptote: $x=2$x=2
horizontal asymptote: $y=0$y=0, because the degree of the numerator is less than the degree of the denominator.
Third, find $x$x and $y$y intercepts and graph.
$x$xintercept
$y$y  $=$=  $\frac{2}{x2}^2$2x−22 
(Givenfactored denominator) 
$0$0  $=$=  $\frac{2}{x2}^2$2x−22 
(Substitute $y=0$y=0) 
$0$0  $\ne$≠  $2$2 
(Multiply $(x2)^2$(x−2)2 on both sides) 
There is no $x$xintercept. We can skip this part when the horizontal asymptote is $y=0$y=0.
$y$yintercept
$y$y  $=$=  $\frac{2}{x2}^2$2x−22 
(Givenfactored denominator) 
$y$y  $=$=  $\frac{(2}{(0)2}^2$(2(0)−22 
(Substitute $x=0$x=0) 
$y$y  $=$=  $\frac{1}{2}$12 
(Simplify) 
Fourth, select one $x$x value to the right of the vertical asymptote and one to the left. The vertical asymptote is $x=2$x=2
$x$x  $1$1  $3$3 

$y$y  $2$2  $2$2 
{insert graph of $y=\frac{2}{x^24x+4}$y=2x2−4x+4}
Sketch the rational function given by $y=\frac{x+3}{x^29}$y=x+3x2−9
Think: Notice, we can factor the denominator. The denominator has degree of $2$2 but will the function have an even multiplicity?
Do: First, factor the numerator and denominator.
$y=\frac{(x+3)}{(x+3)(x3)}$y=(x+3)(x+3)(x−3)
Remove common factors ($x+3$x+3 ) before determining the vertical and horizontal asymptotes.
$y=\frac{1}{x3}$y=1x−3
Second, find the vertical and horizontal asymptotes.
vertical asymptote: $x=3$x=3
horizontal asymptote: $y=0$y=0
The common factor $x+3$x+3 is removed; however there is $x=3$x=−3 is still not part of the domain. There is a "hole" in the graph at this point; which makes the function discontinuous.
Third, find the $x$x and $y$yintercept.
$x$xintercept  There is no xintercept because the horizontal asymptote is $y=0$y=0
$y$yintersect
$y$y  $=$=  $\frac{1}{x3}$1x−3 
(Givenfactored) 
$y$y  $=$=  $\frac{1}{(0)3}$1(0)−3 
(Substitute $x=0$x=0) 
$y$y  $=$=  $\frac{1}{3}$1−3 
(Simplify) 
Third, select $x$x values to the left of asymptote (i.e., $4$−4 one step from vertical asymptote). We already have a number to the right (the $x$x intercept). Sketch graph.
{insert graph}
Sketch the rational function given by $y=\frac{x2}{x\left(x4\right)}$y=x−2x(x−4).
Think: It has a single root of multiplicity at $x=2$x=2 due to the numerator being set equal to zero: $x2=0$x−2=0 . It also has two odd poles at $x=0$x=0 and $x=4$x=4. due to the denominator being set equal to zero: $x(x4)=0$x(x−4)=0.
Do: First, find the vertical and horizontal asymptotes and graph.
vertical asymptote: $x=0$x=0 and $x=4$x=4
horizontal asymptote: $y=0$y=0
Second, find the $x$x and $y$y intercepts and graph them.
xintercept  Because there are $2$2 asymptotes, we need to test whether is an $x$xintercept between the vertical asymptotes
$y$y  $=$=  $\frac{x2}{x(x4)}$x−2x(x−4) 
(Given) 
$0$0  $=$=  $\frac{x2}{x(x4)}$x−2x(x−4) 
(Substitute $y=0$y=0) 
$0$0  $=$=  $x2$x−2 
(Multiply $x(x4)$x(x−4) on both sides) 
$x$x  $=$=  $2$2 
(Add $2$2 on both sides) 
yintercept
$y$y  $=$=  $\frac{x2}{x(x4)}$x−2x(x−4) 
(Given) 
$y$y  $=$=  $frac(0)2(0)((0)4)$frac(0)−2(0)((0)−4) 
(Substitute $x=0$x=0) 
$y$y  $=$=  $\frac{1}{2}$12 
(Simplify) 
Third, sketch by selecting xvalues one set to the right and left of the vertical asymptotes.
$x$x  $1$−1  $1$1  $3$3  $5$5 

$y$y  $\frac{3}{5}$−35  $\frac{1}{3}$13  $\frac{1}{3}$−13  $\frac{3}{5}$35 
Here is the sketch:
Note also the behavior as $x\rightarrow\pm\infty$x→±∞. Because the degree of $P\left(x\right)$P(x) is less than the degree of $Q\left(x\right)$Q(x), the function approaches $0$0 (and thus the curve approaches the asymptote $y=0$y=0 ) as $x$x becomes more positively large or more negatively large.
Sketch the rational function given by $y=\frac{1}{x^2}$y=1x2.
Think: Because the numerator is the constant $1$1, the function has no roots (it cannot cross the $x$x axis). In the numerator we see an even pole at $x=0$x=0.
As $x\rightarrow\pm\infty$x→±∞, the curve asymptotically approaches the $x$x axis.
The point $\left(1,1\right)$(1,1) verifies that the curve is above the $x$xaxis.
Do: Thus the sketch is straightforward:
Sketch the rational function given by $y=\frac{\left(x2\right)^3}{x^225}$y=(x−2)3x2−25.
Think: We see a root at $x=2$x=2 of multiplicity $3$3, and, because the denominator factors to $\left(x+5\right)\left(x5\right)$(x+5)(x−5), we know that there are two odd poles at $x=\pm5$x=±5.
The degree of the numerator is one higher than that of the denominator, so there we expect an oblique linear asymptote (The exact equation of the asymptote is difficult to determine, but it is accessible by division and is given by the line $y=x6$y=x−6 ).
Do: Here is the sketch:
The following applet allows you to create your own rational function. The equation form for this applet is given by:
$y=\frac{\left(xa\right)^m\left(xb\right)^n}{\left(xc\right)^p\left(xd\right)^q}$y=(x−a)m(x−b)n(x−c)p(x−d)q
where:
Note that if you choose $a=c$a=c, $a=d$a=d, $b=c$b=c or $b=d$b=d, there will be common factors in the numerator and denominator of the rational function and this is likely to result in a less complex shape of the curve.
For example you could create functions like:
Which of the following is the graph of the function $f\left(x\right)=\frac{3x}{x^2+4x5}$f(x)=−3xx2+4x−5?
When dealing with the domain of a rational function, we need to locate any points of discontinuity. As these are points where the function is not defined, we simply solve $Q\left(x\right)=0$Q(x)=0 to find them. If there are no solutions to this equation (and it frequently happens), then there are no points of discontinuity and the curve is said to be continuous across its entire domain.
In most cases if there is a point of discontinuity, the curve will exhibit asymptotic behavior on either side of it.
As a word of caution however, asymptotic behavior is not always guaranteed. This is because some of the solutions to $Q\left(x\right)=0$Q(x)=0 may also be solutions to $P\left(x\right)=0$P(x)=0.
Suppose for example we find a value of $x$x, say $x=h$x=h, where both $Q\left(h\right)=0$Q(h)=0 and $P\left(h\right)=0$P(h)=0. In that case, the curve will, at first glance, look to smoothly cross the line $x=h$x=h without any asymptotic behavior at all. However, what actually exists is a "hole" in the curve at $x=h$x=h. See example 8 below for a demonstration of this.
Find the domain of the function $y=\frac{x^2}{x^21}$y=x2x2−1.
Think: Here, $Q\left(x\right)=x^21$Q(x)=x2−1
Do: So, we simply solve the equation $x^21=0$x2−1=0. The solutions are $x=\pm1$x=±1, so there are two discontinuities to deal with. Neither $x=1$x=1, nor $x=1$x=−1 are solutions to $P\left(x\right)=0$P(x)=0, so the curve will exhibit asymptotic behavior around these points.
The domain is thus given formally as $\left\{x:x\in\Re\setminus x=\pm1\right\}${x:x∈ℜ∖x=±1}. That is to say the domain includes all real numbers except $x=1$x=1 and $x=1$x=−1.
Reflect: Here is the curve showing these discontinuities. Note that domain considerations are only one part of an overall strategy to sketch these functions. Calculus techniques are often needed to ascertain many other features.
Find the domain of the function $y=\frac{x1}{x^2x}$y=x−1x2−x
Think: Since $Q\left(x\right)=x^2x$Q(x)=x2−x, we need to solve $x^2x=0$x2−x=0
Do: So that $x\left(x1\right)=0$x