# 12.2: Graphs of Rational Functions

Difficulty Level: At Grade Created by: CK-12

## Learning Objectives

• Compare graphs of inverse variation equations.
• Graph rational functions.
• Solve real-world problems using rational functions.

## Introduction

In this section, you will learn how to graph rational functions. Graphs of rational functions are very distinctive. These functions are characterized by the fact that the function gets closer and closer to certain values but never reaches those values. In addition, because rational functions may contain values of \begin{align*}x\end{align*} where the function does not exit, the function can take values very close to the excluded values but never “cross” through these values. This behavior is called asymptotic behavior and we will see that rational functions can have horizontal asymptotes, vertical asymptotes or oblique (or slant) asymptotes.

## Compare Graphs of Inverse Variation Equations

Inverse variation problems are the simplest example of rational functions. We saw that an inverse variation has the general equation: \begin{align*}y=\frac{k}{x}\end{align*}. In most real-world problems, the \begin{align*}x\end{align*} and \begin{align*}y\end{align*} values take only positive values. Below, we will show graphs of three inverse variation functions.

Example 1

On the same coordinate grid, graph an inverse variation relationships with the proportionality constants \begin{align*}k = 1, k = 2,\end{align*} and \begin{align*}k = \left(\frac{1}{2} \right )\end{align*}.

Solution

We will not show the table of values for this problem, but rather we can show the graphs of the three functions on the same coordinate axes. We notice that for larger constants of proportionality, the curve decreases at a slower rate than for smaller constants of proportionality. This makes sense because, basically the value of \begin{align*}y\end{align*} is related directly to the proportionality constants so we should expect larger values of \begin{align*}y\end{align*} for larger values of \begin{align*}k\end{align*}.

## Graph Rational Functions

We will now extend the domain and range of rational equations to include negative values of \begin{align*}x\end{align*} and \begin{align*}y\end{align*}. We will first plot a few rational functions by using a table of values, and then we will talk about distinguishing characteristics of rational functions that will help us make better graphs.

Recall that one of the basic rules of arithmetic is that you cannot divide by 0.

\begin{align*}\frac{0}{5}=0\end{align*}

while

\begin{align*}\frac{5}{0}= \text{Undefined}.\end{align*}

As we graph rational functions, we need to always pay attention to values of \begin{align*}x\end{align*} that will cause us to divide by 0.

Example 2

Graph the function \begin{align*}y=\frac{1}{x}\end{align*}.

Solution

Before we make a table of values, we should notice that the function is not defined for \begin{align*}x = 0\end{align*}. This means that the graph of the function will not have a value at that point. Since the value of \begin{align*}x = 0\end{align*} is special, we should make sure to pick enough values close to \begin{align*}x = 0\end{align*} in order to get a good idea how the graph behaves. Let’s make two tables: one for \begin{align*}x-\end{align*}values smaller than zero and one for \begin{align*}x-\end{align*}values larger than zero.

\begin{align*}x\end{align*} \begin{align*}y=\frac {1}{x}\end{align*}
\begin{align*}-5\end{align*} \begin{align*}y =\frac {1}{-5}=-0.2\end{align*}
-4 \begin{align*}y =\frac {1}{-4}=-0.25\end{align*}
-3 \begin{align*}y=\frac {1}{-3}=-0.33\end{align*}
-2 \begin{align*}y=\frac {1}{-2}=-0.5\end{align*}
-1 \begin{align*}y=\frac {1}{-1}=-1\end{align*}
-0.5 \begin{align*}y =\frac {1}{-0.5}=-2\end{align*}
-0.4 \begin{align*}y =\frac {1}{-0.4}=-2.5\end{align*}
-0.3 \begin{align*}y=\frac {1}{-0.3}=-3.3\end{align*}
-0.2 \begin{align*}y =\frac {1}{-0.2}=-5\end{align*}
-0.1 \begin{align*}y =\frac {1}{-0.1}=-10\end{align*}
\begin{align*}x\end{align*} \begin{align*}y=\frac {1}{x}\end{align*}
0.1 \begin{align*}y=\frac {1}{0.1}=10\end{align*}
0.2 \begin{align*}y =\frac {1}{0.2}=5\end{align*}
0.3 \begin{align*}y=\frac {1}{0.3}=3.3\end{align*}
0.4 \begin{align*}y =\frac {1}{0.4}=2.5\end{align*}
0.5 \begin{align*}y=\frac {1}{0.5}=2\end{align*}
1 \begin{align*}y=\frac {1}{1}=1\end{align*}
2 \begin{align*}y =\frac {1}{2}=0.5\end{align*}
3 \begin{align*}y=\frac {1}{3}=0.33\end{align*}
4 \begin{align*}y=\frac {1}{4}=0.25\end{align*}
5 \begin{align*}y =\frac {1}{5}=0.2\end{align*}

