This section covers rational functions and their graphs. You should use the Calculus "arrow" notation as often as possible so that it is not foreign to students once they get into Calculus. Solving rational inequalities by using graphs is also covered (and is a great reinforcement of the need to graph).
To succeed in this section, you'll need to use some skills from previous courses. While you should already know them, this is the first time they've been required. You can review these skills in CRC's Corequisite Codex. If you have a support class, it might cover some, but not all, of these topics.
Prerequisite Skills and Support Topics (click to expand)
Solving Equations
Solving Rational Equations: While not directly solving equations in this section, the process of finding \(x\)-intercepts (setting numerator to zero) and vertical asymptotes/holes (setting denominator to zero) involves solving polynomial equations derived from the rational function.
The following is a list of learning objectives for this section.
Suppose we know that the cost of making a product is dependent on the number of items, \(x\), produced. This is given by the equation \(C(x)=15,000x-0.1 x^2 +1000\). If we want to know the average cost for producing \(x\) items, we would divide the cost function by the number of items, \(x\).
The average cost function, which yields the average cost per item for \(x\) items produced, is \(f(x)= \frac{15,000x-0.1 x^2 +1000}{x} \). Many other application problems require finding an average value in a similar way, giving us variables in the denominator. Written without a variable in the denominator, this function will contain a negative integer power.
In the last few sections, we have worked with polynomial functions, which are functions with non-negative integers for exponents. In this section, we explore rational functions, which have variables in the denominator.
Focus on Calculus - Using Arrow Notation
We have seen the graphs of the basic reciprocal function and the squared reciprocal function from our study of toolkit functions. Let's examine these graphs and notice some of their features.
Figure \( \PageIndex{ 1 } \)
Several things are apparent if we examine the graph of \(f(x)= \frac{1}{x} \).
On the left branch of the graph, the curve approaches the \( x \)-axis (\(y=0\)) as \(x \to – \infty \).
As the graph approaches \(x=0\) from the left (\( x \to 0^- \)), the curve drops (\( f(x) \to -\infty \)), but as we approach zero from the right (\( x \to 0^+ \)), the curve rises (\( f(x) \to \infty \)).
Finally, on the right branch of the graph, the curves approaches the \( x \)-axis (\(y=0\)) as \(x \to \infty \).
To summarize, we use arrow notation to show that \(x\) or \(f(x)\) is approaching a particular value. See Table \( \PageIndex{ 1 } \).
Table \( \PageIndex{ 1 } \)
Defining Arrow Notation
Symbol
Meaning
\(x \to a^-\)
\(x\) approaches \(a\) from the left ( \(x<a\) but close to \(a\) )
\(x \to a^+\)
\(x\) approaches \(a\) from the right ( \(x>a\) but close to \(a\) )
\(x \to \infty\)
\(x\) approaches infinity ( \(x\) increases without bound)
\(x \to - \infty\)
\(x\) approaches negative infinity ( \(x\) decreases without bound)
\(f(x) \to \infty\)
the output approaches infinity (the output increases without bound)
\(f(x) \to - \infty\)
the output approaches negative infinity (the output decreases without bound)
\(f(x) \to a\)
the output approaches \(a\)
Local Behavior of \(f(x)= \frac{1}{x}\)
Let's begin by looking at the reciprocal function, \(f(x) = \frac{1}{x} \). We cannot divide by zero, which means the function is undefined at \(x=0\); so zero is not 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). We can see this behavior in Table \( \PageIndex{ 2 } \).
Table \( \PageIndex{ 2 } \)
Numerical Investigation of \( f(x) = \frac{1}{x} \) as \( x \to 0^- \).
\(x\)
–0.1
–0.01
–0.001
–0.0001
\(f(x)= \frac{1}{x}\)
–10
–100
–1000
–10,000
We would indicate this behavior using the arrow notation: "as \(x \to 0^-\), \(f(x) \to -\infty\)."
On the other hand, as the input values approach zero from the right side (becoming very small, positive values), the function values increase without bound (approaching infinity). We can see this behavior in Table \( \PageIndex{ 3 } \).
Table \( \PageIndex{ 3 } \)
Numerical Investigation of \( f(x) = \frac{1}{x} \) as \( x \to 0^+ \).
\(x\)
0.1
0.01
0.001
0.0001
\(f(x)= \frac{1}{x}\)
10
100
1000
10,000
This is interpreted using the following arrow notation: "as \(x \to 0^+\), \(f(x) \to \infty\)." See Figure \( \PageIndex{ 2 } \).
Figure \( \PageIndex{ 2 } \)
Graphical Investigation of \( f(x) = \frac{1}{x} \).
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\) as the input becomes close to zero. See Figure \( \PageIndex{ 3 } \).
Figure \( \PageIndex{ 3 } \)
Showing the vertical asymptote, \( x = 0 \), for the function \( f(x) = \frac{1}{x} \).
Definition: Vertical Asymptote
A vertical asymptote of a graph is a vertical line \(x = a\) where the graph tends toward positive or negative infinity as the inputs approach \(a\) from either the left or the right. We write\[ \begin{array}{rcll}
f(x) \to \infty & \text{ as } & x \to a^- & \text{ if the graph increases without bound as }x\text{ approaches }a\text{ from the left,} \\[6pt]
f(x) \to -\infty & \text{ as } & x \to a^- & \text{ if the graph decreases without bound as }x\text{ approaches }a\text{ from the left,} \\[6pt]
f(x) \to \infty & \text{ as } & x \to a^+ & \text{ if the graph increases without bound as }x\text{ approaches }a\text{ from the right,} \\[6pt]
& \text{ and } & & \\[6pt]
f(x) \to -\infty & \text{ as } & x \to a^+ & \text{ if the graph decreases without bound as }x\text{ approaches }a\text{ from the right.} \\[6pt]
\end{array} \nonumber \]
End Behavior of \(f(x)= \frac{1}{x}\)
As the values of \(x\) approach infinity, the function values approach \( 0 \). Likewise, as the values of \(x\) approach negative infinity, the function values approach \( 0 \). See Figure \( \PageIndex{ 4 } \). Symbolically, using arrow notation, we write: "as \( x \to \infty\), \(f(x) \to 0\)," and "as \(x \to -\infty\), \(f(x) \to 0\)."
Figure \( \PageIndex{ 4 } \)
Graphical Investigation of \( f(x) = \frac{1}{x} \).
Based on this overall behavior (and the graph), we can see that the function approaches \( 0 \) but never actually reaches \( 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\). See Figure \( \PageIndex{ 5 } \).
Figure \( \PageIndex{ 5 } \)
Showing the vertical and horizontal asymptotes for the function \( f(x) = \frac{1}{x} \).
Definition: Horizontal Asymptote
A horizontal asymptote of a graph is a horizontal line \(y=b\) where the graph approaches the line as the inputs increase or decrease without bound. We write\[ \begin{array}{rcll}
f(x) \to b & \text{ as } & x \to \infty & \text{ if the graph approaches the line }y = b\text{ as }x\text{ increases without bound} \\[6pt]
& \text{ and } & & \\[6pt]
f(x) \to b & \text{ as } & x \to -\infty & \text{ if the graph approaches the line }y = b\text{ as }x\text{ decreases without bound.} \\[6pt]
\end{array} \nonumber \]
Example \( \PageIndex{ 1 } \): Using Arrow Notation
Use arrow notation to describe the end behavior and local behavior of the function graphed in Figure \( \PageIndex{ 6 } \).
Figure \( \PageIndex{ 6 } \)
A transformation of \( y = \frac{1}{x} \).
Solution
Notice that the graph is showing a vertical asymptote at \(x=2\), which tells us that the function is undefined at \(x=2\). We can see that as \(x \to 2^-\), \(f(x) \to -\infty\), and as \( x \to 2^+\), \(f(x) \to \infty\). Moreover, as the inputs decrease without bound, the graph appears to be leveling off at output values of \( 4 \), indicating a horizontal asymptote at \(y=4\). Likewise, as the inputs increase without bound, the graph levels off at \( 4 \). That is, \( f(x) \to 4 \) as \( x \to \pm \infty\).
Checkpoint \( \PageIndex{ 1 } \)
Use arrow notation to describe the end behavior and local behavior for the reciprocal squared function.
Example \( \PageIndex{ 2 } \): Using Transformations to Graph a Rational Function
Sketch a graph of the reciprocal function shifted two units to the left and up three units. Identify the horizontal and vertical asymptotes of the graph, if any.
Solution
Shifting the graph left \( 2 \) and up \( 3 \) would result in the function\[f(x)= \dfrac{1}{x+2} +3 \nonumber \]or equivalently, by giving the terms a common denominator,\[f(x) = \dfrac{3x+7}{x+2}. \nonumber \]The graph of the shifted function is displayed in Figure \( \PageIndex{ 7 } \).
Figure \( \PageIndex{ 7 } \)
The graph of \( f(x) = \frac{1}{x + 2} + 3 \).
As \(x \to - 2^-\), \(f(x) \to - \infty\). Therefore, the graph has a vertical asymptote at \(x=-2\). We could have arrived at this same conclusion by considering that \(f(x) \to \infty\) as \(x \to - 2^+\).
As \( x \to \pm \infty \), \(f(x) \to 3\). Thus, the graph has a horizontal asymptote at \(y=3\).
Notice that horizontal and vertical asymptotes are shifted left 2 and up 3 along with the function.
Checkpoint \( \PageIndex{ 2 } \)
Sketch the graph, and find the horizontal and vertical asymptotes of the reciprocal squared function that has been shifted right \( 3 \) units and down \( 4 \) units.
In Example \( \PageIndex{ 2 } \), we shifted a toolkit function in a way that resulted in the function \(f(x)= \frac{3x+7}{x+2} \). This is an example of a rational function. A rational function is a function that can be written as the quotient of two polynomial functions. Many real-world problems require us to find the ratio of two polynomial functions. Problems involving rates and concentrations often involve rational functions.
Definition: Rational Function
A rational function is a function that can be written as the quotient of two polynomial functions \(P(x)\) and \(Q(x)\).\[f(x)= \dfrac{P(x)}{Q(x)} = \dfrac{a_p x^p + a_{p-1} x^{p-1} + \ldots + a_1 x + a_0}{b_q x^q + b_{q-1} x^{q-1} + \ldots + b_1 x + b_0}, \text{ where } Q(x) \neq 0. \nonumber \]
Example \( \PageIndex{ 3 } \): Solving an Applied Problem Involving a Rational Function
A large mixing tank currently contains \( 100 \) gallons of water into which \( 5 \) pounds of sugar have been mixed. A tap will open pouring \( 10 \) gallons per minute of water into the tank at the same time sugar is poured into the tank at a rate of \( 1 \) pound per minute. Find the concentration (pounds per gallon) of sugar in the tank after \( 12 \) minutes. Is that a greater concentration than at the beginning?
Solution
Let \(t\) be the number of minutes since the tap opened. Since the water flows in at \( 10 \) gallons per minute, and the sugar is poured in at \( 1 \) pound per minute, these are constant rates of change. This tells us the amount of water in the tank is changing linearly, as is the amount of sugar in the tank. We can write an equation independently for each:\[ \begin{array}{rl} \text{water: } & W(t) =100+10t \text{ in gallons} \\[6pt] \text{sugar: } & S(t)=5+1t \text{ in pounds} \\[6pt] \end{array} \nonumber \]The concentration, \(C\), will be the ratio of pounds of sugar to gallons of water\[C(t)= \dfrac{5+t}{100+10t}. \nonumber \]The concentration after \( 12 \) minutes is given by evaluating \(C( t )\) at \(t=12\).\[C(12)= \dfrac{5+12}{100+10(12)} = \dfrac{17}{220}. \nonumber \]This means the concentration is \( 17 \) pounds of sugar to \( 220 \) gallons of water.
At the beginning, the concentration is\[C(0)= \dfrac{5+0}{100+10(0)} = \dfrac{1}{20}. \nonumber \]Since \( \frac{17}{220} \approx 0.08 > \frac{1}{20} = 0.05\), the concentration is greater after \( 12 \) minutes than at the beginning.
In Example \( \PageIndex{ 3 } \), we found the horizontal asymptote by dividing the leading coefficient in the numerator by the leading coefficient in the denominator, which led to \(y = \frac{1}{10} =0.1 \). This means the concentration, \(C\), the ratio of pounds of sugar to gallons of water, will approach \( 0.1 \) in the long term.
Checkpoint \( \PageIndex{ 3 } \)
There are \( 1,200 \) freshmen and \( 1,500 \) sophomores at a prep rally at noon. After 12 p.m., \( 20 \) freshmen arrive at the rally every five minutes while \( 15 \) sophomores leave the rally. Find the ratio of freshmen to sophomores at 1 p.m.
While not a true "application," finding the Difference Quotient (as we have been stating over and over again) is something you will repeatedly need to do in Calculus. Let's revisit that topic right now.
Example \(\PageIndex{4}\): Revisiting the Difference Quotient
Find the Difference Quotient of the following function.\[ R(t) = \dfrac{2t - 1}{3t + 7} \nonumber \]
With difference quotients, you will commonly need to multiply the numerator and denominator of an expression by the LCD of all fractions within a compound fraction (a.k.a. simplifying compound fractions). When doing so, knowing what to distribute and what not to distribute is imperative.
Simplifying Compound Fractions
The entire point of multiplying the numerator and denominator of your compound fraction by the LCD of all the minor fractions is to "get rid of" denominators in those minor fractions; however, with difference quotients, it is common that the denominator of the entire (major) fraction is only \( h \). In this case, do not distribute out the denominator! Doing so will complicate the mathematics, and you will lose visibility of factors that cancel.
Finding the Domains of Rational Functions
A vertical asymptote represents a value at which a rational function is undefined, so that value is not in the domain of the function. A reciprocal function cannot have values in its domain that cause the denominator to equal zero. In general, to find the domain of a rational function, we need to determine which inputs would cause division by zero.
Theorem: Domain of a Rational Function
The domain of a rational function includes all real numbers except those that cause the denominator of the unsimplified rational function to equal zero.
Caution: Domain is Always Considered Prior to Simplifications
A common mistake is for students to simplify or otherwise perform Algebra on an expression and then state the domain. In this simplification process, you might "remove" a domain issue that originally existed. Therefore, you need to state the domain prior to simplifying the function.
For example, if \( f(x) = \frac{x + 2}{(x + 2)(x + 3)} \), you would need to state the domain of the function prior to simplifying. In this case, \( x = -2 \) and \( x = -3 \) cause division by zero. Therefore, the domain is \( \left( -\infty, -3 \right) \cup \left( -3,-2 \right) \cup \left( -2, \infty \right) \).
Had you simplified the function first, you would have arrived at\[ f(x) = \dfrac{x + 2}{(x + 2)(x + 3)} = \dfrac{1}{x + 3}, \nonumber \]and you would have (incorrectly) stated the domain as \( \left( -\infty, -3 \right) \cup \left( -3,\infty \right) \). In truth, \( f(x) \) is not equal to \( \frac{1}{x+3} \) because, if it were, we would be able to evaluate \( f(-2) \). However, looking at the original function, evaluating \( f \) at \( x = -2 \) causes division by zero!
Example \( \PageIndex{ 5 } \): Finding the Domain of a Rational Function
Find the domain of \(f(x)= \frac{x+3}{x^2 -9} \).
Solution
Begin by setting the denominator equal to zero and solving.\[ \begin{array}{rrcl} & x^2 - 9 & = & 0 \\[6pt] \implies & x^2 & = & 9 \\[6pt] \implies & x & = & \pm 3 \\[6pt] \end{array} \nonumber \]The denominator is equal to zero when \(x= \pm 3\). The domain of the function is all real numbers except \(x= \pm 3\). Writing this in interval notation, we say the domain of \( f \) is \( \left( -\infty,-3 \right) \cup \left( -3,3 \right) \cup \left( 3,\infty \right)\).
A graph of the function from Example \( \PageIndex{ 5 } \) is shown in Figure \( \PageIndex{ 8 } \). It confirms that the function is not defined when \(x= \pm 3\).
Figure \( \PageIndex{ 8 } \)
Graph of \( f(x) = \frac{x + 3}{x^2 + 9} \).
There is a vertical asymptote at \(x=3\) and a hole in the graph at \(x=-3\). We will discuss these types of holes in greater detail later in this section.
Checkpoint \( \PageIndex{ 5 } \)
Find the domain of \(f(x)= \frac{4x}{5(x-1)(x-5)} \).
Identifying Vertical Asymptotes of Rational Functions
By looking at the graph of a rational function, we can investigate its local behavior and easily see whether there are asymptotes. We may even be able to approximate their location. Even without the graph, however, we can still determine whether a given rational function has any asymptotes, and calculate their location.
Vertical Asymptotes
The vertical asymptotes of a rational function may be found by examining the factors of the denominator that are not common to the factors in the numerator. Vertical asymptotes occur at the zeros of such factors.
Example \( \PageIndex{ 6 } \): Identifying Vertical Asymptotes
Find the vertical asymptotes of the graph of \(k(x) = \frac{5 + 2 x^2}{2 - x - x^2} \).
Solution
First, factor the numerator and denominator.\[ \begin{array}{rcl} k(x) & = & \dfrac{5 + 2 x^2}{2 - x - x^2} \\[6pt] & = & \dfrac{5 + 2 x^2}{(2+x)(1-x)} \\[6pt] \end{array} \nonumber \]To find the vertical asymptotes, we determine where this function will be undefined by setting the denominator equal to zero:\[ \begin{array}{rrcl} & (2+x)(1-x) & = & 0 \\[6pt] \implies & x & = & -2,1 \\[6pt] \end{array} \nonumber \]Neither \(x=–2\) nor \(x=1\) are zeros of the numerator, so the two values indicate two vertical asymptotes. The graph in Figure \( \PageIndex{ 9 } \) confirms the location of the two vertical asymptotes.
Figure \( \PageIndex{ 9 } \)
Graph of \( k(x) = \frac{5 + 2x^2}{2 - x - x^2} \).
Removable Discontinuities
Occasionally, a graph will contain a hole.
Definition: Removable Discontinuity
A single point where the graph of a function is not defined, indicated by an open circle on the graph, is called a removable discontinuity.
For example, the function \(f(x) = \frac{x^2 -1}{x^2 - 2x -3}\) may be rewritten by factoring the numerator and the denominator.\[f(x) = \dfrac{( x+1 )( x-1 )}{( x+1 )( x-3 )}. \nonumber \]Notice that \(x+1\) is a common factor to the numerator and the denominator. The zero of this factor, \(x=-1\), is the location of the removable discontinuity. Notice also that \(x–3\) is not a factor in both the numerator and denominator. The zero of this factor, \(x=3\), is the vertical asymptote. See Figure \( \PageIndex{ 10 } \).
Figure \( \PageIndex{ 10 } \)
Showcasing the removable discontinuity for the graph of the function \( f(x) = \frac{x^2 - 1}{x^2 - 2x - 3} \).
Definition: Removable Discontinuity of a Rational Function
A removable discontinuity for the graph of a rational function occurs at \(x=a\) if
\(a\) is a zero for a factor in the denominator that is common with a factor in the numerator, and
after simplification, \( a \) is no longer a zero of the denominator.
Proof
The most elegant proof of this theorem occurs in Calculus.
An clean way to summarize this theorem is to first factor the numerator and denominator and check for common factors. If we find any, we set the common factor equal to \( 0 \) and solve. This \( x \)-value leads to a removable discontinuity if the multiplicity of the factor in the numerator is greater than or equal to that in the denominator. If the multiplicity of the factor is greater in the denominator, then there is still an asymptote at that value.
Example \( \PageIndex{ 7 } \): Identifying Vertical Asymptotes and Removable Discontinuities for a Graph
Find the vertical asymptotes and removable discontinuities of the graph of \(k(x)= \frac{x-2}{x^2 -4} \).
Solution
Factor the numerator and the denominator.\[k(x)= \dfrac{x-2}{(x-2)(x+2)}. \nonumber \]Notice that there is a common factor in the numerator and the denominator, \(x–2\). The zero for this factor is \(x=2\). This is the location of the removable discontinuity.
Notice that there is a factor in the denominator that is not in the numerator, \(x+2\). The zero for this factor is \(x=-2\). Therefore, the vertical asymptote is \(x=-2\). See Figure \( \PageIndex{ 11 } \).
Figure \( \PageIndex{ 11 } \)
Graph of \( k(x) = \frac{x - 2}{x^2 - 4} \) showing the vertical asymptote and removable discontinuity.
The graph of this function will have the vertical asymptote at \(x=-2\), but at \(x=2\) the graph will have a hole.
Checkpoint \( \PageIndex{ 7 } \)
Find the vertical asymptotes and removable discontinuities of the graph of \(f(x)= \frac{x^2 -25}{x^3 - 6 x^2 +5x} \).
Identifying End Behavior of Rational Functions
As we have discussed, horizontal asymptotes help describe the behavior of a graph as the input gets infinitely large (either positive or negative); however, it is possible that the graph of a function doesn't tend to a horizontal line as \( x \to \pm \infty \). In fact, there are an infinite number of cases in which graphs tend to non-horizontal lines or, in more advanced cases, other higher-degreed functions. Therefore, rather than speaking of identifying "horizontal asymptotes" of graphs, it's best to keep things general and speak of the end behavior of a graph.
Definition: End Behavior
The end behavior of a graph is a description, usually as a function, of what the function values of the graph tend to approach as the inputs increase or decrease without bound.
For example, the function \( f(x) = 3x + 1 + \frac{1}{x} \) is the solid curve graphed in Figure \( \PageIndex{ 12 } \).
Figure \( \PageIndex{ 12 } \)
Graph of \( f(x) = 3x + 1 + \frac{1}{x} \) showcasing a slant asymptote.
As \( x \to \pm \infty \), the graph quickly begins to "mimic" the dashed line, which happens to have equation \( y = 3x + 1 \). Why does this happen? The third term of the \( f(x) \), which is \( \frac{1}{x} \), tends to 0 (it tends to disappear) as \( x \to \pm \infty \). This forces \( f(x) \) to eventually "mimic" what doesn't disappear (specifically, \( y = 3x + 1 \)). Hence, we would say that the end behavior of \( f(x) = 3x + 1 + \frac{1}{x} \) is \( y = 3x + 1 \). This type of end behavior is called a slant asymptote because it is a line.
With this stated, we can see that a horizontal asymptote is a type of end behavior, but it is not the only type. Our goal at this point is to discover the types of end behaviors a rational function might have.
Recall that a polynomial's end behavior will mirror that of the leading term. Likewise, a rational function's end behavior will mirror that of the ratio of the leading terms of the numerator and denominator functions. There are three distinct outcomes when checking for the end behavior of a rational function; however, let's define a new notation that will simplify some of our discussion.
Definition: Polynomial Degree Notation
The degree of a polynomial \( f(x) \) is denoted \( \deg(f(x)) \).
For example, \( \deg(1 - x^{17} + x) = 17 \).
With that definition, we are ready to explore the end behavior possibilities of rational functions. We begin by letting \( f(x) = \frac{N(x)}{D(x)} \) , where \( N \) and \( D \) are polynomials and \( D(x) \neq 0 \).
Case 1 (\( \deg(D(x)) > \deg(N(x)) \))
Consider the function \( f(x) = \frac{4x+2}{x^2 + 4x - 5} \). A little Algebra goes a long way:\[ \begin{array}{rclcl}
\dfrac{4x+2}{x^2 + 4x - 5} & = & \dfrac{\frac{1}{x^2}}{\frac{1}{x^2}} \cdot \dfrac{4x+2}{x^2 + 4x - 5} & \quad & \left( \text{multiplying numerator and denominator by }\frac{1}{x^2} \right) \\[6pt]
& = & \dfrac{\frac{4}{x}+\frac{2}{x^2}}{1 + \frac{4}{x} - \frac{5}{x^2}} & \quad & \left( \text{distributing} \right) \\[6pt]
\end{array} \nonumber \]As \( x \to \pm \infty \), all expressions of the form \( \frac{\text{constant}}{x} \) and \( \frac{\text{constant}}{x^2} \) will tend to 0. Thus, as \( x \to \pm \infty \), \( f(x) \to \frac{0 + 0}{1 + 0 + 0} = \frac{0}{1} = 0 \). That is, \( y = 0 \) is a horizontal asymptote for \( f(x) \). See Figure \( \PageIndex{ 13 } \). Note that this graph crosses the horizontal asymptote.
Figure \( \PageIndex{ 13 } \)
Horizontal Asymptote \(y=0\) when \(f(x) = \frac{N(x)}{D(x)}\), where \(D(x) \neq 0\) and \(\deg(N(x)) < \deg(D(x))\).
Case 2 \( \deg(D(x)) < \deg(N(x)) \) (by 1)
In this textbook, we will only consider the possibility of the numerator being one degree more than the denominator. Your instructor might spend a few minutes of class time to discuss what happens when the difference of degrees between numerator and denominator is greater than 1, but that is not a major topic in Calculus.
Consider the function \(f(x) = \frac{3 x^2 - 2x + 1}{x-1}\). Since we can think of this as an improper fraction (where the numerator might be somewhat divisible by the denominator), we perform synthetic division to arrive at\[ \dfrac{3x^2 - 2x + 1}{x - 1} = 3x + 1 + \dfrac{2}{x - 1}. \nonumber \]As \( x \to \pm \infty \), the expression \( \frac{2}{x - 1} \to 0 \). Therefore, our function will "mimic" \( y = 3x + 1 \). That is, \( f(x) \to 3x + 1 \) as \( x \to \pm \infty \). Thus, the line \(y=3x+1\) is a slant asymptote of \( f(x) \) (see Figure \( \PageIndex{ 14 } \)).
Figure \( \PageIndex{ 14 } \)
Slant Asymptote when \(f(x) = \frac{N(x)}{D(x)}\), where \(D(x) \neq 0\) and \(\deg(N(x)) > \deg(D(x))\) by 1.
Case 3 \( \deg(D(x)) = \deg(N(x)) \)
Consider the function \(f(x) = \frac{3 x^2 +2}{x^2 +4x-5} \). Performing some Algebra, we get\[ \begin{array}{rclcl}
\dfrac{3 x^2 +2}{x^2 +4x-5} & = & \dfrac{\frac{1}{x^2}}{\frac{1}{x^2}} \cdot \dfrac{3 x^2 +2}{x^2 +4x-5} & \quad & \left( \text{multiplying numerator and denominator by }\frac{1}{x^2} \right) \\[6pt]
& = & \dfrac{3 + \frac{2}{x^2}}{1 + \frac{4}{x} - \frac{5}{x^2}} & \quad & \left( \text{distributing} \right) \\[6pt]
\end{array} \nonumber \]As \( x \to \pm \infty \), all expressions of the form \( \frac{\text{constant}}{x} \) and \( \frac{\text{constant}}{x^2} \) will tend to 0. Thus, as \( x \to \pm \infty \), \( f(x) \to \frac{3 + 0}{1 + 0 - 0} = \frac{3}{1} = 3 \). That is, \( y = 3 \) is a horizontal asymptote for \( f(x) \). See Figure \( \PageIndex{ 15 } \). Again, note that this graph crosses the horizontal asymptote.
Figure \( \PageIndex{ 15 } \)
Horizontal Asymptote when \(f(x) = \frac{N(x)}{D(x)}\), where \(D(x) \neq 0\) and \(\deg(N(x)) = \deg(D(x))\).
Notice that, while the graph of a rational function will never cross a vertical asymptote, the graph may or may not cross a horizontal or slant asymptote. Also, although the graph of a rational function may have many vertical asymptotes, the graph of a rational function will have at most one horizontal (or slant) asymptote. As an aside, there exist non-rational functions that have two horizontal or slant asymptotes (and there are some that have both a horizontal and a slant asymptote); however, we are only focusing our attention on rational functions for this discussion.
Theorem: End Behavior of a Rational Function
Let \( f(x) = \frac{N(x)}{D(x)} \) be a rational function. Then
\( f(x) \) has a horizontal asymptote of \( y = 0 \) if \( \deg(D(x)) > \deg(N(x)) \)
\( f(x) \) has a horizontal asymptote of \( y = \frac{a}{b} \) if \( \deg(D(x)) = \deg(N(x)) \), where \( a \) is the lead coefficient of \( N(x) \) and \( b \) is the lead coefficient of \( D(x) \)
\( f(x) \) has a slant or oblique asymptote if \( \deg(D(x)) < \deg(N(x)) \). The asymptote is a slant asymptote if \( \deg(N(x)) = \deg(D(x)) + 1 \); otherwise, it is an oblique asymptote. In either case, the equation of the asymptote is the quotient after dividing \( N(x) \) by \( D(x) \).
Example \( \PageIndex{ 8 } \): Identifying Horizontal and Slant Asymptotes
For the functions below, identify the horizontal or slant asymptote.
\(g(x) = \frac{6 x^3 -10x}{2 x^3 +5 x^2}\)
\(h(x)= \frac{x^2 -4x+1}{x+2}\)
\(k(x)= \frac{x^2 +4x}{x^3 -8}\)
Solution
For these solutions, we will let \( p(x) \) represent the numerator and \( q(x) \) the denominator.
The degree of \(p\) is equal to the degree of \(q\) (\(3\)) so we can find the horizontal asymptote by taking the ratio of the leading terms. There is a horizontal asymptote at \(y = \frac{6}{2} \) or \(y=3\).
The degree of \( p \) is greater than the degree of \( q \) by \( 1 \). Therefore, this rational function has a slant asymptote. To find the equation of the slant asymptote, we divide \( \frac{x^2 - 4x + 1}{x + 2} \). This is easily done using synthetic division.\[\begin{array}{r}
\underline{-2} \mid & 1 & -4 & 1 \\
& & -2 & 12 \\
\hline & 1 & -6 & 13 \\
\end{array}\nonumber \]The quotient is \( x - 6 \) and the remainder is \( 13 \). Thus, the equation of the slant asymptote is \( y = x - 6 \).
The degree of \(p\) is less than the degree of \(q\), so there is a horizontal asymptote at \(y=0\).
Example \( \PageIndex{ 9 } \): Identifying Horizontal Asymptotes
In the sugar concentration problem earlier, we created the equation \(C(t)= \frac{5+t}{100+10t} \).
Find the horizontal asymptote and interpret it in context of the problem.
Solution
Both the numerator and denominator are linear (degree \( 1 \)). Because the degrees are equal, there will be a horizontal asymptote at the ratio of the leading coefficients. In the numerator, the leading term is \(t\), with coefficient \( 1 \). In the denominator, the leading term is \(10t\), with coefficient \( 10 \). The horizontal asymptote will be at the ratio of these values:\[t \to \infty \implies C(t) \to \dfrac{1}{10}. \nonumber \]This function will have a horizontal asymptote at \(y= \frac{1}{10} \).
This tells us that as the values of \( t \) increase, the values of \(C\) will approach \( \frac{1}{10} \). In context, this means that, as more time goes by, the concentration of sugar in the tank will approach one-tenth of a pound of sugar per gallon of water or \( \frac{1}{10}\) pounds per gallon.
Example \( \PageIndex{ 10 } \): Identifying Horizontal and Vertical Asymptotes
Find the horizontal and vertical asymptotes of the function\[f(x)= \dfrac{(x-2)(x+3)}{(x-1)(x+2)(x-5)} \nonumber \]
Solution
First, note that this function has no common factors, so there are no potential removable discontinuities.
The function will have vertical asymptotes when the denominator is zero, causing the function to be undefined. The denominator will be zero at \(x=1\) ,\( –2 \), and \(5\), indicating vertical asymptotes at these values.
The numerator has degree \( 2 \), while the denominator has degree \( 3 \). Since the degree of the denominator is greater than the degree of the numerator, the denominator will grow faster than the numerator, causing the outputs to tend towards zero as the inputs get large, and so as \(x \to \pm \infty\), \(f(x) \to 0\). This function will have a horizontal asymptote at \(y=0\). See Figure \( \PageIndex{ 16 } \).
Figure \( \PageIndex{ 16 } \)
Graph of \(f(x)= \frac{(x-2)(x+3)}{(x-1)(x+2)(x-5)}\).
Checkpoint \( \PageIndex{ 10 } \)
Find the vertical and horizontal asymptotes of the function:\[ f(x)= \dfrac{(2x-1)(2x+1)}{(x-2)(x+3)} \nonumber \]
Like all functions, a rational function will have a \( y \)-intercept when the input is zero, if the function is defined at zero. A rational function will not have a \( y \)-intercept if the function is not defined at zero. Likewise, a rational function will have \( x \)-intercepts at the inputs that cause the output to be zero; however, since a fraction is only equal to zero when the numerator is zero, \( x \)-intercepts can only occur when the numerator of the rational function is equal to zero.
Example \( \PageIndex{ 11 } \): Finding the Intercepts of a Rational Function
Find the intercepts of \(f(x)= \frac{(x-2)(x+3)}{(x-1)(x+2)(x-5)} \).
Solution
We can find the \( y \)-intercept by evaluating the function at zero\[f(0) = \dfrac{(0-2)(0+3)}{(0-1)(0+2)(0-5)} = \dfrac{-6}{10} = -\dfrac{3}{5} = -0.6. \nonumber \]The \( x \)-intercepts will occur when the function is equal to zero:\[ \begin{array}{rrclcl} & 0 & = & \dfrac{(x-2)(x+3)}{(x-1)(x+2)(x-5)} & & \\[6pt] \implies & 0 & = & (x - 2)(x + 3) & \quad & \left( \text{a fraction is zero only when the numerator is zero} \right) \\[6pt] \end{array} \nonumber \]This happens when \( x = 2 \) or when \( x = -3 \). Therefore, the \( y \)-intercept is \((0,–0.6)\), and the \( x \)-intercepts are \((2,0)\) and \((–3,0)\). See Figure \( \PageIndex{ 17 } \).
Figure \( \PageIndex{ 17 } \)
Graph of \( f(x)= \frac{(x-2)(x+3)}{(x-1)(x+2)(x-5)} \)
Checkpoint \( \PageIndex{ 11 } \)
Given the reciprocal squared function that is shifted right \( 3 \) units and down \( 4 \) units, write this as a rational function. Then, find the \( x \)- and \( y \)-intercepts and the horizontal and vertical asymptotes.
Graphing Rational Functions
In Example \( \PageIndex{ 10 } \), we see that the numerator of a rational function reveals the \( x \)-intercepts of the graph, whereas the denominator reveals the vertical asymptotes of the graph. As with polynomials, factors of the numerator may have integer powers greater than one. Fortunately, the effect on the shape of the graph at those intercepts is the same as we saw with polynomials.
The vertical asymptotes associated with the factors of the denominator will mirror one of the two toolkit reciprocal functions. When the degree of the factor in the denominator is odd, the distinguishing characteristic is that on one side of the vertical asymptote the graph heads towards positive infinity, and on the other side the graph heads towards negative infinity. See Figure \( \PageIndex{ 18 } \).
Figure \( \PageIndex{ 18 } \)
Graph of the toolkit function \( y = \frac{1}{x} \).
When the degree of the factor in the denominator is even, the distinguishing characteristic is that the graph either heads toward positive infinity on both sides of the vertical asymptote or heads toward negative infinity on both sides. See Figure \( \PageIndex{ 19 } \).
Figure \( \PageIndex{ 19 } \)
Graph of the toolkit function \( y = \frac{1}{x^2} \).
For example, the graph of \(f(x)= \frac{(x+1)^2 (x-3)}{(x+3)^2 (x-2)}\) is shown in Figure \( \PageIndex{ 20 } \).
At the \( x \)-intercept \(x=-1\) corresponding to the \((x+1)^2\) factor of the numerator, the graph bounces (like a parabola), consistent with the quadratic nature of the factor.
At the \( x \)-intercept \(x=3\) corresponding to the \((x-3)\) factor of the numerator, the graph passes through the axis (like a line) as we would expect from a linear factor.
At the vertical asymptote \(x=-3\) corresponding to the \((x+3)^2\) factor of the denominator, the graph heads towards positive infinity on both sides of the asymptote, consistent with the behavior of the function \(f(x)= \frac{1}{x^2} \).
At the vertical asymptote \(x=2\), corresponding to the \((x-2)\) factor of the denominator, the graph heads towards positive infinity on the left side of the asymptote and towards negative infinity on the right side, consistent with the behavior of \( f(x) = \frac{1}{x} \).
How To: Graph a rational function
Evaluate the function at \( 0 \) to find the \( y \)-intercept.
Factor the numerator and denominator.
For factors in the numerator not common to the denominator, determine where each factor of the numerator is zero to find the \( x \)-intercepts.
Find the multiplicities of the \( x \)-intercepts to determine the behavior of the graph at those points.
For factors in the denominator, note the multiplicities of the zeros to determine the local behavior. For those factors not common to the numerator, find the vertical asymptotes by setting those factors equal to zero and then solve.
For factors in the denominator common to factors in the numerator, find the removable discontinuities by setting those factors equal to 0 and then solve.
Compare the degrees of the numerator and the denominator to determine the horizontal or slant asymptotes.
Sketch the graph.
Example \( \PageIndex{ 12 } \): Graphing a Rational Function
Sketch a graph of \(f(x)= \frac{(x+2)(x-3)}{(x+1)^2 (x-2)} \).
Solution
We can start by noting that the function is already factored, saving us a step.
Next, we will find the intercepts. Evaluating the function at zero gives the \( y \)-intercept:\[ f(0) = \dfrac{(0+2)(0-3)}{(0+1)^2 (0-2)} = 3. \nonumber \]To find the \( x \)-intercepts, we determine when the numerator of the function is zero. Setting each factor equal to zero, we find \( x \)-intercepts at \(x=–2\) and \(x=3\). At each, the behavior will be linear (multiplicity \( 1 \)), with the graph passing through the intercept.
We have a \( y \)-intercept at \((0,3)\) and \( x \)-intercepts at \((–2,0)\) and \((3,0)\).
To find the vertical asymptotes, we determine when the denominator is equal to zero. This occurs when \(x+1=0\) and when \(x–2=0\), giving us vertical asymptotes at \(x=–1\) and \(x=2\).
There are no common factors in the numerator and denominator. This means there are no removable discontinuities.
Finally, the degree of denominator is larger than the degree of the numerator, telling us this graph has a horizontal asymptote at \(y=0\).
To sketch the graph, we might start by plotting the three intercepts. Since the graph has no \( x \)-intercepts between the vertical asymptotes, and the \( y \)-intercept is positive, we know the function must remain positive between the asymptotes, letting us fill in the middle portion of the graph as shown in Figure \( \PageIndex{ 21 } \).
Figure \( \PageIndex{ 21 } \)
An unfinished graph of \(f(x)= \frac{(x+2)(x-3)}{(x+1)^2 (x-2)} \) (the middle portion).
The factor associated with the vertical asymptote at \(x=-1\) was squared, so we know the behavior will be the same on both sides of the asymptote. The graph heads toward positive infinity as the inputs approach the asymptote on the right, so the graph will head toward positive infinity on the left as well.
For the vertical asymptote at \(x=2\), the factor was not squared, so the graph will have opposite behavior on either side of the asymptote. See Figure \( \PageIndex{ 22 } \). After passing through the \( x \)-intercepts, the graph will then level off toward an output of zero, as indicated by the horizontal asymptote.
Figure \( \PageIndex{ 22 } \)
Graph of \(f(x)= \frac{(x+2)(x-3)}{(x+1)^2 (x-2)} \).
Checkpoint \( \PageIndex{ 12 } \)
Given the function \(f(x)= \frac{(x+2)^2 (x-2)}{ 2(x-1)^2 (x-3)} \), use the characteristics of polynomials and rational functions to describe its behavior and sketch the function.
Writing Rational Functions
Now that we have analyzed the equations for rational functions and how they relate to a graph of the function, we can use information given by a graph to write the function. A rational function written in factored form will have an \( x \)-intercept where each factor of the numerator is equal to zero. (An exception occurs in the case of a removable discontinuity.) As a result, we can form a numerator of a function whose graph will pass through a set of \( x \)-intercepts by introducing a corresponding set of factors. Likewise, because the function will have a vertical asymptote where each factor of the denominator is equal to zero, we can form a denominator that will produce the vertical asymptotes by introducing a corresponding set of factors.
Writing Rational Functions from Intercepts and Asymptotes
If a rational function has \( x \)-intercepts at \(x= x_1 , x_2 , \ldots , x_n \), vertical asymptotes at \(x= v_1 , v_2 , \ldots , v_m \), and \( x i \neq v_j \) for all \( i \) and \( j \), then the function can be written in the form:\[f(x) = a \dfrac{(x- x_1 )^{p_1} (x- x_2 )^{p_2} \cdots (x- x_n )^{p_n}}{(x- v_1 )^{q_1} (x- v_2 )^{q_2} \cdots (x- v_m )^{q_m}}, \nonumber \]where the powers \( p_i \) or \( q_i \) on each factor can be determined by the behavior of the graph at the corresponding intercept or asymptote, and the stretch factor \(a\) can be determined given a value of the function other than the \( x \)-intercept or by the horizontal asymptote if it is nonzero.
Example \( \PageIndex{ 13 } \): Writing a Rational Function from Intercepts and Asymptotes
Write an equation for the rational function shown in Figure \( \PageIndex{ 23 } \).
Figure \( \PageIndex{ 23 } \)
Solution
The graph appears to have \( x \)-intercepts at \(x=–2\) and \(x=3\). At both, the graph passes through the intercept, suggesting linear factors. The graph has two vertical asymptotes. The one at \(x=–1\) seems to exhibit the basic behavior similar to \( \frac{1}{x} \), with the graph heading toward positive infinity on one side and heading toward negative infinity on the other. The asymptote at \(x=2\) is exhibiting a behavior similar to \( \frac{1}{x^2} \), with the graph heading toward negative infinity on both sides of the asymptote. See Figure \( \PageIndex{ 24 } \).
Figure \( \PageIndex{ 24 } \)
The original graph with asymptotes drawn in for guidance.
We can use this information to write a function of the form\[f(x) = a \dfrac{(x+2)(x-3)}{(x+1) (x-2)^2} . \nonumber \]To find the stretch factor, we can use another clear point on the graph, such as the \( y \)-intercept \((0,–2)\).\[ \begin{array}{rrcl} & -2 & = & a \dfrac{(0+2)(0-3)}{(0+1) (0-2)^2} \\[6pt] \implies & -2 & = & a \dfrac{-6}{4} \\[6pt] \implies & a & = & \dfrac{-8}{-6} \\[6pt] \implies & a & = & \dfrac{4}{3} \end{array} \nonumber \]This gives us a final function of\[ f(x)= \dfrac{4(x+2)(x-3)}{3(x+1) (x-2)^2}.\nonumber \]
Revisiting Solving Inequalities
As we did with polynomials, we can solve inequalities involving rational expressions using our graphing skills. Again, many instructors would have you solve rational inequalities using sign charts; however, I find solving via graphing (1) is faster, (2) leads to a more natural understanding of what the solution to a rational inequality means, and (3) reinforces graphing skills. Let's see how this is done via an example.
Example \(\PageIndex{14}\): Solving a Rational Inequality
Find all solutions to the inequality.\[ \dfrac{6x^2 + 14x - 34}{x + 4} > 5x - 9 \nonumber \]
Solution
We begin as we did when solving polynomial inequalities - we move all terms to one side and simplify as much as possible.\[ \begin{array}{rrclcl}
& \dfrac{6x^2 + 14x - 34}{x + 4} & > & 5x - 9 & & \\[6pt]
\implies & \dfrac{6x^2 + 14x - 34}{x + 4} - (5x - 9) & > & 0 & \quad & \left( \text{subtracting }5x - 9\text{ from both sides} \right) \\[6pt]
\implies & \dfrac{6x^2 + 14x - 34}{x + 4} - \dfrac{(5x - 9)(x+4)}{x + 4} & > & 0 & \quad & \left( \text{rewriting with a common denominator} \right) \\[6pt]
\implies & \dfrac{6x^2 + 14x - 34}{x + 4} - \dfrac{5x^2 + 11x - 36}{x + 4} & > & 0 & \quad & \left( \text{distributing} \right) \\[6pt]
\implies & \dfrac{6x^2 + 14x - 34 - \left(5x^2 + 11x - 36\right)}{x + 4} & > & 0 & \quad & \left( \text{combining fractions} \right) \\[6pt]
\implies & \dfrac{6x^2 + 14x - 34 - 5x^2 - 11x + 36}{x + 4} & > & 0 & \quad & \left( \text{distributing} \right) \\[6pt]
\implies & \dfrac{x^2 + 3x + 2}{x + 4} & > & 0 & \quad & \left( \text{combining like terms} \right) \\[6pt]
\implies & \dfrac{(x + 2)(x + 1)}{x + 4} & > & 0 & \quad & \left( \text{factoring the trinomial} \right) \\[6pt]
\end{array} \nonumber \]It's important to note that you would have done all of this work if you were going to solve the inequality using sign charts or graphing - there is no difference in "grunt work" up to this point.
As we did with polynomial inequalities, we graph the expression on the left side. That is, we want to sketch \( f(x) = \frac{(x + 2)(x + 1)}{x + 4} \). Our goal is to identify when the graph of \( f \) is above the \( x \)-axis (because we are solving \( f(x) > 0 \)).
Horizontal Intercepts: The numerator of \( f \) is zero at \( x = -2 \) and \( x = -1 \). Therefore, the graph has \( x \)-intercepts at \( \left( -2,0 \right) \) and \( \left( -1,0 \right) \). Both of these zeros have multiplicity \( 1 \), so the graph will pass through each like a line.
Vertical Intercept: \( f(0) = \frac{2}{4} = \frac{1}{2} \), so the \( y \)-intercept is \( \left( 0,\frac{1}{2} \right) \).
Vertical Asymptote: The denominator is zero when \( x = -4 \), which is not a zero shared with the numerator. Therefore, \( f \) has a vertical asymptote at \( x = -4 \). Additionally, the degree of the factor, \( x + 4 \), in the denominator is \( 1 \), so the vertical asymptote shares the behavior of \( \frac{1}{x} \).
Horizontal/Slant Asymptote: Since the numerator of \( f \) has degree \( 2 \) and the denominator has degree \( 1 \), there will be a slant asymptote. To find the equation of the slant asymptote, it's best to use the unfactored form, \( f(x) = \frac{x^2 + 3x + 2}{x + 4} \), and divide. \[\begin{array}{r}
\underline{-4} \mid & 1 & 3 & 2 \\
& & -4 & 4 \\
\hline & 1 & -1 & 6 \\
\end{array}\nonumber \]Hence, the quotient is \( x - 1 \) and the remainder is \( 6 \). Therefore, the equation of the slant asymptote is \( y = x - 1 \).
We now have enough information to sketch the graph. Starting at the \( y \)-intercept (which is slightly above the \( x \)-axis), we have a choice, start sketching to the left or right. For no better reason than random choice, I will choose to sketch to the right. Does the graph rise or fall? If we started drawing to the right and had the graph fall, it would eventually intersect the \( x \)-axis; however, we do not have any \( x \)-intercepts greater than \( 0 \). Thus, the graph climbs and eventually tends to the line \( y = x - 1 \) (see Figure \( \PageIndex{ 25 } \)).
Going back to the \( y \)-intercept, we now start sketching the curve to the left. Since there is an \( x \)-intercept at \( x = -1 \), our curve falls (as we draw to the left), goes through \( \left( -1,0 \right) \), and (since there is another \( x \)-intercept) climbs to strike the \( x \)-axis at \( x = -2 \). It goes through this intercept and we are now above the \( x \)-axis. If we continue to draw to the left (again, see Figure \( \PageIndex{ 25 } \)), our curve would approach the vertical asymptote, \( x = -4 \). We have a choice - have the graph rise to infinity as \( x \to -4^+ \), or have the graph fall to negative infinity as \( x \to -4^+ \). Since we do not have any more \( x \)-intercepts, the choice is out of our hands. The function grows without bound (to infinity) as \( x \to -4^+ \).
As stated in the list above, the behavior of the function near to the vertical asymptote mimics that of \( \frac{1}{x} \), so we know \( f(x) \to -\infty \) as \( x \to -4^- \). That is, since the graph of \( f \) is rising on one side of \( x = -4 \), it must be falling on the other side. Finally, as we continue drawing to the left, the function tends to the slant asymptote.
Figure \( \PageIndex{ 25 } \)
Graph of \( y = \frac{(x + 2)(x + 1)}{x + 4} \)
Trust me when I say that you will be able to sketch a function like this in a couple of minutes once you practice these types of problems. Do not freak out.
Our ultimate goal was to find out when \( f(x) > 0 \). Now that we have the graph, we can see this occurs when \( x \in \left( -4,-2 \right) \cup \left( -1,\infty \right) \).