Skip to main content

Section 3.5 Rational Functions and Inequalities

  • A rational function is a function of the form
    \begin{equation*} f(x)=\frac{P(x)}{Q(x)} \end{equation*}
    where \(P\) and \(Q\) are polynomials and \(Q \not= 0\text{.}\)
  • Domain: all real numbers except the real zeros of the denominator.

Example 3.5.1.

Find the domain of each function. Write your answer in interval notation.
\begin{equation*} \text{(a) }f(x)=\frac{2}{x^2-2x-35} \quad \quad \quad \quad \quad \quad \text{ (b) }f(x)=\frac{2x^2-1}{x^3-36x} \quad \quad \quad \quad \quad \quad \quad \end{equation*}
Solution
(a) Factor the denominator to find its zeros.
\begin{equation*} x^2-2x-35=(x-7)(x+5) \end{equation*}
This tells us that \(-5\) and \(7\) should be excluded.
\begin{align*} \text{Domain} \amp =\{ x|x \not=-5, 7 \} \\ \amp =(- \infty, -5) \cup (-5,7) \cup (7, \infty) \end{align*}
(b) Factor the denominator:
\begin{align*} x^3-36x \amp =x(x^2-36) \\ \amp =x(x-6)(x+6) \end{align*}
So, we should exclude \(-6\text{,}\) \(0\text{,}\) and \(6\text{.}\)
\begin{align*} \text{Domain} \amp =\{ x|x \not= -6, 0, 6 \} \\ \amp =(-\infty,-6) \cup (-6,0) \cup (0,6) \cup (6,\infty) \end{align*}

Subsection 3.5.1 Vertical Asymptotes

Example 3.5.2.

Let \(f(x)=\frac{1}{x}\text{.}\) Describe the behavior of the graph of \(f(x)\) when \(x\) is close to \(0\text{.}\)
Solution
First, consider values of \(x\) that approach \(0\) from the left. We write this as \(x \to 0^-\text{,}\) which we read as "\(x\) approaches \(0\) from the left."
\begin{equation*} \begin{array}{|c|c|c|c|c|} \hline x \amp -0.1 \amp -0.01 \amp -0.001 \amp 0 \\ \hline f(x)=\frac{1}{x} \amp -10 \amp -100 \amp -1,000 \amp \\[0.15 em] \hline \end{array} \end{equation*}
As the table shows, \(y \to - \infty\) as \(x \to 0^-\text{.}\) In limit notation, we write:
\begin{equation*} \lim_{x \to 0^-}\frac{1}{x}=-\infty \end{equation*}
Now repeat the process using values of \(x\) that approach \(0\) from the right, denoted by \(x \to 0^+\text{.}\)
\begin{equation*} \begin{array}{|c|c|c|c|c|} \hline x \amp 0 \amp 0.001 \amp 0.01 \amp 0.1 \\ \hline f(x)=\frac{1}{x} \amp \amp 1,000 \amp 100 \amp 10 \\[0.15 em] \hline \end{array} \end{equation*}
As the table shows, \(y \to \infty\) as \(x \to 0^+\text{.}\) In limit notation, we write:
\begin{equation*} \lim_{x\to 0^+}\frac{1}{x} =\infty \end{equation*}
From both sides of \(x=0\text{,}\) the values of \(f(x)\) become larger and larger in absolute value.
\begin{equation*} \lim_{x \to 0} \left| \frac{1}{x} \right|= \infty \end{equation*}
If \(|f(x)| \to \infty\) as \(x \to a\text{,}\) then the vertical line \(x=a\) is a vertical asymptote. Using limit notation, \(x=a\) is a vertical asymptote if \(\lim\limits_{x \to a} |f(x)|=\infty\text{.}\)
  • Vertical asymptotes are typically drawn with dashed lines.
  • The graph of a rational function does not cross a vertical asymptote.
In ExampleΒ 3.5.2, \(x=0\) (\(y\)-axis) is the vertical asymptote of \(f(x)=\frac{1}{x}\text{.}\)
Figure 3.5.3. The graph of \(f(x)=\frac{1}{x}\) approaches the line \(x=0\text{,}\) its vertical asymptote, from both sides.

Subsection 3.5.2 Finding Vertical Asymptotes

If \(f(x)=\frac{P(x)}{Q(x)}\) is in lowest terms, then there is a vertical asymptote \(x=r\) if \(r\) is a zero of the denominator \(Q\text{.}\)

Example 3.5.4.