We can see in the table that as we pick positive values of \begin{align*}x\end{align*} closer and closer to zero, \begin{align*}y\end{align*} becomes increasing large. As we pick negative values of \begin{align*}x\end{align*} closer and close to zero, \begin{align*}y\end{align*} becomes increasingly small (or more and more negative).

Notice on the graph that for values of \begin{align*}x\end{align*} near 0, the points on the graph get closer and closer to the vertical line \begin{align*}x = 0\end{align*}. The line \begin{align*}x = 0\end{align*} is called a vertical asymptote of the function \begin{align*}y = \left( \frac{1}{x} \right )\end{align*}.

We also notice that as \begin{align*}x\end{align*} gets larger in the positive direction or in the negative direction, the value of \begin{align*}y\end{align*} gets closer and closer to, but it will never actually equal zero. Why? Since \begin{align*}y = \left( \frac{1}{x} \right )\end{align*}, there are no values of \begin{align*}x\end{align*} that will make the fraction zero. For a fraction to equal zero, the numerator must equal zero. The horizontal line \begin{align*}y = 0\end{align*} is called a horizontal asymptote of the function \begin{align*}y=\left ( \frac{1}{x} \right )\end{align*}.

Asymptotes are usually denoted as dashed lines on a graph. They are not part of the function. A vertical asymptote shows that the function cannot take the value of \begin{align*}x\end{align*} represented by the asymptote. A horizontal asymptote shows the value of \begin{align*}y\end{align*} that the function approaches for large absolute values of \begin{align*}x\end{align*}.

Here we show the graph of our function with the vertical and horizontal asymptotes drawn on the graph.

Next we will show the graph of a rational function that has a vertical asymptote at a non-zero value of \begin{align*}x\end{align*}.

Example 3

Graph the function \begin{align*} y=\frac {1}{(x-2)^2}\end{align*}.

Solution

Before we make a table of values we can see that the function is not defined for \begin{align*}x = 2\end{align*} because that will cause division by 0. This tells us that there should be a vertical asymptote at \begin{align*}x = 2\end{align*}. We start graphing the function by drawing the vertical asymptote.

Now let’s make a table of values.

\begin{align*}x\end{align*} \begin{align*}y = \frac {1}{(x-2)^2}\end{align*}
0 \begin{align*}y= \frac {1}{(0-2)^2} = \frac {1}{4}\end{align*}
1 \begin{align*}y= \frac {1}{(1-2)^2} = 1\end{align*}
1.5 \begin{align*}y= \frac {1}{(1.5-2)^2} = 4\end{align*}
2 \begin{align*}\text{undefined}\end{align*}
2.5 \begin{align*}y = \frac {1}{(2.5-2)^2} = 4\end{align*}
3 \begin{align*}y= \frac {1}{(3-2)^2} = 1\end{align*}
4 \begin{align*}y= \frac {1}{(4-2)^2} = \frac {1}{4}\end{align*}

Here is the resulting graph

Notice that we did not pick as many values for our table this time. This is because we should have a good idea what happens near the vertical asymptote. We also know that for large values of \begin{align*}x\end{align*}, both positive and negative, the value of \begin{align*}y\end{align*} could approach a constant value.

In this case, that constant value is \begin{align*}y = 0\end{align*}. This is the horizontal asymptote.

A rational function does not need to have a vertical or horizontal asymptote. The next example shows a rational function with no vertical asymptotes.

Example 4

