\chapter{Polynomial and rational functions} \section{General rational functions} In the previous section we studied the rational functions that are obtained from the basic parent \(f(x)=1/x\) (the reciprocal function) after simple transformations. These functions (when we write them as a single fraction) will always have a polynomial of degree \(1\) in the denominator, and either a constant or a polynomial of degree \(1\) in the numerator. Their graph always looks like the graph of \(1/x\) after some distortion, reflection or shifts. In this section we study the general case, where the polynomials can be of degree \(2\) or higher. As can be expected, there will be many different possible shapes. One main difference is that there may be more than one vertical asymptote, or there may be none. And there may be one horizontal asymptote, or none. \subsection{Holes and Vertical Asymptotes} A new feature is the possible presence of \textit{holes} in the graph. Vertical asymptotes and holes are both due to zeros of the denominator, as discussed in our first example. \begin{example} Let \(f(x)=\displaystyle{\frac{2x^2+6x+4}{x^2-1}}\). We begin by completely factoring both the numerator and denominator, \textbf{without} simplifying the fraction: \[ \begin{array}{rcll} f(x)&=& \displaystyle{\frac{2x^2+6x+4}{x^2-1}}\\[2ex] &=& \displaystyle{\frac{2(x^2+3x+2)}{(x-1)(x+1)}}\\[2.5ex] &=& \displaystyle{\frac{2(x+1)(x+2)}{(x-1)(x+1)}} \end{array} \] Then we set the denominator equal to zero and solve for \(x\): \[(x-1)(x+1)=0\] \[x-1=0 \hspace{3ex} \mbox{or} \hspace{3ex} x+1=0\] \[x=1 \hspace{3ex} \mbox{or} \hspace{3ex} x=-1.\] So we found that the denominator has two zeros: \(x=1\) and \(x=-1\). These numbers must be excluded from the domain, and so the domain is \[D=(-\infty,-1)\cup(-1,1)\cup(1,\infty).\] Next we simplify the fraction: \[\displaystyle{\frac{2\cancel{(x+1)}(x+2)}{(x-1)\cancel{(x+1)}}}=\displaystyle{\frac{2x+4}{x-1}}.\] The value \(x=1\) is still a zero of the simplified denominator. This means that the vertical line \(x=1\) is a vertical asymptote. But \(x=-1\) is no longer a zero. This means that \(x=-1\) is the \(x\)-coordinate of a hole. To find the \(y\)-coordinate of the hole, plug \(x=-1\) in the \textbf{simplified} fraction (we could not use it in the original fraction, because we get zero in the denominator): \[ \begin{array}{rcll} & & \displaystyle{\frac{2(-1)+4}{-1-1}} \\[1ex] &=& \displaystyle{\frac{2}{-2}}\\[1ex] &=& -1 \end{array} \] So the coordinates of the hole are \((-1,-1)\), and we will show it on the graph as a small open circle. Apart from the hole, the rest of the graph will be precisely like the one of the simplified fraction: \[g(x)=\frac{2x+4}{x-1}.\] Note that we have given a new name to this function, because it is not quite the same as the given function \(f(x)\). The difference of course is that \(f(-1)\) does not exist, but \(g(-1)\) is OK. Apart from that, the two functions are just the same, so as long as we remember to include the hole \((-1,-1)\), we may as well use \(g(x)\) to draw the graph. But \(g(x)\) is of the same type we studied in the previous unit: after synthetic division by \(x-1\):
\(1\) \(2\) \(4\)
\(2\)
\(2\) \(6\)
we get a transformation of the reciprocal function: \[g(x)=2+\frac{6}{x-1}.\] This is the parent \(1/x\) stretched vertically by \(6\), then shifted right by \(1\) and up by \(2\). So the horizontal asymptote is \(y=2\). To complete the graph, we find the intercepts: \[g(0)=2+\frac{6}{0-1}=-4,\] and solving \(g(x)=0\) we find \begin{eqnarray*} \frac{2x+4}{x-1}& = & 0\\[1ex] \cancel{(x-1)}\frac{2x+4}{\cancel{x-1}} & = & 0(x-1)\\[1ex] 2x+4 &=& 0\\[1ex] x&=& -2. \end{eqnarray*} So the \(y\)- intercept is \((0,-4)\) and the \(x\)-intercept is \((-2,0)\). Now choose some points on both sides of the vertical asymptote. It is easier and more accurate to try to choose points on the grid, meaning that both co-ordinates are whole numbers. After trying several small values of \(x\), we find that \(-5\), \(3\) and \(4\) will give us points on the grid: \[\begin{array}{ccc} \begin{array}{rcll} g(-5)&=& \displaystyle 2+\frac{6}{-5-1}\\[1ex] &=& \displaystyle 2 -1\\[1ex] &=& 1 \end{array} & \hspace{1ex} \begin{array}{rcl} g(3)&=& \displaystyle 2+\frac{6}{3-1}\\[1ex] &=& \displaystyle 2+3\\[1ex] &=& 5\end{array} & \hspace{1ex} \begin{array}{rcll} g(4)&=& \displaystyle 2+\frac{6}{4-1}\\[1ex] &=& \displaystyle 2+2\\[1ex] &=& 4\end{array} \end{array} \] So we found the points: \[ \begin{array}{c|cccc} x & -5 & 3 & 4 \\ \hline y & 1 & 5 & 4 \end{array} \] To draw the graph, start by placing the information we found: asymptotes, intercepts, hole, points: \[\img{U2_9F0.png}{}{14em}{}\] Then draw the curve, using the vertical asymptote as a guide when \(x\) gets close to \(1\) and the horizontal asymptote on the far left and far right: \[\img{U2_9F1.png}{}{14em}{}\] From the graph, we can find the range, that will be all real numbers except the \(y\)-coordinate of the hole \(y=-1\) and the value of the horizontal asymptote \(y=2\): \[R=(-\infty,-1)\cup(-1,2)\cup(2,\infty).\] \end{example} We summarize below the procedure to find vertical asymptotes and holes of a rational function:
Vertical asymptotes and holes
\begin{itemize} \item Completely factor both the numerator and denominator, but do not simplify. \item List all the zeros of the denominator. These \(x\)-values are not in the domain, and will give either vertical asymptotes, or holes. \item Now simplify the fraction, by canceling common factors. If an \(x\)-value in the list is still a zero of the simplified denominator, it gives a vertical asymptote. If it is not a zero of the simplified denominator, it gives a hole. \item Find the \(y\)-coordinates of the holes by plugging the \(x\)-coordinates in the \textbf{simplified} function. \end{itemize}
\subsection{Horizontal Asymptotes} If a rational function has a polynomial of degree 2 or more in either numerator or denominator, it cannot be obtained as a transformation of the reciprocal function, and the shape of the graph can be quite different. The main features we need to look for are vertical and horizontal asymptotes. The vertical asymptotes are found as before, as the zeros of the denominator (after simplification). The horizontal asymptotes are found by considering the degrees of the polynomials in numerator and denominator, as follows:
Horizontal Asymptotes for \(\displaystyle f(x)=\frac{p(x)}{q(x)}\)
\begin{itemize} \item If degree of \(p(x)\) is greater than degree of \(q(x)\), then there is no HA. \item If degree of \(p(x)\) is smaller than degree of \(q(x)\), then the HA is \(y=0\) (like for \(y=1/x\) ). \item If the degrees are the same, then the HA is \(\displaystyle y=\frac{\mbox{LC of } p(x)}{\mbox{LC of } q(x)}\). \end{itemize}
\begin{example} Let \(\displaystyle f(x)=\frac{2x^2+2x-4}{x^2-x-2}\). We want to find all asymptotes, holes (if any), intercepts, draw the graph, and find domain and range. \begin{itemize} \item Factor completely both numerator and denominator: \[f(x)=\frac{2(x^2+x-2)}{(x-2)(x+1)}=\frac{2(x+2)(x-1)}{(x-2)(x+1)}.\] \item Set the denominator equal to zero and solve. \[ \begin{array}{rcl} (x-2)(x+1)&=& 0\\[1ex] x-2=0 & \mbox{ or } & x+1=0\\[1ex] x=2 & \mbox{ or } & x=-1 \end{array} \] So \(x=2\) and \(x=-1\) must be taken out of the domain, and the domain is \[D=(-\infty, -1)\cup(-1,2)\cup(2,\infty).\] \item There are no factors to cancel. This means that there are no holes, and both \(x=-1\) and \(x=2\) will be vertical asymptotes. \item Find the horizontal asymptote: the degrees of numerator and denominator are both \(2\). So according to our rule the horizontal asymptote is: \[y=\frac{\mbox{LC of Numerator}}{\mbox{LC of Denominator}}=\frac{2}{1}=2.\] \item Find the intercepts: \[f(0)=\frac{2(0+2)(0-1)}{(0-2)(0+1)}=\frac{-4}{-2}=2,\] so the \(y\)-intercept is \((0,2)\), and \[ \begin{array}{rcl} \displaystyle \frac{2(x+2)(x-1)}{(x-2)(x+1)}& = & 0\\[2ex] \displaystyle \cancel{(x-2)(x+1)} \frac{2(x+2)(x-1)}{\cancel{(x-2)(x+1)}}& = & 0(x-2)(x+1)\\[2ex] 2(x+2)(x-1) & = & 0\\[2ex] x+2 =0 & \mbox{ or } & x-1=0 \\[2ex] x=-2 & \mbox{ or } & x=1 \end{array} \] So the \(x\)-intercepts are \((-2,0)\) and \((1,0)\). \item To understand the shape of the graph, plot several points. We choose as \(x\) values small whole numbers other than \(\pm 1, \pm 2\), that we already know are either \(x\)-intercepts or vertical asymptotes: \[\begin{array}{cc} \begin{array}{rcll} f(3)&=& \displaystyle \frac{2(3+2)(3-1)}{(3-2)(3+1)}\\[2ex] &=& \displaystyle \frac{20}{4}\\[2ex] &=& 5 \end{array} & \hspace{1ex} \begin{array}{rcl} f(-3)&=& \displaystyle \frac{2(-3+2)(-3-1)}{(-3-2)(-3+1)}\\[2ex] &=& \displaystyle \frac{8}{10}\\[2ex] &=& 0.8\end{array} \\[5ex] \begin{array}{rcll} f(4)&=& \displaystyle \frac{2(4+2)(4-1)}{(4-2)(4+1)}\\[2ex] &=& \displaystyle \frac{36}{10}\\[2ex] &=& 3.6\end{array} & \hspace{1ex} \begin{array}{rcll} f(-4)&=& \displaystyle \frac{2(-4+2)(-4-1)}{(-4-2)(-4+1)}\\[2ex] &=& \displaystyle \frac{20}{18}\\[2ex] &\approx& 1.1\end{array} \end{array} \] So we found the points: \[ \begin{array}{c|cccc} x & 3 & -3 & 4 & -4 \\ \hline y & 5 & 0.8 & 3.6 & 1.1 \end{array} \] \item At this point we can begin placing asymptotes, intercepts and points on a graph: \[\img{U2_9F2.png}{}{14em}{}\] We can now draw the graph. Join the plotted points with a smooth curve, and using the asymptotes as guides. The \(y\) values must be getting larger and larger as we get close to the vertical asymptotes, and they must be getting close to the horizontal asymptote on the far left and far right. \[\img{U2_9F3.png}{}{14em}{}\] So unlike the transformations of \(1/x\) that have only two branches, this graph has three branches. We see from the graph that the range is the set of all real numbers, because even though the horizontal asymptote value \(y=2\) is left out by the left and right branches of the graph, the middle branch intersects it: \[R=(-\infty,\infty)\]. \end{itemize} \end{example} \begin{example} Let \(\displaystyle f(x)=\frac{x^3 - 4x}{x^2-x-6}\). \begin{itemize} \item Factor completely: \begin{eqnarray*} f(x)&=& \frac{x^3-4x}{x^2-x-6}\\[1ex] &=& \frac{x(x^2-4)}{(x-3)(x+2)}\\[1ex] &=& \frac{x(x-2)(x+2)}{(x-3)(x+2)} \end{eqnarray*} \item Set the denominator equal to zero and solve to find the domain: \[ \begin{array}{rcl} (x-3)(x+2) & = & 0\\[1ex] x-3=0 & \mbox{ or } & x+2=0\\[1ex] x=3 & \mbox{ or } & x=-2 \end{array} \] So the domain is \[D=(-\infty,-2)\cup(-2,3)\cup(3,\infty).\] \item Find vertical asymptotes and holes. The factor \(x+2\) in the denominator cancels in the simplified fraction: \[g(x)=\frac{x(x-2)}{x-3}.\] So \(x=3\) is a vertical asymptote, and \(x=-2\) is a hole with \(y\) coordinate \[g(-2)=\frac{-2(-2-2)}{-2-3}=-\frac{8}{5}.\] So the hole is at \((-2,-8/5)\). \item The degree of the numerator is larger. So there is no horizontal asymptote. \item Find the intercepts: \[g(0)=\frac{0(0-2)}{0-3}=0,\] and \[ \begin{array}{rcl} \displaystyle \frac{x(x-2)}{x-3}& = & 0\\[1ex] \displaystyle \cancel{(x-3)} \frac{x(x-2)}{\cancel{(x-3)}}& = & 0(x-3)\\[1ex] x(x-2) & = & 0\\[1ex] x =0 & \mbox{ or } & x-2=0 \\[1ex] x=0 & \mbox{ or } & x=2 \end{array} \] So \((0,0)\) and \((2,0)\) are the \(x\)-intercepts. \item Find several points on both side of the VA, using the simplified fraction \(g(x)\): \[ \begin{array}{ccc} \begin{array}{rcl} g(-3)&=& \displaystyle \frac{-3(-3-2)}{-3-3}\\[1ex] &=& \displaystyle \frac{15}{-6}\\[1ex] &=& -2.5\end{array} & \hspace{1ex} \begin{array}{rcl} g(-2)&=& \displaystyle \frac{-2(-2-2)}{-2-3}\\[1ex] &=& \displaystyle \frac{8}{-5}\\[1ex] &=& -1.6\end{array}\\[7ex] \begin{array}{rcl} g(-1)&=& \displaystyle \frac{-1(-1-2)}{-1-3}\\[1ex] &=& \displaystyle \frac{3}{-4}\\[1ex] &=& -0.75\end{array} & \hspace{1ex} \begin{array}{rcl} g(1)&=& \displaystyle \frac{1(1-2)}{1-3}\\[1ex] &=& \displaystyle \frac{-1}{-2}\\[1ex] &=& 0.5 \end{array} \\[7ex] \begin{array}{rcl} g(4)&=& \displaystyle \frac{4(4-2)}{4-3}\\[1ex] &=& \displaystyle \frac{8}{1}\\[1ex] &=& 8\end{array} & \hspace{1ex} \begin{array}{rcl} g(5)&=& \displaystyle \frac{5(5-2)}{5-3}\\[1ex] &=& \displaystyle \frac{15}{2}\\[1ex] &=& 7.5 \end{array} \\[7ex] \begin{array}{rcl} g(6)&=& \displaystyle \frac{6(6-2)}{6-3}\\[1ex] &=& \displaystyle \frac{24}{3}\\[1ex] &=& 8\end{array} & \hspace{1ex} \begin{array}{rcl} g(7)&=& \displaystyle \frac{7(7-2)}{7-3}\\[1ex] &=& \displaystyle \frac{35}{4}\\[1ex] &=& 8.75 \end{array} \end{array} \] So we found the points on the graph: \[ \begin{array}{c|cccccccc} x & -3 & -2 & -1 & 1 & 4 & 5 & 6 & 7 \\ \hline y & -2.5 & -1.6 & -0.75 & 0.5 & 8 & 7.5 & 8 & 8.75 \end{array} \] \item Draw the graph: \[\img{U2_9F5.png}{}{14em}{}\] \end{itemize} \end{example} \subsection{Slant Asymptotes} The last example does not have a horizontal asymptote. But looking at the graph we can see that on the far left and right it seems to approach a non-horizontal straight line. That is in fact true, as explained below.
General Asymptotes for \(\displaystyle f(x)=\frac{p(x)}{q(x)}\)
\begin{itemize} \item Let \(\displaystyle f(x)=\frac{p(x)}{q(x)}\) and let \(Q(x)\) be the quotient of the polynomial division \(p(x)/q(x)\). Then the graph of \(f(x)\) gets close to the graph of \(Q(x)\) for large values of \(x\). \item If \(Q(x)\) is a polynomial of degree 1, then the asymptote is called a \textit{slant asymptote}. \end{itemize}
This explains the last graph: the numerator has degree \(3\) and the denominator has degree \(2\), so the quotient has degree \(1\) and it is a straight line, so it is a slant asymptote. \begin{example} Let \(\displaystyle f(x)=\frac{x^3 - 4x}{x^2-x-6} \) be the function in the last example. Dividing \(x^3-4x\) by \(x^2-x-6\) we find the quotient to be \(Q(x)=x+1\). The picture below shows the graph of \(f(x)\) again, with the graph of the asymptote \(Q(x)\) as a dashed line: \[\img{U2_9F6.png}{}{14em}{}\] \end{example}