Find the vertical asymptotes, if any, of each function.
\begin{equation*} \text{(a) }f(x)=\frac{x}{x^2-4} \quad \quad \quad \quad \quad \quad \quad \quad \text{ (b) }f(x)=\frac{x^2-9}{x^2+4x-21} \quad \quad \quad \quad \quad \quad \quad \end{equation*}
Solution: Β  Factor the numerator and denominator to see if \(f(x)\) is in lowest terms.
(a) The numerator cannot be factored and we can use difference of squares to factor the denominator:
\begin{equation*} f(x) = \frac{x}{(x-2)(x+2)} \end{equation*}
This fraction is clearly in lowest terms.
Since the zeros of the denominator are \(-2\) and \(2\text{,}\) we conclude that the vertical asymptotes are \(x=-2\) and \(x=2\).
(b) We can factor the numerator using difference of squares:
\begin{equation*} x^2-9=(x-3)(x+3) \end{equation*}
To factor the denominator, we need two numbers that multiply to \(-21\) and add to \(4\text{.}\) \(-3\) and \(7\) work.
\begin{equation*} x^2+4x-21=(x-3)(x+7) \end{equation*}
Now, eliminate common factors:
\begin{equation*} f(x)=\frac{(x-3)(x+3)}{(x-3)(x+7)}=\frac{x+3}{x+7} \quad \quad \quad \text{if } x \not= 3. \end{equation*}
The only zero of the reduced denominator is \(-7\text{,}\) so the vertical asymptote is \(x=-7\).
So, what about \(x=3\text{?}\) There will be a hole in the graph. To determine the point where the hole is, plug \(3\) into the reduced fraction:
\begin{equation*} \frac{3+3}{3+7}=\frac{6}{10}=\frac{3}{5} \end{equation*}
Therefore, there is a hole in the graph at \(\left(3, \frac{3}{5} \right)\text{.}\)

Subsection 3.5.3 Horizontal and Oblique Asymptotes

If \(f(x) \to a\) as \(x \to -\infty\) or \(x \to \infty\text{,}\) then the line \(y=a\) is a horizontal asymptote. Using limit notation, \(y=a\) is a horizontal asymptote if
\begin{equation*} \lim\limits_{x \to -\infty}f(x)=a \quad or \quad \lim\limits_{x \to \infty}f(x)=a. \end{equation*}
  • Horizontal asymptotes are typically drawn with dashed lines.
  • A rational function can only have one horizontal asymptote.

Example 3.5.5.

Describe the behavior of \(f(x)=\frac{1}{x}\) as \(x \rightarrow \infty \text{ }\) or \(\text{ } x \rightarrow -\infty\text{.}\)
Solution
First, we consider what happens when \(x \to -\infty\text{:}\)
\begin{equation*} \begin{array}{|c|c|c|c|} \hline x \amp -1000 \amp -100 \amp -10 \\ \hline f(x)=\frac{1}{x} \amp -0.001 \amp -0.01 \amp -0.1 \\[0.15 em] \hline \end{array} \end{equation*}
As the table shows, \(y \to 0\) as \(x \to -\infty\text{.}\) In limit notation, we write:
\begin{equation*} \lim_{x \to -\infty}\frac{1}{x}=0 \end{equation*}
Next, we consider what happens when \(x \to \infty\text{:}\)
\begin{equation*} \begin{array}{|c|c|c|c|} \hline x \amp 10 \amp 100 \amp 1,000 \\ \hline f(x)=\frac{1}{x} \amp 0.1 \amp 0.01 \amp 0.001 \\[0.15 em] \hline \end{array} \end{equation*}
As the table shows, \(y \to 0\) as \(x \to \infty\text{.}\) In limit notation, we write:
\begin{equation*} \lim_{x \to \infty} \frac{1}{x}=0 \end{equation*}
We conclude that \(f(x) \to 0\) when \(x\to -\infty\) or \(x \to \infty\text{.}\)
Therefore, \(y=0\) (\(x\)-axis) is a horizontal asymptote.
Figure 3.5.6. The graph of \(f(x)=\frac{1}{x}\text{.}\)
If the graph of \(f(x)\) gets closer and closer to the non-horizontal line \(y=mx+b\) as \(x \to - \infty\) or \(x \to \infty\text{,}\) then the line \(y=mx+b\) is an oblique asymptote.

Subsection 3.5.4 Finding Horizontal and Oblique Asymptotes

