<meta http-equiv="refresh" content="1; url=/nojavascript/">
You are reading an older version of this FlexBook® textbook: CK-12 Math Analysis Go to the latest version.

# 2.3: Rational Functions

Difficulty Level: At Grade Created by: CK-12

## Learning objectives

• Find the $x-$ and $y-$intercepts of a rational function
• Find the horizontal, vertical, and oblique asymptotes
• Graph a rational function using $x-$ and $y-$intercepts and asymptotes

## Standard Form of Rational Functions and the Domain of Rational Functions

Any function that has the form

$f(x)=\frac{P(x)}{Q(x)}$

where $P(x)$ and $Q(x)$ are polynomials and $Q(x)\ne0$, is called a rational function. The domain of any rational function includes all real numbers $x$ that do not make the denominator zero.

Example 1

What is the domain of $f(x)=\frac{1}{x}$?

Solution

Notice that the only input that can make the denominator equal to zero is $x=0$. Thus we say that the domain of $f(x)$ is all real numbers except $x=0$. When looking at the graph of $f(x)=\frac{1}{x}$ (Figure 13), you will notice that as $x$ approaches 0 from the left, $f(x)$ decreases. But when $x$ approaches 0 from the right, $f(x)$ increases. Because of this behavior, the $x-$axis and $y-$axis play the role of horizontal and vertical asymptotes, respectively.

## Graph Simple Rational Functions

Example 2

Graph the function $f(x)=\frac{1}{x}$.

Solution: We know that the domain of $f(x)$ is all real numbers excluding $x=0$. The vertical line $x=0$ is called a vertical asymptote. For $x<0, f(x)<0,$ and for $x>0, f(x)>0$. Plotting a few sample points should indicate the shape of $f(x)$.

$& x && 1 && 2 && 10 && \frac{1}{5} && \frac{1}{10} && -1 && -\frac{1}{2} && -\frac{1}{10} && -2 && -10\\& f(x)=\frac{1}{x} && 1 && \frac{1}{2} && \frac{1}{10} && 5 && 10 && -1 && -2 && -10 && -\frac{1}{2} && -\frac{1}{10}$

Example 3

What is the domain of $f(x)=\frac{x+2}{(x-1)(x+3)}$?

Solution

The domain is all real numbers except at the points that cause the denominator to equal zero, namely, at $x=1$ and at $x=-3$. We will discuss this function in more detail in the next section. Below is a sketch of the graph of $f(x)$.

## Vertical and Horizontal Asymptotes

An asymptote is a line or curve to which a function's graph draws closer without touching it. Functions cannot cross a vertical asymptote, and they usually approach horizontal asymptotes in their end behavior (i.e. as $x\rightarrow\pm\infty$). In the example above, the graph of $f(x)=\frac{1}{x}$ gets closer and closer to both axes, as $x$ becomes large $(x\rightarrow\pm\infty)$ or small $(x\rightarrow 0)$, but it does not touch the axes. This behavior is typical for most rational functions.

There are three types of asymptotes: horizontal, vertical and oblique. We will analyze each one below.

Looking at the graph of $f(x)=\frac{x+2}{(x-1)(x+3)}$ from the previous example, you will notice that it has two vertical asymptotes (the vertical dotted lines), one is at $x=1$ and the other is at $x=-3$.

We can find vertical asymptotes by simply equating the denominator to zero and then solving for $x$. In other words, if

$f(x)=\frac{P(x)}{Q(x)}$

Then setting $Q(x)=0$, will give the vertical asymptote(s).

So if

$f(x)=\frac{x+2}{(x-1)(x+3)}$

setting

$(x-1)(x+3)=0$

gives the vertical asymptotes at $x=1$ and $x=-3$.

The horizontal asymptote a line parallel to the $x-$axis which the function approaches but does not reach as $x\rightarrow\infty$ and $x\rightarrow -\infty$. To find the horizontal asymptote, we follow the procedure below:

How to Find the Horizontal Asymptote

• Put the rational function in a standard form. That is, expand the numerator and denominator if they are written in a factored form.
• Remove all terms except the terms that contain the largest exponents of $x$ in the numerator and the denominator.
• There are three possibilities:
• If the degree of the numerator is smaller than the degree of the denominator, then the horizontal asymptote crosses the $y-$axis at $y=0$. That is, it is the $x-$axis itself.
• If the degree of the denominator and the numerator are the same, then the horizontal asymptote equals to the ratio of the leading coefficients.
• If the degree of the numerator is larger than the degree of the denominator, then there is no horizontal asymptote.

Example 4

Find the vertical and horizontal asymptotes of

$f(x)=\frac{2x^{3}-2x^{2}+5}{3x^{3}-81}$

To find the vertical asymptote(s), set the denominator to zero and then solve for $x$.

$3x^{3}-81 & = 0\\3x^3 & = 81\\x^3 & = 27\\x & = \sqrt[3]{27}\\x & = 3$

Thus the graph has a vertical asymptote at $x=3$.

To find the horizontal asymptote, we follow the procedure above. Both the numerator and denominator are already written in standard form. Next, remove all terms except the largest exponents of $x$ that are found in the numerator and the denominator):

$\frac{2x^{3}}{3x^{3}}$

Notice that the degree of the numerator and the denominator are the same and therefore the horizontal asymptote is the ratio of the coefficients,

$\frac{2x^{3}}{3x^{3}}=\frac{2}{3}$

So the horizontal asymptote is at $y=\frac{2}{3}$.

Example 5

Find the asymptotes of

$f(x)=\frac{3x-2}{2x^{4}-9}$

Remove all terms except the leading terms,

$\frac{3x}{2x^{4}}$

Notice that the degree of the numerator is less than the degree of the denominator. Therefore, the horizontal asymptote is at $y=0$, i.e., the $x-$axis plays the role of the horizontal asymptote. To find the vertical asymptote, set the denominator equal to zero and solve:

$2x^{4}-9 & = 0\\x^4 & = \frac{9}{4}\\x & = \pm \frac{\sqrt{6}}{2}$

Example 6

Another example, consider the rational function

$g(x)=\frac{2x^{4}-9}{3x-2}$

Removing all terms except the leading terms of the numerator and denominator,

$\frac{2x^{4}}{3x}$

Here, the degree of the numerator is larger than the degree of the denominator. Thus there is no horizontal asymptote.

Once you have found the asymptotes, it is relatively easy to graph rational functions. We will illustrate how to graph rational functions with two examples.

Example 7

Graph

$T(x)=\frac{2x+1}{x-1}$

Solution

Note that the domain of $T$ is the set of all real numbers except 1, that is $x\ne 1$. This tells us that the line $x=1$ is a vertical asymptote of $T(x)$. To graph $T$, there are four important items that you need to find: The $y-$intercept, the $x-$intercept, the vertical asymptote and the horizontal asymptote.

The $y-$intercept can be found by finding $y=T(0)$.

$y=T(0)=\frac{2(0)+1}{0-1}=-1$

Thus the $y-$intercept is at point (0, -1).

The $x-$intercept can be found by setting $y=T(x)=0$.

$\frac{2x+1}{x-1}=0$

Note that a fraction $\frac{a}{b}=0$ if and only if $a=0$, so we can set the numerator of $T9$ solve

$2x+1 & = 0\\x & = \frac{-1}{2}$

Notice that we could have just set the numerator to zero and found the $x-$intercept. In general, set $P(x)=0$ to find the $x-$intercept for any rational function. BUT, you must make sure that the $x-$value you find is still defined for the function. If both $P(x)=0$ and $Q(x)=0$ for some value of $x$ then the graph has a hole in it.

Next, the vertical asymptote. Set $Q(x)=0$:

$x-1 & = 0\\x & = 1$

And the horizontal asymptote:

$\frac{2x+1}{x-1}\to\frac{2x}{x}=2$

Therefore, the vertical asymptote is at $x=1$ and the horizontal asymptote is at $y=2$. From this information, we can make the graph shown in Figure 15.

Example 8

Graph

$g(x)=\frac{2x^{2}+1}{2x^{2}-3x}$

Solution

The domain of $g$ is the set of all real numbers except 0 and $\frac{3}{2}$, that is $\left \{ x|x\ne 0 \ \text{and} \ x\ne\frac{3}{2} \right \}$. The $y-$intercept is

$y=g(0)=\frac{1}{0}=\text{undefined}$

this tells us that there is no $y-$intercept. The $x-$intercept can be found by setting the numerator to zero,

$2x^{2}+1 & = 0\\2x^2 & = -1\\x^2 & = \frac{-1}{2}\\x & = \sqrt{\frac{-1}{2}}$

Notice that this equation has no real solution and therefore, there is no $x-$intercept either.

The vertical asymptote can be found by setting the denominator to zero,

$2x^{2}-3x & = 0\\x(2x-3) & = 0$

The two solutions are $x=0$ and $x=\frac{3}{2}$, and these are the vertical asymptotes.

Finally, the horizontal asymptote is found by analyzing the leading terms:

$\frac{2x{}^{2}+1}{2x^{2}-3x}\to\frac{2x^{2}}{2x^{2}}=1$

That is, $y=1$ is a horizontal asymptote. Again after substituting in some points, we can sketch the graph of $g(x)$ below.

## Oblique Asymptotes

Thus far, we have restricted our discussion of rational functions to those where the degree of the numerator is less than or equal to the degree of the denominator. As our final analysis of graphing rational functions, we will consider the case when the degree of the numerator is greater than the degree of the denominator by one.

Example 9

Graph

$g(x)=\frac{x^{2}-1}{x-2}$

Solution

First observe that the vertical asymptote is at $x=2$. Notice that the degree of the numerator is greater than the degree of the denominator. We can change the form of the rational expression by long division. You may recall from algebra that polynomials can be divided (just like real numbers), and any rational functions can be written as

$\frac{f(x)}{D(x)}=Q(x)+\frac{R(x)}{D(x)}$

Doing the long division here,

$& \qquad \qquad x + 2 \\& x-2 \ \big ) \overline{x^{2} + 0x -1 }\\& \qquad \quad \underline{x^{2} -2x \ \ \downarrow}\\& \qquad \qquad \quad 2x -1\\& \qquad \qquad \quad \underline{2x -4}\\& \qquad \qquad \qquad \quad \ 3$

So in this case, the function $g(x)$ can be rewritten as

$g(x)=\frac{x^{2}-1}{x-2}=x+2+\frac{3}{x-2}$

The above equation tells us that as $x\to\pm\infty$, the graph of $g(x)=x+2+\frac{3}{x-2}$ gets closer and closer to the line $y=x+2$. Why? Suppose we let $x$ be a big number, i.e. $x=1,000,000$. Then the remainder of this rational function becomes $\frac{3}{999,998}\approx 0$ and we are left with $x+2$. We call this line an oblique asymptote and it is indicated by the dashed line in Figure 17.

Example 10

Graph

$f(x)=\frac{x^{2}-x-2}{x-1}$

Solution

The vertical asymptote here is $x=1$. Factoring the numerator and get

$f(x)=\frac{x^{2}-x-2}{x-1}=\frac{(x-2)(x+1)}{x-1}$

Notice that the $x-$intercepts are at $x=2$ and $x=-1$. By polynomial division, we get

$f(x)=x-\frac{2}{x-1}$

which indicates an oblique asymptote at $y=x$. Plotting few additional points, we finally obtain the graph shown below.

## Graph Rational Functions Using Transformation

Just like polynomials, rational functions can be graphed using transformations. The main point to remember for graphing rational functions by transformations is that some transformations change the asymptotes while others do not.

• $r(x)+c$ is a vertical shift which moves each horizontal asymptote up $c$ units (or down if $c<0$).
• $r(x-c)$ is a horizontal shift which moves each vertical asymptote right $c$ units (or left if $c<0$).
• $a\cdot r(x)$ is a vertical stretch which moves horizontal asymptotes by a multiple of $a$ (so this moves the horizontal asymptote closer to the $x-$axis if $a<0$.
• $r(a\cdot x)$ is a horizontal compression which moves the vertical asymptotes closer to $y-$axis by a factor of $\frac{1}{a}$.
• $r(-x)$ is a reflection about the $y-$axis. All vertical asymptotes are also reflected.
• $-r(x)$ is a reflection about the $x-$axis. All horizontal asymptotes are also reflected.

Example 11

A rational function $r(x)$ is shown in the figure below. Use the graph of $r(x)$ to sketch a graph of: a) $r(x)-3$, b) $-r(x)$, c) $r(3-x)$.

Solution

a) The horizontal asymptote moves down by three units

b) The function is reflected about the $x-$axis so the horizontal asymptote is also reflected:

c) $r(3-x)=r(-(x-3))$. First graph $r(-x)$, and then shift that graph three units to the right to get $r(-(x-3))$. The new vertical asymptote is $x=1$.

## Exercises

For each of the rational functions below, determine the domain, the asymptotes, the $x-$ and $y-$intercepts and then sketch the graph.

1. $f(x)=\frac{2x+5}{x-1}$
2. $f(x)=\frac{x+2}{x^{2}+1}$
3. $f(x)=\frac{9x^{2}-4}{3x-2}$
4. $f(x)=\frac{7}{3x^{2}}$
5. $f(x)=\frac{x^{3}}{x^{3}+1}$
6. $f(x)=\frac{14}{x^{2}-16}$
7. $f(x)=\frac{5(x-2)}{x^{2}-3x+2}$
8. $f(x)=\frac{x^{2}+1}{x-1}$
9. $f(x)=\frac{x^{3}-3x^{2}-4x}{x^{2}+3x}$
10. In physics, Boyle's law states that the product of the pressure $P$ and the volume $V$ of a container is always a constant. That is, $PV=\text{constant}$ Suppose the constant is equal to $4000 \ Pa.m^{2}$ (Pascals. square meters). So $P=\frac{4000}{V}$ where the pressure is measured in Pascals and the volume is in meters-squared. Sketch the graph of the equation for $v>0$.

1. Domain: $x\ne 1$; Vertical asymptote $x=1$; Horizontal asymptote $y=2$
2. Domain: All real numbers; Vertical asymptote: none; Horizontal asymptote: $y=0$
3. Domain: $x\ne\frac{2}{3}$; No asymptotes
4. Domain: $x\ne 0$; Vertical asymptote $x=0$; Horizontal asymptote $y=0$
5. Domain: $x\ne -1$; Vertical asymptote $x=-1$; Horizontal asymptote $y=1$
6. Domain: $x\ne\pm 4$; Vertical asymptote $x=\pm 4$; Horizontal asymptote $y=0$
7. Domain: $x\ne2, x\ne1$; Vertical asymptote $x=1$, Horizontal asymptote $y=0$
8. Domain: $x\ne 1$; Oblique asymptote $y=x+1$; Vertical asymptote $x=1$, Horizontal asymptote $y=0$
9. Domain: $x\ne0, x\ne -3$; Oblique asymptote $y=x-6$; Vertical asymptote $x=-3$, No horizontal asymptote

Feb 23, 2012

Dec 29, 2014