Graph the function \begin{align*} y = \frac {x^2}{x^2+1}\end{align*}.

Solution

We can see that this function will have no vertical asymptotes because the denominator of the function will never be zero. Let’s make a table of values to see if the value of \begin{align*}y\end{align*} approaches a particular value for large values of \begin{align*}x\end{align*}, both positive and negative.

\begin{align*}x\end{align*} \begin{align*}y= \frac {x^2}{x^2+1}\end{align*}
\begin{align*}-3\end{align*} \begin{align*}y= \frac {(-3)^2}{(-3)^2+1} = \frac {9}{10} = 0.9\end{align*}
-2 \begin{align*}y= \frac {(-2)^2}{(-2)^2+1} = \frac {4}{5} = 0.8\end{align*}
-1 \begin{align*}y= \frac {(-1)^2}{(-1)^2+1} = \frac {1}{2} = 0.5\end{align*}
0 \begin{align*}y= \frac {(0)^2}{(0)^2+1} = \frac {0}{1} = 0\end{align*}
1 \begin{align*}y= \frac {(1)^2}{(1)^2+1} = \frac {1}{2} = 0.5\end{align*}
2 \begin{align*}y= \frac {(2)^2}{(2)^2+1} = \frac {4}{5} = 0.8\end{align*}
2 \begin{align*}y= \frac {(3)^2}{(3)^2+1} = \frac {9}{10} = 0.9\end{align*}

Below is the graph of this function.

The function has no vertical asymptote. However, we can see that as the values of \begin{align*}|x|\end{align*} get larger the value of \begin{align*}y\end{align*} get closer and closer to 1, so the function has a horizontal asymptote at \begin{align*}y = 1\end{align*}.

More on Horizontal Asymptotes

We said that a horizontal asymptote is the value of \begin{align*}y\end{align*} that the function approaches for large values of \begin{align*}|x|\end{align*}. When we plug in large values of \begin{align*}x\end{align*} in our function, higher powers of \begin{align*}x\end{align*} get larger more quickly than lower powers of \begin{align*}x\end{align*}. For example,

\begin{align*}y=\frac {2x^2+x-1}{3x^2-4x+3}\end{align*}

If we plug in a large value of \begin{align*}x\end{align*}, say \begin{align*}x = 100\end{align*}, we obtain:

\begin{align*}y = \frac{2(100)^2+(100)-1}{3(100)^2-4(100)+3} = \frac{20000+100-1}{30000-400+2}\end{align*}

We can see that the first terms in the numerator and denominator are much bigger that the other terms in each expression. One way to find the horizontal asymptote of a rational function is to ignore all terms in the numerator and denominator except for the highest powers.

In this example the horizontal asymptote is \begin{align*}y=\frac {2x^2}{3x^2}\end{align*} which simplifies to \begin{align*} y=\frac {2}{3}\end{align*}.

In the function above, the highest power of \begin{align*}x\end{align*} was the same in the numerator as in the denominator. Now consider a function where the power in the numerator is less than the power in the denominator.

\begin{align*} y=\frac {x}{x^2+3}\end{align*}

As before, we ignore all but the terms except the highest power of \begin{align*}x\end{align*} in the numerator and the denominator.

Horizontal asymptote \begin{align*}y=\frac {x}{x^2}\end{align*} which simplifies to \begin{align*}y= \frac {1}{x}\end{align*}

For large values of \begin{align*}x\end{align*}, the value of \begin{align*}y\end{align*} gets closer and closer to zero. Therefore the horizontal asymptote in this case is \begin{align*}y = 0\end{align*}.

To Summarize

• Find vertical asymptotes by setting the denominator equal to zero and solving for \begin{align*}x\end{align*}.
• For horizontal asymptotes, we must consider several cases for finding horizontal asymptotes.
• If the highest power of \begin{align*}x\end{align*} in the numerator is less than the highest power of \begin{align*}x\end{align*} in the denominator, then the horizontal asymptote is at \begin{align*}y = 0\end{align*}.
• If the highest power of \begin{align*}x\end{align*} in the numerator is the same as the highest power of \begin{align*}x\end{align*} in the denominator, then the horizontal asymptote is at \begin{align*}y=\frac {\text{coefficient of highest power of} \ x}{\text{coefficient of highest power of} \ x}\end{align*}
• If the highest power of \begin{align*}x\end{align*} in the numerator is greater than the highest power of \begin{align*}x\end{align*} in the denominator, then we don’t have a horizontal asymptote, we could have what is called an oblique (slant) asymptote or no asymptote at all.

