Graphing Rational Equations
Rational equations have many features that make it difficult to graph them by simply plotting points.
To determine the graph of a rational equation, we will
\(\quad \text{0.}\) Check for holes (common factors).
\(\quad \text{1.}\) Determine the \(y\)-intercept \( (x=0) \).
\(\quad \text{2.}\) Determine the \(x\)-intercept (numerator is 0).
\(\quad \text{3.}\) Determine the behavior at positive/negative infinity.
\(\quad \text{4.}\) Find any vertical asymptotes (denominator is 0). Determine behavior around these asymptotes.
\(\quad \text{5.}\) Plot the information and sketch the graph.
Note: This algebraic approach does not require calculus. For instructions on drawing better graphs with the use of calculus, see Graphing Using Derivatives.
Contents
Checking for holes
- Factorize the numerator and the denominator, and find any common factors. Say that \( y = \frac{ f(x) h(x) } { g(x) h(x) } \), where \( f(x) \) and \(g(x) \) do not have any common factors.
- For any \( x^* \) value such that \( h( x^* ) = 0 \), we will have a hole at \( x = x^* \) with corresponding \( y = \frac{ f ( x^* ) } { g(x^* ) } \). Record this down.
- Cancel out the common factor and proceed to find the graph of \( y = \frac{ f(x) } { g(x) } \).
For example, the graph of \( y = \frac{ x-1 } { (x-1)(x-2) } \) is similar to the graph of \( y = \frac{ 1}{ x-2} \) with a hole at the point \( (1, -1 ) \).
Henceforth, we will draw the graph of \( y = \frac{ f(x) } { g(x) } \), where \( \gcd \left( f(x) , g(x) \right) = 1 \).
Finding Intercepts
Determine the \(y\)-intercept.
Substitute in \( x = 0 \) into the equation, and the \(y\)-intercept will be \( \frac{ f(0) } { g(0)} \).
Determine the \( x\)-intercept.
This occurs when \( y = 0 \), or when the numerator is 0. Solve for \( f(x) = 0 \).
Determine the behavior at positive/negative infinity
Perform partial fractions:
\[ \frac{ f(x) } { g(x) } = a(x) + \frac{ b(x) } { c(x) }, \]
where \( \deg b(x) < \deg c(x) \). Then, for large values of \( x \), \( \frac{ b(x) } { c(x) } \) will be close to 0.
As such, we know that for large values, \( y \approx a(x) \). We then need to determine for large positive (and large negative) values of \(x\), if \(y \) will be above, or below \( a(x) \). This is easy to determine by checking the signs of \( b(x) \) and \(c(x) \).
You may be familiar with this:
Let \( \deg f = m \) and \( \deg g = n \).
Case 1: \( m < n \).
The graph will have a horizontal asymptote at \( y = 0 \).Case 2: \( m = n \). Let the leading coefficient of \( f(x) \) be \( F \) and the leading coefficient of \( g(x) \) be \(G\). Then, the graph will have a horizontal asymptote at \( y = \frac{ F}{G} \).
Case 3: \( m > n \).
There is no horizontal asymptote. \(_\square\)
This is included in the above analysis:
Case 1 will give us that \( a(x) = 0 \),
Case 2 will give us that \( a(x) = \frac{ F}{G} \) is a constant,
Case 3 will give us that \( a(x) \) is not a constant.
Finding and checking vertical asymptotes
Vertical asymptotes occur when the denominator is 0. Solve for \( g(x) = 0 \).
For each solution \( x^* \), we need to determine how the graph looks like on the left, and on the right of \( x^* \). We know that it will tend to infinity (hence asymptote), but need to figure out if it will tend to positive infinity, or negative infinity.
To do so, we check what the signs of the factorized terms are, and then multiply them to determine the eventual sign.
Plotting the information and sketching the graph
The above analysis provides you with a lot of information about the graph. It is time to put this information on paper. See the example below for how to do this.
How do we draw the graph of \( y = \frac{ 2x+3} { x-4} \)?
Step 0:
Check for holes. Since there is no common factors in the numerator and denominator, there are no holes.Step 1:
Determine the \(y\)-intercept. This occurs when \( x = 0 \), which gives us \( y = \frac{ 2 \times 0 + 3 } { 0 - 4 } = \frac{ -3}{4} \).Step 2:
Determine the \(x\)-intercept. This occurs when the numerator is 0, which gives us \[ 0 = \frac{2x+3} { x-4 } \Rightarrow 2x + 3 = 0 \Rightarrow x = - \frac{3}{2} .\]Step 3:
Determine the behavior at infinity. Since the numerator and denominator are both linear polynomials (same degree), we know that we will get a horizontal asymptote of \( x = \frac{2}{1} = 2 \).We have \( y = \frac{ 2x+3}{ x - 4 } = 2 + \frac{ 11 } { x- 4 } \). Hence, this tells us that \[\begin{array} &\text{as } x \rightarrow \infty, y \rightarrow 2^+ &\text{ and } &\text{as } x \rightarrow - \infty, y \rightarrow 2^-. \end{array}\]
Step 4:
Find any vertical asymptotes. This happens when the denominator is 0.Solving \( x - 4 = 0 \), we get \( x = 4 \) as the only vertical asymptote. Let's determine the behavior: \[\begin{align} \text{As } x \rightarrow 4^+, y &= \frac{ 2x+3} { x - 4 } \sim \frac{ + } { + } \text{ and thus } y \rightarrow + \infty. \\ \text{As } x \rightarrow 4^-, y &= \frac{ 2x+3}{x-2} \sim \frac{ + } { - } \text{ and thus } y\rightarrow - \infty. \end{align}\]
Step 5:
Plot the information. You should get the following. The circles indicate which step number we used.
Finally, draw the graph by connecting up the information. You should be able to trace out the graph (thick black line).
Worked Examples
Draw the graph of \( y = \frac{ x^2 - 4x + 3 } { x^2 +2x - 3 } \).
Step 0: Zeros
We can factorize the graph as \( \frac{ (x-3) ( x-1) } { (x-1)( x + 3) } \), so there is a hole at \( x = 1 \). The \(y\)-value will be \( \frac{ 1 - 3 } { 1 +3 } = \frac{ -2}{4} = - 0.5 \).We want the graph of \( y = \frac{ x-3}{x+3}, x \neq 1 \).
Step 1: \(y\)-intercept
\( x = 0 , y = \frac{ 3 } { -3} = -1 \).Step 2: \(x\)-intercept
Remember that we're now only working with \( \frac{ x-3}{x+3} \), as opposed to \( \frac{ x^2 - 4x + 3 } { x^2 + 2x - 3 } \). Hence, the \(x\)-intercept occurs when \( x-3 = 0 \Rightarrow x = 3 \).Step 3: Behavior at infinity
We have a linear polynomial over a linear polynomial, so there is a horiztonal asymptote of \( y = \frac{1}{1} = 1 \). Using partial fractions, we have \( y = \frac{ x-3}{x+3} = 1 - \frac{6}{ x + 3} \).As \( x \rightarrow \infty\), \( - \frac{6}{ x+3} \sim (-) \frac{ +}{ + } = - ,\) so \( y \rightarrow 1 ^ - \).
As \( x \rightarrow - \infty\), \( - \frac{6}{ x+3} \sim (-) \frac{ +}{ - } = +,\) so \( y \rightarrow 1 ^ + \).Step 4: Vertical asymptotes
The denominator is 0 when \( x + 3 = 0 \Rightarrow x = -3 \).As \( x \rightarrow -3 ^ + \), \( y = \frac{ x-3} { x + 3} \sim \frac{ - } { + } = - ,\) so \( y \rightarrow - \infty \).
As \( x \rightarrow -3 ^ - \), \( y = \frac{ x-3} { x + 3} \sim \frac{ - } { - } = + ,\) so \( y \rightarrow + \infty \).Step 5: Plot the information, and draw the graph.
Draw the graph of \( y = \frac{ x^2 + 1 } { x + 1 } \).
Step 0: There are no holes.
Step 1: \(y\)-intercept
\( x = 0, y = \frac{ 0 ^2 + 1 } { 0 + 1 } = 1 \).Step 2: \(x\)-intercept
Solving for \( x^2 + 1 = 0 \), there are no solutions. Hence there are no \(x\)-intercepts.Step 3: Behavior at infinity
Since we have a degree 2 polynomial over a degree 1 polynomial, there are no horizontal asymptotes. Instead, we will need to use partial fractions.We have \( y = \frac{ x^2 + 1 } { x+1} = x -1 + \frac{ 2}{ x+1} \). This means that \( y \approx x - 1 \).
As \( x \rightarrow \infty, \frac{ 2 } { x+ 1} \rightarrow 0 ^ +, \) so \( y \approx x -1 ^ + \).
As \( x \rightarrow \infty, \frac{ 2}{ x+1 } \rightarrow 0 ^ - ,\) so \( y \approx x -1 ^ - \).Step 4: Vertical Asymptote
Setting the denominator to be 0, we get \( x + 1 = 0 \Rightarrow x = -1 \).As \( x \rightarrow -1 ^ + \), \( y = \frac{ x^2 +1 } { x + 1 } \sim \frac{ + } { + } = +, \) so \( y \rightarrow \infty \).
As \( x \rightarrow -1 ^ - \), \( y = \frac{ x^2 +1 } { x + 1 } \sim \frac{ + } { + } = - ,\) so \( y \rightarrow -\infty \).Step 5: Plot the information and draw the graph.
Draw the graph of \( y = \frac{ x - 2 } { ( x + 1) ( x + 3) } .\)
Step 0: There are no holes.
Step 1: \(y\)-intercept
\( x = 0, y = \frac{ 0-2} { (0+1)(0+3) } = \frac{ -2}{3} \).Step 2: X-intercept.
\( x-2 = 0 \Rightarrow x = 2 \).Step 3: Behavior at infinity.
Since we have a linear polynomial over a quadratic polynomial, the horizontal asymptote is \( y = 0 \).As \( x \rightarrow \infty \), \( y = \frac{ x-2} { (x+1)(x+3) } \sim \frac{ + } { (+)(+)} = + ,\) so \( y \rightarrow 0 ^+ \).
As \( x \rightarrow - \infty \), \( y = \frac{ x-2} { (x+1)(x+3) } \sim \frac{ - } { (-)(-)} = + ,\) so \( y \rightarrow 0 ^- \).Step 4: Vertical Asymptotes.
For the denominator to be 0, we have \( ( x + 1)(x+3) = 0 \), which gives us \( x = -1, x = - 3 \).
\([x = - 1]\)
As \( x \rightarrow -1 ^+ \), \( y = \frac{ x-2 } { (x+1)(x+3) } \sim \frac{ - } { (+)(+) } = - ,\) so \( y \rightarrow - \infty \).
As \( x \rightarrow -1 ^- \), \( y = \frac{ x-2} { (x+1)(x+3) } \sim \frac{ - } { (-)(+)} = + ,\) so \( y \rightarrow + \infty \).\( [x = - 3] \)
As \( x \rightarrow -3^+ \), \( y = \frac{ x-2} { (x+1)(x+3) } \sim \frac{ -}{(-)(+)} = + ,\) so \( y \rightarrow + \infty \).
As \( x \rightarrow -3^- \), \( y = \frac{ x-2} { (x+1)(x+3) } \sim \frac{ -}{(-)(-)} = - ,\) so \( y \rightarrow - \infty \).Step 5: Plot the information (see the green arrows/points) and draw the graph (see the thick black line).
Note: If you look at the right end of the graph, we infer from the information that there must be a maximum after \( x = 2 \), and the graph stays above the \(x\)-axis the whole time, hence its shape. If this portion is hard to draw, you can plot more points to see the actual shape.
Draw the graph of
\[ y = \frac{ x + 1 } { x^2 + 1 }. \]
Step 0 : There are no holes.
Step 1 : The \(y\)-intercept is \( \frac{0 + 1 } { 0 ^2 + 1 } = 1 \).
Step 2 : The \(x\)-intercept occurs when \( x + 1 = 0 \Rightarrow x = - 1 \).
Step 3: Since we have a degree 1 polynomial over a degree 2 polynomial, the horizontal asymptote is \( y = 0 \).
As \( x \rightarrow \infty \), \( y = \frac{ x+1}{ x^2 + 1 } \sim \frac{ + } { + } = +, \) so \( y \rightarrow + \infty \).
As \( x \rightarrow - \infty \), \( y = \frac{ x+1}{ x^2 + 1 } \sim \frac{ -} { + } = +, \) so \( y \rightarrow - \infty \).Step 4: The denominator is always positive, so there are no vertical asymptotes.
Step 5: Plot the information and draw the graph.
Once again, it is hard for us to tell how the maximum and the minimum of this graph behave. For now, we have to plot additional points around these values to see what these graphs look like.
We can get a much better idea of the shape of this graph using calculus in Graphing Using Derivatives.