Let \(f(x)\) be a rational function.
  1. If degree of numerator \(\lt\) degree of denominator, then \(y=0\) (\(x\)-axis) is the horizontal asymptote.
  2. If degree of numerator \(=\) degree of denominator, then the horizontal asymptote is
    \begin{equation*} y=\frac{\text{leading coefficient of numerator}}{\text{leading coefficient of denominator}} \end{equation*}
  3. If the degree of the numerator is one more than the degree of the denominator, divide the numerator by the denominator and rewrite
    \begin{equation*} f(x)=\text{Quotient } + \frac{\text{Remainder}}{\text{Divisor}}\text{.} \end{equation*}
    Then
    \begin{equation*} y=\text{Quotient} \end{equation*}
    is the oblique asymptote.

Example 3.5.7.

Find the horizontal or oblique asymptote of each function.
\begin{equation*} \text{(a) }f(x)=\frac{2x^2-12}{x^2+4} \quad \quad \quad \quad \quad \quad \quad \quad \text{ (b) }f(x)=\frac{2x^2+3x-5}{x+2} \quad \quad \quad \quad \quad \quad \quad \end{equation*}
Solution
(a) The numerator and the denominator have the same degree (\(2\)), which tells us that the horizontal asymptote is \(y=2\) since:
\begin{equation*} \frac{\text{leading coefficient of } 2x^2-12}{\text{leading coefficient of }x^2+4}=\frac{2}{1}=2. \end{equation*}
(b) The numerator has degree \(1\) higher than the denominator, so divide \((2x^2+3x-5)\) by \(x+2\text{.}\)
\begin{equation*} \begin{array}{c|rrr} -2 \amp 2 \amp 3 \amp -5 \\ \amp \amp -4 \amp +2 \\ \hline \amp 2 \amp -1 \amp -3 \end{array} \end{equation*}
The bottom row tells us that the quotient is \(2x-1\text{,}\) so we have the oblique asymptote
\begin{equation*} y=2x-1. \end{equation*}

Subsection 3.5.5 Graphing Rational Functions

To graph a rational function in lowest terms:
  1. Determine the asymptotes and draw them as dashed lines.
  2. Check for symmetry.
  3. Find any intercepts.
  4. Plot several selected points to determine how the graph approaches the asymptotes.
  5. Draw curves through the selected points, approaching the asymptotes.

Example 3.5.8.

Sketch the graph of \(f(x)=\frac{2}{x^2-1}\text{.}\)
Solution
Step \(1\): Determine the asymptotes.
\(f(x)\) is clearly in lowest terms since the numerator is constant.
\begin{equation*} \frac{2}{x^2-1}=\frac{2}{(x-1)(x+1)} \end{equation*}
The denominator has a value of \(0\) if \(x=\pm 1\text{.}\) So, the vertical asymptotes are \(x=1\) and \(x=-1\text{.}\)
The denominator has higher degree than the numerator, so the horizontal asymptote is the \(x\)-axis.
Step \(2\): Check for symmetry.
Find \(f(-x)\text{.}\)
\begin{align*} f(-x) \amp = \frac{2}{(-x)^2-1} \\[0.25em]\\ \amp =\frac{2}{(-1)^2x^2-1} \\[0.25em]\\ \amp =\frac{2}{x^2-1} \\[0.25em]\\ \amp =f(x) \end{align*}
So, the graph is symmetric about the \(y\)-axis.
Step \(3\): Find the intercepts.
The \(y\)-intercept is \((0,-2)\) since
\begin{equation*} f(0)=\frac{2}{0^2-1}=-2 \end{equation*}
Since the numerator is never zero, the equation \(f(x)=0\) has no solution. Therefore, there are no \(x\)-intercepts.
Steps \(4\) and \(5\):
For the vertical asymptote \(x=1\text{,}\) we will find \(f(0.99)\) and \(f(1.01)\text{.}\)
\(f(0.99)=-100.5 \quad \) which implies that \(\quad \lim\limits_{x \to 1^- }f(x)=-\infty\)
\(f(1.01)=99.50 \quad \text{ }\) which implies that \(\quad \text{ } \lim\limits_{x \to 1^+} f(x)=\infty\)
Since the graph of \(f\) is symmetric about the \(y\)-axis, we know how the graph approaches the vertical asymptote \(x=-1\text{.}\)
Finally, find \(f(2)\) and \(f(3)\) to determine whether the graph approaches the horizontal asymptote from above or below.
Figure 3.5.9. Graph of the rational function \(f(x)=\frac{2}{x^2-1}\) and a table for two points on the graph.

Example 3.5.10.