Example 5

Find the vertical and horizontal asymptotes for the following functions.

a) \begin{align*}y = \frac {1}{x-1}\end{align*}

b) \begin{align*}y= \frac {3x}{4x+2}\end{align*}

c) \begin{align*}y=\frac {x^2-2}{2x^2+3}\end{align*}

d) \begin{align*}y=\frac {x^3}{x^2-3x+2}\end{align*}

Solution

a) Vertical asymptotes

Set the denominator equal to zero. \begin{align*}x-1=0\Rightarrow x=1\end{align*} is the vertical asymptote.

Horizontal asymptote

Keep only highest powers of \begin{align*}x\end{align*}. \begin{align*}y=\frac {1}{x}\Rightarrow y=0\end{align*} is the horizontal asymptote.

b) vertical asymptotes

Set the denominator equal to zero. \begin{align*}4x+2=0\Rightarrow x=-\frac{1}{2}\end{align*} is the vertical asymptote.

Horizontal asymptote

Keep only highest powers of \begin{align*}x\end{align*}. \begin{align*}y=\frac {3x}{4x}\Rightarrow y=\frac{3}{4}\end{align*} is the horizontal asymptote.

c) Vertical asymptotes

Set the denominator equal to zero. \begin{align*} 2x^2+3 = 0 \Rightarrow 2x^2 = -3 \Rightarrow x^2 = -\frac{3}{2}\end{align*} Since there are no solutions to this equation therre is no vertical asymptote.

Horizontal asymptote

Keep only highest powers of \begin{align*}x\end{align*}. \begin{align*}y=\frac {x^2}{2x^2} \Rightarrow y= \frac {1}{2}\end{align*} is the horizontal asymptote.

d) Vertical asymptotes

Set the denominator equal to zero. \begin{align*} x^2-3x+2=0\end{align*}

Factor. \begin{align*} (x-2)(x-1)=0\end{align*}

Solve. \begin{align*}x = 2\end{align*} and \begin{align*}x = 1\end{align*} vertical asymptotes

Horizontal asymptote. There is no horizontal asymptote because power of numerator is larger than the power of the denominator

Notice the function in part \begin{align*}d\end{align*} of Example 5 had more than one vertical asymptote. Here is an example of another function with two vertical asymptotes.

Example 6

Graph the function \begin{align*}y=\frac {-x^2}{x^2-4}\end{align*}.

Solution

We start by finding where the function is undefined.

Let’s set the denominator equal to zero. \begin{align*}x^2-4= 0\end{align*}

Factor. \begin{align*}(x-2)(x-2) = 0\end{align*}

Solve. \begin{align*}x = 2,x = -2\end{align*}

We find that the function is undefined for \begin{align*}x = 2\end{align*} and \begin{align*}x = -2\end{align*}, so we know that there are vertical asymptotes at these values of \begin{align*}x\end{align*}.

We can also find the horizontal asymptote by the method we outlined above.

Horizontal asymptote is at \begin{align*}y=\frac {-x^2}{x^2}\end{align*} or \begin{align*}y = -1\end{align*}.

Start plotting the function by drawing the vertical and horizontal asymptotes on the graph.

Now, let’s make a table of values. Because our function has a lot of detail we must make sure that we pick enough values for our table to determine the behavior of the function accurately. We must make sure especially that we pick values close to the vertical asymptotes.