Problems

\problem Let \(f(x)=\displaystyle{\frac{3x^2-12x+12}{x^2-4}}\). Find all asymptotes, holes and intercepts, plot a few points and draw an accurate graph, then give domain and range. \begin{sol} \begin{itemize} \item Factor completely: \[ \begin{array}{rcll} f(x)&=& \displaystyle{\frac{3x^2-12x+12}{x^2-4}}\\[1ex] &=& \displaystyle{\frac{3(2x^2-4x+4)}{(x-2)(x+2)}}\\[1ex] &=& \displaystyle{\frac{3(x-2)(x-2)}{(x-2)(x+2)}} \end{array} \] \item The zeros of the denominator are \(x=2\) and \(x=-2\). So the domain is \[D=(-\infty,-2)\cup(-2,2)\cup(2,\infty).\] \item The factor \(x+2\) does not cancel, and so there is a vertical asymptote at \(x=-2\). The factor \(x-2\) cancels and the simplified fraction is \[g(x)=\frac{3(x-2)}{x+2}.\] So there is a hole at \(x=2\) with \(y\)-coordinate \[g(2)=\frac{3(2-2)}{(2+2)}=0.\] \item After doing synthetic division, we find \[g(x)=-\frac{12}{x+2}+3\] This is the graph of \(1/x\) reflected across the \(x\)-axis, stretched vertically by \(12\), shifted left by \(2\) and up by \(3\). So the horizontal asymptote is \(y=3\). \item Since \(g(0)=-\frac{12}{0+2}+3=-6+3=-3\), the \(y\)-intercept is \((0,-3)\). Solving \(g(x)=0\) we find \(x=2\). But we found in a previous step that there is a hole at \((2,0)\). So there is no \(x\)-intercept. \item Choose some points on both sides of the vertical asymptote: \[ \begin{array}{c|cccc} x & -6 & -4 & -3 & -1 \\ \hline y & 6 & 9 & 15 & -9 \end{array} \] \item Gather all information (asymptotes, intercepts, hole, points) and draw the graph: \[\img{U2_9F8.png}{}{14em}{}\] \item From the graph, we see that the range is \(R=(-\infty, 3)\cup(3,\infty)\). \end{itemize} \end{sol} \mproblem Let \(f(x)=\displaystyle{\frac{2x^2-8}{x^2-x-6}}\). Find all asymptotes, holes and intercepts, plot a few points and draw an accurate graph, then give domain and range. \problem Draw the graph of the rational function \(\displaystyle f(x)=\frac{6x^2}{x^3+x}\), showing all intercepts, asymptotes and holes (if any). \begin{sol} \begin{itemize} \item Factor completely: \[f(x)=\frac{6x^2}{x(x^2+1)}\] \item Find the domain: set the denominator to zero and solve: \[ \begin{array}{rcl} x(x^2+1)&=& 0\\[1ex] x=0 & \mbox{ or } & x^2+1=0 \end{array} \] The equation \(x^2+1=0\) has no real number solutions, so the only solution is \(x=0\), that must be excluded from the domain, and so the domain is \[D=(-\infty,0)\cup(0,\infty).\] \item Find vertical asymptotes and holes: the factor \(x\) will disappear from the denominator after simplification: \[g(x)=\frac{6x}{x^2+1}.\] So we conclude that the function has no vertical asymptotes, and it has a hole at \(x=0\). The \(y\)-coordinates of the hole are found by substituting in the simplified fraction: \[g(0)=\frac{6(0)}{0^2+1}=0.\] So the hole is at \((0,0)\). \item Find horizontal asymptote: the degree of the denominator is larger. So the \(x\)-axis \(y=0\) will be the horizontal asymptote. \item Find the intercepts: We already know that \((0,0)\) is a hole, so there is no \(y\)-intercept. Solving \(f(x)=0\) we also find \(x=0\) to be the only solution, so there are no \(x\)-intercepts. \item Plot extra points: especially when there are no vertical asymptotes, it is important to plot several points so that we can understand the shape of the graph. We use the simplified fraction \(g(x)\): \[\begin{array}{ccc} \begin{array}{rcl} g(1)&=& \displaystyle \frac{6(1)}{1^2+1}\\[1ex] &=& \displaystyle \frac{6}{2}\\[1ex] &=& 3 \end{array} & \hspace{1ex} \begin{array}{rcl} g(2)&=& \displaystyle \frac{6(2)}{(2)^2+1}\\[1ex] &=& \displaystyle \frac{12}{5}\\[1ex] &=& 2.4\end{array} \\[5ex] \begin{array}{rcl} g(3)&=& \displaystyle \frac{6(3)}{(3)^2+1}\\[1ex] &=& \displaystyle \frac{18}{10}\\[1ex] &=& 1.8\end{array} & \hspace{1ex} \begin{array}{rcl} g(4)&=& \displaystyle \frac{6(4)}{(4)^2+1}\\[1ex] &=& \displaystyle \frac{24}{17}\\[1ex] &\approx& 1.4 \end{array} \end{array} \] So \((1,3)\),\((2,2.4)\), \((3,1.8)\), \((4,1.4)\) are points on the graph. We notice that \(g(x)\) is odd: \(g(-x)=-g(x)\). This means that if \((x,y)\) is a point on the graph, then \((-x,-y)\) is also a point on the graph. So \((-1,-3)\),\((-2,-2.4)\), \((-3,-1.8)\), \((-4,-1.4)\) are also points on the graph. We can now draw the graph, taking into account the hole at \((0,0)\), and using the horizontal asymptote \(y=0\) as a guide for the far left and far right: \[\img{U2_9F4.png}{}{14em}{}\] \end{itemize} \end{sol} \mproblem Draw the graph of the rational function \(\displaystyle f(x)=\frac{x^2-4}{x^2+4}\), showing all intercepts, asymptotes and holes (if any). \problem Draw the graph of the rational function \(\displaystyle f(x)=\frac{x^4+1}{x^2-1} \), showing all intercepts, asymptotes and holes (if any). \begin{sol} The denominator factors as \(x^2-1=(x-1)(x+1)\), and no factor will cancel, so \(x=1\) and \(x=-1\) are vertical asymptotes. The \(y\)-intercept is \(f(0)=-1\), and there are no solutions for \(f(x)=0\), so there are no \(x\)-intercepts. The denominator has larger degree, and the difference of the degrees is \(2\). After doing long division, we find the quotient to be \(Q(x)=x^2+1\). This is a parabola with vertex at \((0,1)\) and no \(x\)-intercepts. We plot several points, with \(x\)-coordinates \(\pm 0.5\), \(\pm 0.7\), \(\pm 1.2\), \(\pm 1.5\), \(\pm 2\), and then we draw the graph showing the general asymptote \(Q(x)=x^2+1\) as a dashed parabola: \[\img{U2_9F7.png}{}{14em}{}\] \end{sol} \mproblem Draw the graph of the rational function \(\displaystyle f(x)=\frac{x^3+1}{x-2} \), showing all intercepts, asymptotes and holes (if any).
This is the end of Unit 2.8! Now
Check your understanding
« Previous Unit
Next Unit »
Go to WeBWorK