Section 5.4 Rational Functions
Motivating Questions
What is a rational function?
How can we determine key information about a rational function from its algebraic structure?
Why are rational functions important?
The average rate of change of a function on an interval always involves a ratio. Indeed, for a given function \(f\) that interests us near \(t = 2\text{,}\) we can investigate its average rate of change on intervals near this value by considering
Suppose, for instance, that \(f\) meausures the height of a falling ball at time \(t\) and is given by \(f(t) = 16t^2 + 32t + 48\text{,}\) which happens to be a polynomial function of degree \(2\text{.}\) For this particular function, its average rate of change on \([1,1+h]\) is
Structurally, we observe that \(AV_{[2,2+h]}\) is a ratio of the two functions \(64h  16h^2\) and \(h\text{.}\) Moreover, both the numerator and the denominator of the expression are themselves polynomial functions of the variable \(h\text{.}\) Note that we may be especially interested in what occurs as \(h \to 0\text{,}\) as these values will tell us the average velocity of the moving ball on shorter and shorter time intervals starting at \(t = 2\text{.}\) At the same time, \(AV_{[2,2+h]}\) is not defined for \(h = 0\text{.}\)
Ratios of polynomial functions arise in several different important circumstances. Sometimes we are interested in what happens when the denominator approaches \(0\text{,}\) which makes the overall ratio undefined. In other situations, we may want to know what happens in the long term and thus consider what happens when the input variable increases without bound.
Preview Activity 5.4.1.
A drug company^{ 1 } estimates that to produce a new drug, it will cost $5 million in startup resources, and that once they reach production, each gram of the drug will cost $2500 to make.
Determine a formula for a function \(C(q)\) that models the cost of producing \(q\) grams of the drug. What familiar kind of function is \(C\text{?}\)
The drug company needs to sell the drug at a price of more than $2500 per gram in order to at least break even. To investigate how they might set prices, they first consider what their average cost per gram is. What is the total cost of producing \(1000\) grams? What is the average cost per gram to produce \(1000\) grams?
What is the total cost of producing \(10000\) grams? What is the average cost per gram to produce \(10000\) grams?
Our computations in (b) and (c) naturally lead us to define the “average cost per gram” function, \(A(q)\text{,}\) whose output is the average cost of producing \(q\) grams of the drug. What is a formula for \(A(q)\text{?}\)
Explain why another formula for \(A\) is \(A(q) = 2500 + \frac{5000000}{q}\text{.}\)
What can you say about the longrange behavior of \(A\text{?}\) What does this behavior mean in the context of the problem?
Subsection 5.4.1 Longrange behavior of rational functions
The functions \(AV_{[2,2+h]} = \frac{64h  16h^2}{h}\) and \(A(q) = \frac{5000000 + 2500q}{q}\) are both examples of rational functions, since each is a ratio of polynomial functions. Formally, we have the following definition.
Definition 5.4.1.
A function \(r\) is rational provided that it is possible to write \(r\) as the ratio of two polynomials, \(p\) and \(q\text{.}\) That is, \(r\) is rational provided that for some polynomial functions \(p\) and \(q\text{,}\) we have
Like with polynomial functions, we are interested in such natural questions as
What is the long range behavior of a given rational function?
What is the domain of a given rational function?
How can we determine where a given rational function's value is \(0\text{?}\)
We begin by focusing on the longrange behavior of rational functions. It's important first to recall our earlier work with power functions of the form \(p(x) = x^{n}\) where \(n = 1, 2, \ldots\text{.}\) For such functions, we know that \(p(x) = \frac{1}{x^n}\) where \(n \gt 0\) and that
since \(x^n\) increases without bound as \(x \to \infty\text{.}\) The same is true when \(x \to \infty\text{:}\) \(\lim_{x \to \infty} \frac{1}{x^n} = 0\text{.}\) Thus, any time we encounter a quantity such as \(\frac{1}{x^3}\text{,}\) this quantity will approach \(0\) as \(x\) increases without bound, and this will also occur for any constant numerator. For instance,
since \(2500\) times a quantity approaching \(0\) will still approach \(0\) as \(x\) increases.
Activity 5.4.2.
Consider the rational function \(r(x) = \frac{3x^2  5x + 1}{7x^2 + 2x  11}\text{.}\)
Observe that the largest power of \(x\) that's present in \(r(x)\) is \(x^2\text{.}\) In addition, because of the dominant terms of \(3x^2\) in the numerator and \(7x^2\) in the denominator, both the numerator and denominator of \(r\) increase without bound as \(x\) increases without bound. In order to understand the longrange behavior of \(r\text{,}\) we choose to write the function in a different algebraic form.
Note that we can multiply the formula for \(r\) by the form of \(1\) given by \(1 = \frac{\frac{1}{x^2}}{\frac{1}{x^2}}\text{.}\) Do so, and distribute and simplify as much as possible in both the numerator and denominator to write \(r\) in a different algebraic form.

Having rewritten \(r\text{,}\) we are in a better position to evaluate \(\lim_{x \to \infty} r(x)\text{.}\) Using our work from (a), we have
\begin{equation*} \lim_{x \to \infty} r(x) = \lim_{x \to \infty} \frac{3  \frac{5}{x} + \frac{1}{x^2}}{7 + \frac{2}{x}  \frac{11}{x^2}}\text{.} \end{equation*}What is the exact value of this limit and why?

Next, determine
\begin{equation*} \lim_{x \to \infty} r(x) = \lim_{x \to \infty} \frac{3  \frac{5}{x} + \frac{1}{x^2}}{7 + \frac{2}{x}  \frac{11}{x^2}}\text{.} \end{equation*} Use Desmos to plot \(r\) on the interval \([10,10]\text{.}\) In addition, plot the horizontal line \(y = \frac{3}{7}\text{.}\) What is the meaning of the limits you found in (b) and (c)?
Activity 5.4.3.
Let \(s(x) = \frac{3x  5}{7x^2 + 2x  11}\) and \(u(x) = \frac{3x^2  5x + 1}{7x + 2}\text{.}\) Note that both the numerator and denominator of each of these rational functions increases without bound as \(x \to \infty\text{,}\) and in addition that \(x^2\) is the highest order term present in each of \(s\) and \(u\text{.}\)

Using a similar algebraic approach to our work in Activity 5.4.2, multiply \(s(x)\) by \(1 = \frac{\frac{1}{x^2}}{\frac{1}{x^2}}\) and hence evaluate
\begin{equation*} \lim_{x \to \infty} \frac{3x  5}{7x^2 + 2x  11}\text{.} \end{equation*}What value do you find?
Plot the function \(y = s(x)\) on the interval \([10,10]\text{.}\) What is the graphical meaning of the limit you found in (a)?

Next, use appropriate algebraic work to consider \(u(x)\) and evaluate
\begin{equation*} \lim_{x \to \infty} \frac{3x^2  5x + 1}{7x + 2}\text{.} \end{equation*}What do you find?
Plot the function \(y = u(x)\) on the interval \([10,10]\text{.}\) What is the graphical meaning of the limit you computed in (c)?
We summarize and generalize the results of Activity 5.4.2 and Activity 5.4.3 as follows.
The longterm behavior of a rational function.
Let \(p\) and \(q\) be polynomial functions so that \(r(x) = \frac{p(x)}{q(x)}\) is a rational function. Suppose that \(p\) has degree \(n\) with leading term \(a_n x^n\) and \(q\) has degree \(m\) with leading term \(b_m x^m\) for some nonzero constants \(a_n\) and \(b_m\text{.}\) There are three possibilities (\(n \lt m\text{,}\) \(n = m\text{,}\) and \(n \gt m\)) that result in three different behaviors of \(r\text{:}\)

if \(n \lt m\text{,}\) then the degree of the numerator is less than the degree of the denominator, and thus
\begin{equation*} \lim_{n \to \infty} r(x) = \lim_{n \to \infty} \frac{a_n x^n + \cdots + a_0}{b_m x^m + \cdots + b_0} = 0\text{,} \end{equation*}which tells us that \(y = 0\) is a horizontal asymptote of \(r\text{;}\)

if \(n = m\text{,}\) then the degree of the numerator equals the degree of the denominator, and thus
\begin{equation*} \lim_{n \to \infty} r(x) = \lim_{n \to \infty} \frac{a_n x^n + \cdots + a_0}{b_n x^n + \cdots + b_0} = \frac{a_n}{b_n}\text{,} \end{equation*}which tells us that \(y = \frac{a_n}{b_n}\) (the ratio of the coefficients of the highest order terms in \(p\) and \(q\)) is a horizontal asymptote of \(r\text{;}\)

if \(n \gt m\text{,}\) then the degree of the numerator is greater than the degree of the denominator, and thus
\begin{equation*} \lim_{n \to \infty} r(x) = \lim_{n \to \infty} \frac{a_n x^n + \cdots + a_0}{b_m x^m + \cdots + b_0} = \pm \infty\text{,} \end{equation*}(where the sign of the limit depends on the signs of \(a_n\) and \(b_m\)) which tells us that \(r\) is does not have a horizontal asymptote.
In both situations (a) and (b), the value of \(\lim_{x \to \infty} r(x)\) is identical to \(\lim_{x \to \infty} r(x)\text{.}\)
Subsection 5.4.2 The domain of a rational function
Because a rational function can be written in the form \(r(x) = \frac{p(x)}{q(x)}\) for some polynomial functions \(p\) and \(q\text{,}\) we have to be concerned about the possibility that a rational function's denominator is zero. Since polynomial functions always have their domain as the set of all real numbers, it follows that any rational function is only undefined at points where its denominator is zero.
The domain of a rational function.
Let \(p\) and \(q\) be polynomial functions so that \(r(x) = \frac{p(x)}{q(x)}\) is a rational function. The domain of \(r\) is the set of all real numbers except those for which \(q(x) = 0\text{.}\)
Example 5.4.2.
Determine the domain of the function \(r(x) = \frac{5x^3 + 17x^2  9x + 4}{2x^3  6x^2  8x}\text{.}\)
To find the domain of any rational function, we need to determine where the denominator is zero. The best way to find these values exactly is to factor the denominator. Thus, we observe that
By the Zero Product Property, it follows that the denominator of \(r\) is zero at \(x = 0\text{,}\) \(x = 1\text{,}\) and \(x = 4\text{.}\) Hence, the domain of \(r\) is the set of all real numbers except \(1\text{,}\) \(0\text{,}\) and \(4\text{.}\)
We note that when it comes to determining the domain of a rational function, the numerator is irrelevant: all that matters is where the denominator is \(0\text{.}\)
Activity 5.4.4.
Determine the domain of each of the following functions. In each case, write a sentence to accurately describe the domain.
\(\displaystyle \displaystyle f(x) = \frac{x^21}{x^2 + 1}\)
\(\displaystyle \displaystyle g(x) = \frac{x^2  1}{x^2 + 3x  4}\)
\(\displaystyle \displaystyle h(x) = \frac{1}{x} + \frac{1}{x1} + \frac{1}{x2}\)
\(\displaystyle \displaystyle j(x) = \frac{(x+5)(x3)(x+1)(x4)}{(x+1)(x+3)(x5)}\)
\(\displaystyle \displaystyle k(x) = \frac{2x^2 + 7}{3x^3  12x}\)
\(\displaystyle \displaystyle m(x) = \frac{5x^2  45}{7(x2)(x3)^2(x^2 + 9)(x+1)}\)
Subsection 5.4.3 Applications of rational functions
Rational functions arise naturally in the study of the average rate of change of a polynomial function, leading to expressions such as
We will study several subtle issues that correspond to such functions further in Section 5.5. For now, we will focus on a different setting in which rational functions play a key role.
In Section 5.3, we encountered a class of problems where a key quantity was modeled by a polynomial function. We found that if we considered a container such as a cylinder with fixed surface area, then the volume of the container could be written as a polynomial of a single variable. For instance, if we consider a circular cylinder with surface area \(10\) square feet, then we know that
and therefore \(h = \frac{10  2\pi r^2}{2 \pi r}\text{.}\) Since the cylinder's volume is \(V = \pi r^2 h\text{,}\) it follows that
which is a polynomial function of \(r\text{.}\)
What happens if we instead fix the volume of the container and ask about how surface area can be written as a function of a single variable?
Example 5.4.3.
Suppose we want to construct a circular cylinder that holds \(20\) cubic feet of volume. How much material does it take to build the container? How can we state the amount of material as a function of a single variable?
Neglecting any scrap, the amount of material it takes to construct the container is its surface area, which we know to be
Because we want the volume to be fixed, this results in a constraint equation that enables us to relate \(r\) and \(h\text{.}\) In particular, since
it follows that we can solve for \(h\) and get \(h = \frac{20}{\pi r^2}\text{.}\) Substituting this expression for \(h\) in the equation for surface area, we find that
Getting a common denominator, we can also write \(S\) in the form
and thus we see that \(S\) is a rational function of \(r\text{.}\) Because of the physical context of the problem and the fact that the denominator of \(S\) is \(r\text{,}\) the domain of \(S\) is the set of all positive real numbers.
Activity 5.4.5.
Suppose that we want to build an open rectangular box (that is, without a top) that holds \(15\) cubic feet of volume. If we want one side of the base to be twice as long as the other, how does the amount of material required depend on the shorter side of the base? We investigate this question through the following sequence of prompts.
Draw a labeled picture of the box. Let \(x\) represent the shorter side of the base and \(h\) the height of the box. What is the length of the longer side of the base in terms of \(x\text{?}\)
Use the given volume constraint to write an equation that relates \(x\) and \(h\text{,}\) and solve the equation for \(h\) in terms of \(x\text{.}\)
Determine a formula for the surface area, \(S\text{,}\) of the box in terms of \(x\) and \(h\text{.}\)
Using the constraint equation from (b) together with your work in (c), write surface area, \(S\text{,}\) as a function of the single variable \(x\text{.}\)
What type of function is \(S\text{?}\) What is its domain?
Plot the function \(S\) using Desmos. What appears to be the least amount of material that can be used to construct the desired box that holds \(15\) cubic feet of volume?
Subsection 5.4.4 Summary
A rational function is a function whose formula can be written as the ratio of two polynomial functions. For instance, \(r(x) = \frac{7x^3  5x + 16}{4x^4 + 2x^3  11x + 3}\) is a rational function.

Two aspects of rational functions are straightforward to determine for any rational function. Given \(r(x) = \frac{p(x)}{q(x)}\) where \(p\) and \(q\) are polynomials, the domain of \(r\) is the set of all real numbers except any values of \(x\) for which \(q(x) = 0\text{.}\) In addition, we can determine the longrange behavior of \(r\) by examining the highest order terms in \(p\) and \(q\text{:}\)
if the degree of \(p\) is less than the degree of \(q\text{,}\) then \(r\) has a horizontal asymptote at \(y = 0\text{;}\)
if the degree of \(p\) equals the degree of \(q\text{,}\) then \(r\) has a horizontal asymptote at \(y = \frac{a_n}{b_n}\text{,}\) where \(a_n\) and \(b_n\) are the leading coefficients of \(p\) and \(q\) respectively;
and if the degree of \(p\) is greater than the degree of \(q\text{,}\) then \(r\) does not have a horizontal asymptote.
Two reasons that rational functions are important are that they arise naturally when we consider the average rate of change on an interval whose length varies and when we consider problems that relate the volume and surface area of threedimensional containers when one of those two quantities is constrained.
Exercises 5.4.5 Exercises
1.
2.
3.
4.
5.
6.
7.
8.
9.
For each rational function below, determine the function's domain as well as the exact value of any horizontal asymptote.
\(\displaystyle \displaystyle f(x) = \frac{17x^2 + 34}{19x^2  76}\)
\(\displaystyle \displaystyle g(x) = \frac{29}{53} + \frac{1}{x2}\)
\(\displaystyle \displaystyle h(x) = \frac{431x}{11x  7}\)
\(\displaystyle \displaystyle r(x) = \frac{151(x4)(x+5)^2(x2)}{537(x+5)(x+1)(x^2+1)(x15)}\)
10.
A rectangular box is being constructed so that its base is \(1.5\) times as long as it is wide. In addition, suppose that material for the base and top of the box costs $\(3.75\) per square foot, while material for the sides costs $\(2.50\) per square foot. Finally, we want the box to hold \(8\) cubic feet of volume.
Draw a labeled picture of the box with \(x\) as the length of the shorter side of the box's base and \(h\) as its height.
Determine a formula involving \(x\) and \(h\) for the total surface area, \(S\text{,}\) of the box.
Use your work from (b) along with the given information about cost to determine a formula for the total cost, \(C\text{,}\) oif the box in terms of \(x\) and \(h\text{.}\)
Use the volume constraint given in the problem to write an equation that relates \(x\) and \(h\text{,}\) and solve that equation for \(h\) in terms of \(x\text{.}\)
Combine your work in (c) and (d) to write the cost, \(C\text{,}\) of the box as a function solely of \(x\text{.}\)
What is the domain of the cost function? How does a graph of the cost function appear? What does this suggest about the ideal box for the given constraints?
11.
A cylindrical can is being constructed so that its volume is \(16\) cubic inches. Suppose that material for the lids (the top and bottom) cost $\(0.11\) per square inch and material for the “side” of the can costs $\(0.07\) per square inch. Determine a formula for the total cost of the can as a function of the can's radius. What is the domain of the function and why?
You may find it helpful to ask yourself a sequence of questions like those stated in Exercise 10).