\begin{align*}x\end{align*} \begin{align*}y = \frac {-x^2}{x^2-4}\end{align*}
\begin{align*}-5\end{align*} \begin{align*}y = \frac {-(-5)^2}{(-5)^2-4} = \frac {-25}{21} = -1.19\end{align*}
-4 \begin{align*}y = \frac {-(-4)^2}{(-4)^2-4} = \frac {-16}{12} = -1.33\end{align*}
-3 \begin{align*}y = \frac {-(-3)^2}{(-3)^2-4} = \frac {-9}{5} = -1.8\end{align*}
-2.5 \begin{align*}y = \frac {-(-2.5)^2}{(-2.5)^2-4} = \frac {-6.25}{2.25} = -2.8\end{align*}
-1.5 \begin{align*}y = \frac {-(-1.5)^2}{(-1.5)^2-4} = \frac {-2.25}{-1.75} = 1.3\end{align*}
-1 \begin{align*}y = \frac {-(-1)^2}{(-1)^2-4} = \frac {-1}{-3} = 0.33\end{align*}
-0 \begin{align*}y = \tfrac {(-0)^2}{(-0)^2-4} = \tfrac {0}{-4} = 0\end{align*}
1 \begin{align*}y= \frac {-1^2}{(1)^2-4} = \frac {-1}{-3} = 0.33\end{align*}
1.5 \begin{align*}y = \frac {-1.5^2}{(1.5)^2-4} = \frac {-2.25}{-1.75} = 1.3\end{align*}
2.5 \begin{align*}y = \frac {-2.5^2}{(2.5)^2-4} = \frac {-6.25}{2.25} = -2.8\end{align*}
3 \begin{align*}y = \frac {-3^2}{(-3)^2-4} = \frac {-9}{5} = -1.8\end{align*}
4 \begin{align*}y = \frac {-4^2}{(-4)^2-4} = \frac {-16}{12} = -1.33\end{align*}
5 \begin{align*}y = \frac {-5^2}{(-5)^2-4} = \frac {-25}{21} = -1.19\end{align*}

Here is the resulting graph.

## Solve Real-World Problems Using Rational Functions

Electrical Circuits

Electrical circuits are commonplace is everyday life. For instance, they are present in all electrical appliances in your home. The figure below shows an example of a simple electrical circuit. It consists of a battery which provides a voltage (\begin{align*}V\end{align*}, measured in Volts, \begin{align*}V\end{align*}), a resistor (\begin{align*}R\end{align*}, measured in ohms, \begin{align*}\Omega\end{align*}) which resists the flow of electricity, and an ammeter that measures the current (\begin{align*}I\end{align*}, measured in amperes, \begin{align*}A\end{align*}) in the circuit.

Ohm’s Law gives a relationship between current, voltage and resistance. It states that

\begin{align*}I=\frac {V}{R}\end{align*}

Your light bulb, toaster and hairdryer are all basically simple resistors. In addition, resistors are used in an electrical circuit to control the amount of current flowing through a circuit and to regulate voltage levels. One important reason to do this is to prevent sensitive electrical components from burning out due to too much current or too high a voltage level. Resistors can be arranges in series or in parallel.

For resistors placed in a series, the total resistance is just the sum of the resistances of the individual resistors.

\begin{align*}R_{tot} = R_1 + R_2\end{align*}

For resistors placed in parallel, the reciprocal of the total resistance is the sum of the reciprocals of the resistance of the individual resistors.

\begin{align*}\frac {1}{R_c}=\frac {1}{R_1}+\frac {1}{R_2}\end{align*}

Example 7

Find the quantity labeled \begin{align*}x\end{align*} in the following circuit.

Solution

We use the formula that relates voltage, current and resistance \begin{align*} I=\frac {V}{R}\end{align*}

Plug in the known values \begin{align*}I = 2 A, V = 12 V\end{align*}: \begin{align*}2=\frac{12}{R}\end{align*}

Multiply both sides by \begin{align*}R\end{align*}. \begin{align*}2R = 12\end{align*}

Divide both sides by \begin{align*}2\end{align*}. \begin{align*}R = 6 \ \Omega\end{align*}

Answer \begin{align*}6 \ \Omega\end{align*}

Example 8

Find the quantity labeled \begin{align*}x\end{align*} in the following circuit.

Solution

Ohm’s Law also says \begin{align*}I_{total}=\frac {V_{total}}{R_{total}}\end{align*}

Plug in the values we know, \begin{align*}I = 2.5 \ A\end{align*} and \begin{align*}E = 9V\end{align*}.

