4.2: Graphs of Rational Functions
- Page ID
- 119161
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)- Accurately graph rational functions, including vertical asymptotes, precise behavior near intercepts, and horizontal, slant, or nonlinear oblique asymptotes.
In this section, we take a closer look at graphing rational functions. In Section 4.1, we learned that the graphs of rational functions may have holes in them and could have vertical, horizontal and slant asymptotes. Theorems 4.1.1, 4.1.2, and 4.1.3 tell us exactly when and where these behaviors will occur, and if we combine these results with what we already know about graphing functions, we will quickly be able to generate reasonable graphs of rational functions.
One of the standard tools we will use is the sign diagram which was first introduced in Section 2.4, and then revisited in Section 3.1. In those sections, we operated under the belief that a function couldn’t change its sign without its graph crossing through the \(x\)-axis. The major theorem we used to justify this belief was the Intermediate Value Theorem. It turns out the Intermediate Value Theorem applies to all continuous functions,1 not just polynomials. Although rational functions are continuous on their domains, Theorem 4.1.1 tells us that vertical asymptotes and holes occur at the values excluded from their domains. In other words, rational functions aren’t continuous at these excluded values which leaves open the possibility that the function could change sign without crossing through the \(x\)-axis.
Consider the graph of \(y=h(x)\) from Example 4.1.1, shown in Figure \( \PageIndex{1} \) below for convenience. We have added its \(x\)-intercept at \(\left(\frac{1}{2},0\right)\) for the discussion that follows. Suppose we wish to construct a sign diagram for \(h(x)\). Recall that the intervals where \(h(x)>0\), or \((+)\), correspond to the \(x\)-values where the graph of \(y=h(x)\) is above the \(x\)-axis; the intervals on which \(h(x) < 0\), or \((-)\) correspond to where the graph is below the \(x\)-axis.
Figure \( \PageIndex{1} \)
As we examine the graph of \(y=h(x)\), reading from left to right, we note that from \((-\infty,-1)\), the graph is above the \(x\)-axis, so \(h(x)\) is \((+)\) there. At \(x=-1\), we have a vertical asymptote, at which point the graph "jumps" across the \(x\)-axis. On the interval \(\left(-1,\frac{1}{2}\right)\), the graph is below the \(x\)-axis, so \(h(x)\) is \((-)\) there. The graph crosses through the \(x\)-axis at \(\left(\frac{1}{2},0\right)\) and remains above the \(x\)-axis until \(x=1\), where we have a "hole" in the graph. Since \(h(1)\) is undefined, there is no sign here. So we have \(h(x)\) as \((+)\) on the interval \(\left(\frac{1}{2}, 1\right)\). Continuing, we see that on \((1, \infty)\), the graph of \(y=h(x)\) is above the \(x\)-axis, so we mark \((+)\) there.
To construct a sign diagram from this information, we not only need to denote the zero of \(h\), but also the places not in the domain of \(h\). As is our custom, we write "\(0\)" above \(\frac{1}{2}\) on the sign diagram to remind us that it is a zero of \(h\). We need a different notation for \(-1\) and \(1\), and we have chosen to use "!" - a nonstandard symbol called the interrobang. We use this symbol to convey a sense of surprise, caution and wonderment - an appropriate attitude to take when approaching these points. The moral of the story is that when constructing sign diagrams for rational functions, we include the zeros as well as the values excluded from the domain.
Suppose \(r\) is a rational function.
- Place any values excluded from the domain of \(r\) on the number line with an "!" above them.
- Find the zeros of \(r\) and place them on the number line with the number \(0\) above them.
- Choose a test value in each of the intervals determined in steps 1 and 2.
- Determine the sign of \(r(x)\) for each test value in step 3, and write that sign above the corresponding interval
We now present our procedure for graphing rational functions and apply it to a few exhaustive examples. Please note that we decrease the amount of detail given in the explanations as we move through the examples. The reader should be able to fill in any details in those steps which we have abbreviated.
Suppose \(r\) is a rational function.
- Find the domain of \(r\).
- Reduce \(r(x)\) to lowest terms, if applicable.
- Find the \(x\)- and \(y\)-intercepts of the graph of \(y=r(x)\), if they exist.
- Determine the location of any vertical asymptotes or holes in the graph, if they exist. Analyze the behavior of \(r\) on either side of the vertical asymptotes, if applicable.
- Analyze the end behavior of \(r\). Find the horizontal or slant asymptote, if one exists.
- Use a sign diagram and plot additional points, as needed, to sketch the graph of \(y=r(x)\).
Sketch a detailed graph of \(f(x) = \frac{3x}{x^2-4}\).
Solution
We follow the six step procedure outlined above.
- As usual, we set the denominator equal to zero to get \(x^2 - 4 = 0\). We find \(x = \pm 2\), so our domain is \((-\infty, -2) \cup (-2,2) \cup (2,\infty)\).
- To reduce \(f(x)\) to lowest terms, we factor the numerator and denominator which yields \(f(x) = \frac{3x}{(x-2)(x+2)}\). There are no common factors which means \(f(x)\) is already in lowest terms.
- To find the \(x\)-intercepts of the graph of \(y=f(x)\), we set \(y=f(x) = 0\). Solving \(\frac{3x}{(x-2)(x+2)} = 0\) results in \(x=0\). Since \(x=0\) is in our domain, \((0,0)\) is the \(x\)-intercept. To find the \(y\)-intercept, we set \(x=0\) and find \(y = f(0) = 0\), so that \((0,0)\) is our \(y\)-intercept as well.2
- The two numbers excluded from the domain of \(f\) are \(x = -2\) and \(x=2\). Since \(f(x)\) didn’t reduce at all, both of these values of \(x\) still cause trouble in the denominator. Thus, \(x=-2\) and \(x=2\) are vertical asymptotes of the graph. We can actually go a step further at this point and determine exactly how the graph approaches the asymptote near each of these values. Though not absolutely necessary,3 it is good practice for those heading off to Calculus. For the discussion that follows, it is best to use the factored form of \(f(x) = \frac{3x}{(x-2)(x+2)}\).
- The behavior of \(y=f(x)\) as \(x \to -2\): Suppose \(x \to -2^{-}\). If we were to build a table of values, we’d use \(x\)-values a little less than \(-2\), say \(-2.1\), \(-2.01\) and \(-2.001\). While there is no harm in actually building a table like we did in Section 4.1, we want to develop a "number sense" here. Let’s think about each factor in the formula of \(f(x)\) as we imagine substituting a number like \(x=-2.000001\) into \(f(x)\). The quantity \(3x\) would be very close to \(-6\), the quantity \((x-2)\) would be very close to \(-4\), and the factor \((x+2)\) would be very close to \(0\).
More specifically, \((x+2)\) would be a little less than \(0\), in this case, \(-0.000001.\) We will call such a number a "very small \((-)\)," "very small" meaning close to zero in absolute value. So, mentally, as \(x \to -2^{-}\), we estimate \[f(x) = \dfrac{3x}{(x-2)(x+2)} \approx \dfrac{-6}{(-4)\left( \mbox{very small $(-)$}\right)} = \dfrac{3}{2 \left( \mbox{very small $(-)$}\right)}\nonumber\]The closer \(x\) gets to \(-2\), the smaller \((x+2)\) will become, so even though we are multiplying our "very small \((-)\)" by \(2\), the denominator will continue to get smaller and smaller, and remain negative. The result is a fraction whose numerator is positive, but whose denominator is very small and negative. Mentally, \[f(x) \approx \dfrac{3}{2 \left( \mbox{very small $(-)$}\right)} \approx \dfrac{3}{\mbox{very small $(-)$}} \approx \mbox{very big $(-)$}\nonumber\]The term "very big \((-)\)" means a number with a large absolute value which is negative.4 What all of this means is that as \(x \to -2^{-}\), \(f(x) \to -\infty\).
Now suppose we wanted to determine the behavior of \(f(x)\) as \(x \to -2^{+}\). If we imagine substituting something a little larger than \(-2\) in for \(x\), say \(-1.999999\), we mentally estimate \[f(x) \approx \dfrac{-6}{(-4)\left( \mbox{very small $(+)$}\right)} = \dfrac{3}{2 \left( \mbox{very small $(+)$}\right)} \approx \dfrac{3}{\mbox{very small $(+)$}} \approx \mbox{very big $(+)$}\nonumber\] We conclude that as \(x \to -2^{+}\), \(f(x) \to \infty\). - The behavior of \(y=f(x)\) as \(x \to 2\): Consider \(x \to 2^{-}\). We imagine substituting \(x = 1.999999\). Approximating \(f(x)\) as we did above, we get \[f(x) \approx \dfrac{6}{\left( \mbox{very small $(-)$}\right)(4)} = \dfrac{3}{2 \left( \mbox{very small $(-)$}\right)} \approx \dfrac{3}{\mbox{very small $(-)$}} \approx \mbox{very big $(-)$}\nonumber\]We conclude that as \(x \to 2^{-}\), \(f(x) \to -\infty\). Similarly, as \(x \to 2^{+}\), we imagine substituting \(x = 2.000001\) to get \(f(x) \approx \frac{3}{\text { very small }(+)} \approx \text { very big }(+)\). So as \(x \to 2^{+}, f(x) \to \infty\).
Graphically, we have that near \(x=-2\) and \(x=2\) the graph of \(y=f(x)\) looks like Figure \( \PageIndex{2} \).5
Figure \( \PageIndex{2} \) - The behavior of \(y=f(x)\) as \(x \to -2\): Suppose \(x \to -2^{-}\). If we were to build a table of values, we’d use \(x\)-values a little less than \(-2\), say \(-2.1\), \(-2.01\) and \(-2.001\). While there is no harm in actually building a table like we did in Section 4.1, we want to develop a "number sense" here. Let’s think about each factor in the formula of \(f(x)\) as we imagine substituting a number like \(x=-2.000001\) into \(f(x)\). The quantity \(3x\) would be very close to \(-6\), the quantity \((x-2)\) would be very close to \(-4\), and the factor \((x+2)\) would be very close to \(0\).
- Next, we determine the end behavior of the graph of \(y=f(x)\). Since the degree of the numerator is \(1\), and the degree of the denominator is \(2\), \(y=0\) is the horizontal asymptote. As with the vertical asymptotes, we can glean more detailed information using "number sense." For the discussion below, we use the formula \(f(x) = \frac{3x}{x^2-4}\).
- The behavior of \(y=f(x)\) as \(x \to -\infty\): If we were to make a table of values to discuss the behavior of \(f\) as \(x \to -\infty\), we would substitute very "large" negative numbers in for \(x\), say for example, \(x = -1,000,000,000\). The numerator \(3x\) would then be \(-3 \, \mbox{billion}\), whereas the denominator \(x^2-4\) would be \((billion)^2 - 4\), which is pretty much the same as \(1(\mbox{billion})^2\). Hence, \[f\left(\mbox{$-1$ billion}\right) \approx \dfrac{-3 \, \mbox{billion}}{1(\mbox{billion})^2} \approx - \dfrac{3}{\mbox{billion}} \approx \mbox{very small $(-)$}\nonumber\]
- The behavior of \(y=f(x)\) as \(x \to \infty\): On the flip side, we can imagine substituting very large positive numbers in for \(x\) and looking at the behavior of \(f(x)\). For example, let \(x = 1\, \mbox{billion}\). Proceeding as before, we get \[f\left(\mbox{$1$ billion}\right) \approx \dfrac{3 \, \mbox{billion}}{1(\mbox{billion})^2} \approx \dfrac{3}{\mbox{billion}} \approx \mbox{very small $(+)$}\nonumber\]The larger the number we put in, the smaller the positive number we would get out. In other words, as \(x \to \infty\), \(f(x) \to 0^{+}\), so the graph of \(y=f(x)\) is a little bit above the \(x\)-axis as we look toward the far right.
Graphically, we get Figure \( \PageIndex{3} \).6
\( \PageIndex{3} \) - Lastly, we construct a sign diagram for \(f(x)\). The \(x\)-values excluded from the domain of \(f\) are \(x = \pm 2\), and the only zero of \(f\) is \(x=0\). Displaying these appropriately on the number line gives us four test intervals, and we choose the test values7 \(x=-3\), \(x=-1\), \(x=1\) and \(x=3\). We find \(f(-3)\) is \((-)\), \(f(-1)\) is \((+)\), \(f(1)\) is \((-)\) and \(f(3)\) is \((+)\). Combining this with our previous work, we get the graph of \(y=f(x)\) in Figure \( \PageIndex{4} \) below.
Figure \( \PageIndex{4} \)
A couple of notes are in order. First, the graph of \(y=f(x)\) certainly seems to possess symmetry with respect to the origin. In fact, we can check \(f(-x) = -f(x)\) to see that \(f\) is an odd function. In some textbooks, checking for symmetry is part of the standard procedure for graphing rational functions; but since it happens comparatively rarely, we’ll just point it out when we see it. Also note that while \(y=0\) is the horizontal asymptote, the graph of \(f\) actually crosses the \(x\)-axis at \((0,0)\). The myth that graphs of rational functions can’t cross their horizontal asymptotes is completely false, as we shall see again in our next example.
Sketch a detailed graph of \(g(x) = \frac{2x^2-3x-5}{x^2-x-6}\).
Solution
- Setting \(x^2-x-6 = 0\) gives \(x = -2\) and \(x=3\). Our domain is \((-\infty, -2) \cup (-2,3) \cup (3,\infty)\).
- Factoring \(g(x)\) gives \(g(x) = \frac{(2x-5)(x+1)}{(x-3)(x+2)}\). There is no cancellation, so \(g(x)\) is in lowest terms.
- To find the \(x\)-intercept we set \(y = g(x) = 0\). Using the factored form of \(g(x)\) above, we find the zeros to be the solutions of \((2x-5)(x+1)=0\). We obtain \(x = \frac{5}{2}\) and \(x=-1\). Since both of these numbers are in the domain of \(g\), we have two \(x\)-intercepts, \(\left( \frac{5}{2},0\right)\) and \((-1,0)\). To find the \(y\)-intercept, we set \(x=0\) and find \(y = g(0) = \frac{5}{6}\), so our \(y\)-intercept is \(\left(0, \frac{5}{6}\right)\).
- Since \(g(x)\) was given to us in lowest terms, we have the vertical asymptotes \(x=-2\) and \(x=3\). Keeping in mind \(g(x) = \frac{(2x-5)(x+1)}{(x-3)(x+2)}\), we proceed to our analysis near each of these values.
- The behavior of \(y=g(x)\) as \(x \to -2\): As \(x \to -2^{-}\), we imagine substituting a number a little bit less than \(-2\). We have \[g(x) \approx \dfrac{(-9)(-1)}{(-5)(\mbox{very small $(-)$})} \approx \dfrac{9}{\mbox{very small $(+)$}} \approx \mbox{very big (+)}\nonumber\] so as \(x \to -2^{-}\), \(g(x) \to \infty\). On the flip side, as \(x \to -2^{+}\), we get \[g(x) \approx \dfrac{9}{\mbox{ very small $(-)$}} \approx \mbox{very big $(-)$}\nonumber\] so \(g(x) \to -\infty\).
- The behavior of \(y=g(x)\) as \(x \to 3\): As \(x \to 3^{-}\), we imagine plugging in a number just shy of \(3\). We have \[g(x) \approx \dfrac{(1)(4)}{(\mbox{ very small $(-)$}) (5)} \approx \dfrac{4}{\mbox{very small $(-)$}} \approx \mbox{very big $(-)$}\nonumber\] Hence, as \(x \to 3^{-}\), \(g(x) \to -\infty\). As \(x \to 3^{+}\), we get \[g(x) \approx \dfrac{4}{\mbox{ very small $(+)$}} \approx \mbox{very big $(+)$}\nonumber\] so \(g(x) \to \infty\).
Graphically, we have (again, without labels on the \(y\)-axis) the following:
Figure \( \PageIndex{5} \) - Since the degrees of the numerator and denominator of \(g(x)\) are the same, we know that we can find the horizontal asymptote of the graph of \(g\) by taking the ratio of the leading terms coefficients, \(y = \frac{2}{1} = 2\). However, if we take the time to do a more detailed analysis, we will be able to reveal some "hidden" behavior which would be lost otherwise.8 We use the result of the long division \(\left(2x^2-3x-5\right) \div \left(x^2-x-6\right)\) to rewrite \(g(x) = \frac{2x^2-3x-5}{x^2-x-6}\) as \(g(x) = 2 - \frac{x-7}{x^2-x-6}.\) We focus our attention on the term \(\frac{x-7}{x^2-x-6}\).
- The behavior of \(y=g(x)\) as \(x \to -\infty\): If imagine substituting \(x = \text{negative billion}\) into \(\frac{x-7}{x^2-x-6}\), we estimate \(\frac{x-7}{x^{2}-x-6} \approx \frac{-1 \text { billion }}{1 \text { billion }^{2}} \approx \text { very small }(-)\).9 Hence, \[g(x) = 2 - \dfrac{x-7}{x^2-x-6} \approx 2 - \mbox{very small $(-)$} = 2 + \mbox{very small $(+)$}\nonumber\]In other words, as \(x \to -\infty\), the graph of \(y=g(x)\) is a little bit above the line \(y=2\).
- The behavior of \(y=g(x)\) as \(x \to \infty\). To consider \(\frac{x-7}{x^2-x-6}\) as \(x \to \infty\), we imagine substituting \(x = \text{one billion}\) and, going through the usual mental routine, find \[\dfrac{x-7}{x^2-x-6} \approx \mbox{very small $(+)$}\nonumber\]Hence, \(g(x) \approx 2-\text { very small }(+)\), in other words, the graph of \(y=g(x)\) is just below the line \(y=2\) as \(x \to \infty\).
At this point, we have (again, without labels on the \(x\)-axis)
Figure \( \PageIndex{6} \) - Finally, we construct our sign diagram. We place an "!" above \(x=-2\) and \(x=3\), and a "\(0\)" above \(x = \frac{5}{2}\) and \(x=-1\). Choosing test values in the test intervals gives us \(f(x)\) is \((+)\) on the intervals \((-\infty, -2)\), \(\left(-1, \frac{5}{2}\right)\) and \((3, \infty)\), and \((-)\) on the intervals \((-2,-1)\) and \(\left(\frac{5}{2}, 3\right)\).
As we piece together all of the information, we note that the graph must cross the horizontal asymptote at some point after \(x=3\) in order for it to approach \(y=2\) from underneath. This is the subtlety that we would have missed had we skipped the long division and subsequent end behavior analysis. We can, in fact, find exactly when the graph crosses \(y=2\). As a result of the long division, we have \(g(x) = 2 - \frac{x-7}{x^2-x-6}\). For \(g(x) = 2\), we would need \(\frac{x-7}{x^2-x-6} = 0\). This gives \(x-7= 0\), or \(x=7\). Note that \(x-7\) is the remainder when \(2x^2-3x-5\) is divided by \(x^2-x-6\), so it makes sense that for \(g(x)\) to equal the quotient \(2\), the remainder from the division must be \(0\). Sure enough, we find \(g(7)=2\). Moreover, it stands to reason that \(g\) must attain a relative minimum at some point past \(x=7\). Calculus verifies that at \(x=13\), we have such a minimum at exactly \((13, 1.96)\). The reader is challenged to find calculator windows which show the graph crossing its horizontal asymptote on one window, and the relative minimum in the other.
Figure \( \PageIndex{7} \)
Our next example gives us an opportunity to more thoroughly analyze a slant asymptote.
Sketch a detailed graph of \(h(x) = \frac{2x^3+5x^2+4x+1}{x^2+3x+2}\).
Solution
- For domain, you know the drill. Solving \(x^2+3x+2 = 0\) gives \(x = -2\) and \(x=-1\). Our answer is \((-\infty, -2) \cup (-2, -1) \cup (-1, \infty)\).
- To reduce \(h(x)\), we need to factor the numerator and denominator. To factor the numerator, we use the techniques set forth in Section 3.3 and we get \[h(x) = \dfrac{2x^3+5x^2+4x+1}{x^2+3x+2} = \dfrac{(2x+1)(x+1)^2}{(x+2)(x+1)} = \dfrac{ (2x+1) (x+1)^{\cancelto{1}{2}} }{(x+2)\cancel{(x+1)}} = \dfrac{(2x+1)(x+1)}{x+2}\nonumber\]We will use this reduced formula for \(h(x)\) as long as we’re not substituting \(x = −1\). To make this exclusion specific, we write \[h(x)=\dfrac{(2 x+1)(x+1)}{x+2}, x \neq-1.\nonumber\]
- To find the \(x\)-intercepts, as usual, we set \(h(x) = 0\) and solve. Solving \(\frac{(2x+1)(x+1)}{x+2}=0\) yields \(x=-\frac{1}{2}\) and \(x=-1\). The latter isn’t in the domain of \(h\), so we exclude it. Our only \(x\)-intercept is \(\left(-\frac{1}{2}, 0\right)\). To find the \(y\)-intercept, we set \(x=0\). Since \(0 \neq -1\), we can use the reduced formula for \(h(x)\) and we get \(h(0) = \frac{1}{2}\) for a \(y\)-intercept of \(\left(0,\frac{1}{2}\right)\).
- We know that since \(x=-2\) still poses a threat in the denominator of the reduced function, we have a vertical asymptote there. As for \(x=-1\), the factor \((x+1)\) was canceled from the denominator when we reduced \(h(x)\), so it no longer causes trouble there. This means that we get a hole when \(x=-1\). To find the \(y\)-coordinate of the hole, we substitute \(x=-1\) into \(\frac{(2x+1)(x+1)}{x+2}\), per Theorem 4.1.1 and get \(0\). Hence, we have a hole on the \(x\)-axis at \((-1,0)\). It should make you uncomfortable plugging \(x=-1\) into the reduced formula for \(h(x)\), especially since we’ve made such a big deal concerning the stipulation about not letting \(x=-1\) for that formula. What we are really doing is taking a Calculus short-cut to the more detailed kind of analysis near \(x=-1\) which we will show below. Speaking of which, for the discussion that follows, we will use the formula \(h(x) = \frac{(2x+1)(x+1)}{x+2}\), \(x \neq -1\).
- The behavior of \(y=h(x)\) as \(x \to -2\): As \(x \to -2^{-}\), we imagine substituting a number a little bit less than \(-2\). We have \(h(x) \approx \frac{(-3)(-1)}{(\text { very small }(-))} \approx \frac{3}{(\text { very small }(-))} \approx \text { very big }(-)\) thus as \(x \to -2^{-}\), \(h(x) \to -\infty\). On the other side of \(-2\), as \(x \to -2^{+}\), we find that \(h(x) \approx \frac{3}{\text { very small }(+)} \approx \text { very big }(+)\), so \(h(x) \to \infty\).
- The behavior of \(y=h(x)\) as \(x \to -1\). As \(x \to -1^{-}\), we imagine plugging in a number a bit less than \(x=-1\). We have \(h(x) \approx \frac{(-1)(\text { very small }(-))}{1}=\text { very small }(+)\) Hence, as \(x \to -1^{-}\), \(h(x) \to 0^{+}\). This means that as \(x \to -1^{-}\), the graph is a bit above the point \((-1,0)\). As \(x \to -1^{+}\), we get \(h(x) \approx \frac{(-1)(\text { very small }(+))}{1}=\text { very small }(-)\). This gives us that as \(x \to -1^{+}\), \(h(x) \to 0^{-}\), so the graph is a little bit lower than \((-1,0)\) here.
Graphically, we have
Figure \( \PageIndex{8} \) - For end behavior, we note that the degree of the numerator of \(h(x)\), \(2x^3+5x^2+4x+1\), is \(3\) and the degree of the denominator, \(x^2+3x+2\), is \(2\) so by Theorem 4.1.3, the graph of \(y = h(x)\) has a slant asymptote. For \(x\to \pm \infty\), we are far enough away from \(x=-1\) to use the reduced formula, \(h(x) = \frac{(2x+1)(x+1)}{x+2}\), \(x \neq -1\). To perform long division, we multiply out the numerator and get \(h(x) = \frac{2x^2+3x+1}{x+2}\), \(x \neq -1\), and rewrite \(h(x) = 2x-1+\frac{3}{x+2}\), \(x \neq -1\). By Theorem 4.1.3, the slant asymptote is \(y = 2x-1\), and to better see how the graph approaches the asymptote, we focus our attention on the term generated from the remainder, \(\frac{3}{x+2}\).
- The behavior of \(y=h(x)\) as \(x \to -\infty\): Substituting \(x = \text{negative billion}\) into \(\frac{3}{x+2}\), we get the estimate \(\frac{3}{-1 \text { billion }} \approx \text { very small }(-)\). Hence, \(h(x)=2 x-1+\frac{3}{x+2} \approx 2 x-1+\text { very small }(-)\). This means the graph of \(y=h(x)\) is a little bit below the line \(y=2x-1\) as \(x \to -\infty\).
- The behavior of \(y=h(x)\) as \(x \to \infty\): If \(x \to \infty\), then \(\frac{3}{x+2} \approx \text { very small }(+)\). This means \(h(x) \approx 2 x-1+\text { very small }(+)\), or that the graph of \(y=h(x)\) is a little bit above the line \(y=2x-1\) as \(x \to \infty\).
Graphically we have
Figure \( \PageIndex{9} \) - To make our sign diagram, we place an "!" above \(x=-2\) and \(x=-1\) and a "\(0\)" above \(x=-\frac{1}{2}\). On our four test intervals, we find \(h(x)\) is \((+)\) on \((-2,-1)\) and \(\left(-\frac{1}{2}, \infty\right)\) and \(h(x)\) is \((-)\) on \((-\infty, -2)\) and \(\left(-1,-\frac{1}{2}\right)\). Putting all of our work together yields the graph below.
Figure \( \PageIndex{10} \)We could ask whether the graph of \(y=h(x)\) crosses its slant asymptote. From the formula \(h(x) = 2x-1+\frac{3}{x+2}\), \(x \neq -1\), we see that if \(h(x) = 2x-1\), we would have \(\frac{3}{x+2} = 0\). Since this will never happen, we conclude the graph never crosses its slant asymptote.10
We end this section with an example that shows it’s not all pathological weirdness when it comes to rational functions and technology still has a role to play in studying their graphs at this level.
Sketch the graph of \(r(x) = \frac{x^4+1}{x^2+1}\).
Solution
- The denominator \(x^2+1\) is never zero so the domain is \((-\infty, \infty)\).
- With no real zeros in the denominator, \(x^2+1\) is an irreducible quadratic. Our only hope of reducing \(r(x)\) is if \(x^2+1\) is a factor of \(x^4+1\). Performing long division gives us \[\dfrac{x^4+1}{x^2+1} = x^2-1+\dfrac{2}{x^2+1}\nonumber\]The remainder is not zero so \(r(x)\) is already reduced.
- To find the \(x\)-intercept, we’d set \(r(x) = 0\). Since there are no real solutions to \(\frac{x^4+1}{x^2+1}=0\), we have no \(x\)-intercepts. Since \(r(0) = 1\), we get \((0,1)\) as the \(y\)-intercept.
- This step doesn’t apply to \(r\), since its domain is all real numbers.
- For end behavior, we note that since the degree of the numerator is exactly two more than the degree of the denominator, neither Theorems 4.1.2 nor 4.1.3 apply. We know from our attempt to reduce \(r(x)\) that we can rewrite \(r(x) = x^2-1+\frac{2}{x^2+1}\), so we focus our attention on the term corresponding to the remainder, \(\frac{2}{x^2+1}\). It should be clear that as \(x \to \pm \infty\), \(\frac{2}{x^{2}+1} \approx \text { very small }(+)\), which means \(r(x) \approx x^{2}-1+\text { very small }(+)\). So the graph \(y=r(x)\) is a little bit above the graph of the parabola \(y=x^2-1\) as \(x \to \pm \infty\). Graphically,
Figure \( \PageIndex{11} \) - There isn’t much work to do for a sign diagram for \(r(x)\), since its domain is all real numbers and it has no zeros. Our sole test interval is \((-\infty, \infty)\), and since we know \(r(0) = 1\), we conclude \(r(x)\) is \((+)\) for all real numbers. At this point, we don’t have much to go on for a graph. We leave it to the reader to show \(r(−x) = r(x)\) so \(r\) is even, and, hence, its graph is symmetric about the \(y\)-axis.
Below is a comparison of what we have determined analytically versus what the calculator shows us. Without appealing to Calculus, we have no way to detect the relative extrema analytically apart from brute force plotting of points, which is done more efficiently by the calculator.
Figure \( \PageIndex{12} \)
As usual, the authors offer no apologies for what may be construed as "pedantry" in this section. We feel that the detail presented in this section is necessary to obtain a firm grasp of the concepts presented here and it also serves as an introduction to the methods employed in Calculus. As we have said many times in the past, your instructor will decide how much, if any, of the kinds of details presented here are "mission critical" to your understanding of Precalculus.
1 Recall that, for our purposes, this means the graphs are devoid of any breaks, jumps or holes.
2 As we mentioned at least once earlier, since functions can have at most one \(y\)-intercept, once we find that \((0, 0)\) is on the graph, we know it is the \(y\)-intercept.
3 The sign diagram in step 6 will also determine the behavior near the vertical asymptotes.
4 The actual retail value of \(f(−2.000001)\) is approximately \(-1,500,000\).
5 We have deliberately left off the labels on the \(y\)-axis because we know only the behavior near \(x = \pm 2\), not the actual function values.
6 As with the vertical asymptotes in the previous step, we know only the behavior of the graph as \(x \to \pm \infty\). For that reason, we provide no \(x\)-axis labels.
7 In this particular case, we can eschew test values, since our analysis of the behavior of \(f\) near the vertical asymptotes and our end behavior analysis have given us the signs on each of the test intervals. In general, however, this won’t always be the case, so for demonstration purposes, we continue with our usual construction.
8 That is, if you use a calculator to graph. Once again, Calculus is the ultimate graphing power tool.
9 In the denominator, we would have \((\text { billion })^{2}-1 \text { billion }-6\). It’s easy to see why the \(6\) is insignificant, but to ignore the \(1\) billion seems criminal. However, compared to \((1 \text { billion })^{2}\), it’s on the insignificant side; it’s \(10^{18}\) versus \(10^9\) . We are once again using the fact that for polynomials, end behavior is determined by the leading term, so in the denominator, the \(x^{2}\) term wins out over the \(x\) term.
10 But rest assured, some graphs do!