Sketch the graph of \(f(x)=\frac{2x+2}{x-1}\text{.}\)
Solution
Step \(1\): Determine the asymptotes.
We confirm that \(f(x)\) is in lowest terms by factoring
\begin{equation*} \frac{2x+2}{x-1}=\frac{2(x+1)}{x-1} \end{equation*}
The denominator has a value of \(0\) if \(x=1\text{.}\) So, \(x=1\) is a vertical asymptote of the graph of \(f(x)\text{.}\)
The numerator and the denominator have the same degree (\(1\)), so the horizontal asymptote is \(y=2\) since
\begin{equation*} \frac{\text{leading coefficient of }2x+2}{\text{leading coefficient of }x-1} =\frac{2}{1}=2. \end{equation*}
Step \(2\): Check for symmetry.
Find \(f(-x)\text{.}\)
\begin{equation*} f(-x)=\frac{2(-x)+2}{(-x)-1}=\frac{-2x+2}{-x-1} \end{equation*}
This result is not equal to \(f(x)\) or \(-f(x)\text{.}\) Thus, the graph of \(f\) is not symmetric about the \(y\)-axis or the origin.
Step \(3\): Find the intercepts.
The \(y\)-intercept is \((0,-2)\) because
\begin{equation*} f(0)=\frac{2(0)+2}{0-1}=\frac{2}{-1}=-2. \end{equation*}
The equation \(f(x)=0\) only has a solution when the numerator is \(0\text{.}\) So, we solve \(2x+2=0\) and get \(x=-1\text{.}\)
Therefore, the \(x\)-intercept is \((-1,0)\text{.}\)
Steps \(4\) and \(5\):
For the vertical asymptote \(x=1\text{,}\) we will find \(f(0.99\) and \(f(1.01)\text{.}\)
\(f(0.99)=-398 \quad\) which implies that \(\quad \lim\limits_{x \to 1^-}f(x) = -\infty\)
\(f(1.01)=402 \quad \text{ }\) which implies that \(\quad \text{ } \lim\limits_{x \to 1^+}f(x)=\infty\)
Next, find \(f(-3)\text{,}\) \(f(2)\text{,}\) and \(f(3)\) to determine how the graph approaches the horizontal asymptote \(y=2\text{.}\)
Figure 3.5.11. Graph of the rational function \(f(x)=\frac{2x+2}{x-1}\) and a table for three points on the graph.

Example 3.5.12.

Sketch the graph of \(f(x)=\frac{x^4-16x^2}{x^2-16}\text{.}\) Find the domain first.
Solution: Β  Solve \(x^2-16=0\) to find the \(x\)-values that need to be excluded from the domain.
Factor using Difference of Squares:
\begin{equation*} (x-4)(x+4)=0 \end{equation*}
We need to exclude \(-4\) and \(4\text{.}\)
Therefore, the domain is \((-\infty, -4) \cup (-4,4) \cup (4,\infty)\text{.}\)
Step \(1\): Find the asymptotes
Factoring \(x^2\) out of the numerator, we find that
\begin{equation*} f(x)=\frac{x^2(x^2-16)}{x^2-16}=x^2 \quad \quad \quad \text{for } x \not=-4 \text{ and } x \not= 4. \end{equation*}
The reduced function is no longer a rational function. So, there aren’t any asymptotes.
Since \(f(x)\) is undefined at \(-4\) and \(4\text{,}\) and we don’t have vertical asymptotes, there are two holes in the graph: \((-4,16)\) and \((4,16)\text{.}\)
In conclusion, the graph of \(f\) is the graph of \(x^2\) with the two aforementioned holes. See FigureΒ 3.5.13 below for a general sketch.
Figure 3.5.13. The graph of \(f(x)=\frac{x^4-16x^2}{x^2-16}\text{,}\) a parabola with two holes.

Subsection 3.5.6 Application: Average Cost

Example 3.5.14.

The cost of renting a car for one day is \(\$39\) plus \(30 \) cents per mile. Write the average cost per mile \(C\) as a function of the number of miles driven in one day \(x\text{.}\) What happens to \(C\) as the number of miles gets very large?
Solution
First, find \(C(x)\text{:}\)
\begin{equation*} C(x)=\frac{\text{total cost}}{\# \text{ of miles driven}}=\frac{39+0.30x}{x} \end{equation*}
If the number of miles gets very large, then \(x \to \infty\text{.}\) So, we want to find \(\lim\limits_{x \to \infty}C(x)\text{,}\) the horizontal/oblique asymptote.
The numerator and the denominator have the same degree (\(1\)), which tells us that the horizontal asymptote is \(y=0.30\) since:
\begin{equation*} \frac{\text{leading coefficient of }39+0.30x}{\text{leading coefficient of }x}=\frac{0.30}{1}=0.30 \end{equation*}
Therefore, we conclude that \(C\) approaches \(\$0.30\) as the number of miles gets very large.