\begin{align*}2.5=\frac {9}{R_{total}}\end{align*}

Multiply both sides by \begin{align*}R_{total}\end{align*}. \begin{align*}2.5R_{total}=9\end{align*}

Divide both sides by \begin{align*}2.5\end{align*}. \begin{align*}R_{tot}=3.6 \ \Omega\end{align*}

Since the resistors are placed in parallel, the total resistance is given by

\begin{align*}\frac {1}{R_{total}} & = \frac{1}{x}+\frac{1}{20} \\ \Rightarrow \frac {1}{3.6} & = \frac {1}{x}+\frac{1}{20}\end{align*}

Multiply all terms by \begin{align*}72X\end{align*}. \begin{align*}\frac {1}{3.6} (72x) = \frac {1}{x} (72x) + \frac {1}{20} (72x)\end{align*}

Cancel common factors. \begin{align*}20x = 72 + 3.6X\end{align*}

Solve. \begin{align*}16.4 x= 72\end{align*}

Divide both sides by 1\begin{align*}6.4. x= 4.39 \ \Omega\end{align*}

Answer \begin{align*}x = 4.39 \ \Omega\end{align*}

## Review Questions

Find all the vertical and horizontal asymptotes of the following rational functions.

1. \begin{align*}y=\frac {4}{x+2}\end{align*}
2. \begin{align*}y=\frac {5x-1}{2x-6}\end{align*}
3. \begin{align*}y=\frac {10}{x}\end{align*}
4. \begin{align*}y=\frac {4x^2}{4x^2+1}\end{align*}
5. \begin{align*}y=\frac {2x}{x^2-9}\end{align*}
6. \begin{align*}y=\frac {3x^2}{x^2-4}\end{align*}
7. \begin{align*}y=\frac {1}{x^2+4x+3}\end{align*}
8. \begin{align*}y=\frac {2x+5}{x^2-2x-8}\end{align*}

Graph the following rational functions. Draw dashed vertical and horizontal lines on the graph to denote asymptotes.

1. \begin{align*}y=\frac {y}{2-x^3}\end{align*}
2. \begin{align*}y=\frac {3}{x^2}\end{align*}
3. \begin{align*}y=\frac {x}{x-1}\end{align*}
4. \begin{align*}y=\frac {2x}{x+1}\end{align*}
5. \begin{align*}y=\frac {-1}{x^2+2}\end{align*}
6. \begin{align*}y=\frac {x}{x^2+9}\end{align*}
7. \begin{align*}y=\frac {x^2}{x^2+1}\end{align*}
8. \begin{align*}y=\frac {1}{x^2-1}\end{align*}
9. \begin{align*}y=\frac {2x}{x^2-9}\end{align*}
10. \begin{align*}y=\frac {x^2}{x^2-16}\end{align*}
11. \begin{align*}y=\frac {3}{x^2-4x+4}\end{align*}
12. \begin{align*}y=\frac {x}{x^2-x-6}\end{align*}

Find the quantity labeled \begin{align*}x\end{align*} in the following circuit.

1. vertical \begin{align*}x = -2\end{align*}; horizontal \begin{align*}y = 0\end{align*}
2. vertical \begin{align*}x = 3\end{align*}; horizontal \begin{align*}y = \frac{5}{2}\end{align*}
3. vertical \begin{align*}x = 0\end{align*}; horizontal \begin{align*}y = 0\end{align*}
4. no vertical; horizontal \begin{align*}y = 1\end{align*}
5. vertical \begin{align*}x = 3, x = -3\end{align*}; horizontal \begin{align*}y = 0\end{align*}
6. vertical \begin{align*}x = 2, x = -2\end{align*}; horizontal \begin{align*}y = 3\end{align*}
7. vertical \begin{align*}x = -1, x = -3\end{align*}; horizontal \begin{align*}y = 0\end{align*}
8. vertical \begin{align*}x = 4, x = -2\end{align*}; horizontal \begin{align*}y = 0\end{align*}
9. 18 V
10. 12.5 ohms
11. 2.5 Amperes
12. 10 ohms

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes

Show Hide Details
Description
Tags:
Subjects: