## Section14.9Rational Functions and Their Graphs

A polynomial function of degree $n\text{,}$ $n$ a non-negative integer, is a function that can be written in the form

\begin{equation*} f(x)=c_0+c_1x+c_2x^2+ \cdots +c_nx^n \end{equation*}

where $c_0,\,c_1\, \ldots,\,c_n$ are real numbers, $c_n \neq 0\text{.}$ The exponent on any given term is called the degree of that term. The numerical factor is called the coefficient of the term. The coefficient on the term of highest degree is called the leading coefficient.

Although we define polynomial functions with the terms listed in ascending order of degree, in practice we tend to write the terms in descending order of degree. For example, it is much more common to write $f(x)=3x^2+6x+2$ than it is to write $f(x)=2+6x+3x^2\text{.}$ Also, we omit terms with coefficients of zero and we use subtraction signs for terms where the coefficients are negative. Consider

\begin{equation*} g(x)=5x^4-x^2-6x. \end{equation*}

The function $g$ is a fourth-degree polynomial. The coefficients of the fourth (also called quartic), third (also called cubic), second (also called quadratic), first (also called liner), and zeroth (also called constant) terms are receptively:

\begin{equation*} c_4=5,\,c_3=0,\,c_2=-1,\,c_1=-6,\,\text{and},\,c_0=0. \end{equation*}

A rational function is a function that can be written in the form

\begin{equation*} f(x)=\frac{p(x)}{q(x)} \end{equation*}

where $p$ and $q$ are both rational functions, $q(x) \neq 0\text{.}$ Technically any polynomial function is also a rational function, because, for example, the polynomial function $f(x)=x+7$ can also be stated in the rational function form $f(x)=\frac{x+7}{1}\text{.}$ In practice, however, when we use the term "rational function," the implicit suggestion is that the variable appears in the polynomial resident in the denominator of the expression.

##### Graphs of Rational Functions - Vertical Asymptotes.

If the rational function $f$ can be written as $f(x)=\frac{p(x)}{q(x)}$ where $p$ and $q$ have no common factors, and $k$ is a real number solution to the equation $q(x)=0\text{,}$ then the vertical line $x=k$ is a vertical asymptote on a graph of $y=f(x)\text{.}$

The vertical asymptote is not actually part of the function, it is simply a visual aid to help the viewer of the graph understand that from either side of the line $x=k\text{,}$ the actual function is actual soaring up and up without limit or plummeting down and down without limit.

The function $f(x)=\frac{2}{x-3}$ is shown in FigureĀ 14.9.1. The vertical asymptote $x=3$ is also shown. From the left of the line, the actual function value falls without limit. We communicate this fall using the limit equation

\begin{equation*} \lim_{x\to 3^-}f(x)=-\infty. \end{equation*}

The limit equation stated above is read aloud as "the limit of $f(x)\text{,}$ as $x$ approaches 3 from the left, is (or equals) negative infinity." Similarly, for the function shown in FigureĀ 14.9.1 we would say that "the limit of $f(x)\text{,}$ as $x$ approaches 3 from the right, is infinity."" In symbols:

\begin{equation*} \lim_{x\to 3^+}f(x)=\infty. \end{equation*}

We see in FigureĀ 14.9.2 the cause of the asymptotic behavior. As the value of $x$ approaches 3 from either side of 3, the absolute value of the expression $x-3$ gets closer and closer to zero which causes the absolute value of $\frac{2}{x-3}$ to grow and grow with limit.

###### Example14.9.3.

Determine the vertical asymptotes for the function

\begin{equation*} f(x)=\frac{x-4}{x^2+7x+10}. \end{equation*}

Also, use limit notation to express the behavior of $f$ from either side of both asymptotes.

Solution

Setting the denominator equal to zero and solving we get the following.

\begin{align*} x^2+7x+10\amp=0\\ (x+5)(x+2)\amp=0 \end{align*}
\begin{align*} x+5\amp=0 \amp\amp\text{ or }\amp x+2\amp=0\\ x+5\subtractright{5}\amp=0\subtractright{5} \amp\amp\text{ or }\amp x+2\subtractright{2}\amp=0\subtractright{2}\\ x\amp=-5 \amp\amp\text{ or }\amp x\amp=-2 \end{align*}

The vertical asymptotes are the lines $x=-5$ and $x=-2\text{.}$ We can determine whether the function soars upward or plunges to the depths by testing values of $x$ a tenth of a unit to the left and right of each asymptote. Specifically, we are only interested in the signs of each of the factors in $f$ from wish we can infer the over all sign for $f\text{.}$ This is down in FigureĀ 14.9.4.

From the sign analysis in FigureĀ 14.9.4 we can infer the following for limits.

\begin{equation*} \lim_{x \to -5^-}f(x)=-\infty \end{equation*}
\begin{equation*} \lim_{x \to -5^+}f(x)=\infty \end{equation*}
\begin{equation*} \lim_{x \to -2^-}f(x)=\infty \end{equation*}
\begin{equation*} \lim_{x \to -2^+}f(x)=-\infty \end{equation*}

As a bonus, a graph of the function $y=\frac{x-4}{(x+5)(x+2)}$ is shown in FigureĀ 14.9.5.

##### Graphs of Rational Functions - Holes.

If $f(x)=\frac{p(x)}{q(x)}\text{,}$ and $p$ and $q$ share the common factor $x-k\text{,}$ and the factor is completely eliminated from the denominator upon simplification, then the function $f$ has a hole at the point corresponding to $x=k\text{.}$

###### Example14.9.6.

Determine all vertical asymptotes and holes on a graph of the function

\begin{equation*} g(x)=\frac{x^2-3x-10}{x^2-6x+5}\text{.} \end{equation*}
Solution

We begin by factoring and simplifying the formula for $g\text{.}$

\begin{align*} g(x)\amp=\frac{x^2-3x-10}{x^2-6x+5}\\ \amp=\frac{(x-5)(x+2)}{(x-5)(x-1)}\\ \amp=\frac{x-5}{x-5} \cdot \frac{x+2}{x-1}\\ \amp=\frac{x+2}{x-1};\,\,x \neq 5 \end{align*}

The function $g$ has a hole where $x=5$ and the line $x=1$ is a vertical asymptote on a graph of $g\text{.}$ As bonus, a graph of $g$ is shown in FigureĀ 14.9.7.

##### Graphs of Rational Functions - Intercepts.

As with any function of form $y=f(x)\text{,}$ the vertical-intercept is determined by replacing $x$ by zero and the horizontal-intercept(s) are determined by setting the function formula equal to zero. In the case of rational functions, we begin by factoring and simplifying the function formula. Once that is done we determine the horizontal-intercept by setting the numerator of the expression equal to zero.

###### Example14.9.8.

Determine the intercepts, vertical asymptotes, and holes on a graph of the function

\begin{equation*} f(x)=\frac{x^2+x-6}{x^2-4}. \end{equation*}
Solution

We begin by factoring and simplifying the formula for $f\text{.}$

\begin{align*} f(x)\amp=\frac{x^2+x-6}{x^2-4}\\ \amp=\frac{(x-2)(x+3)}{(x-2)(x+2)}\\ \amp=\frac{x-2}{x-2} \cdot \frac{x+3}{x+2}\\ \amp=\frac{x+3}{x+2},\,\,x \neq 2 \end{align*}

Replacing $x$ with zero in the simplified formula for $f\text{,}$ we determine that the vertical-intercept on the graph of $y=f(x)$ is the point $(0,1.5)\text{.}$ In the simplified formula for $f$ we can see that the only value of $x$ that creates zero in the numerator is $-3\text{,}$ so the only horizontal-intercept is $(-3,0)\text{.}$ We can tell by the elimination of the factor $x-2$ from the denominator of $f$ that $f$ has a hole where $x=2\text{.}$ Replacing $x$ with two in the simplified formula for $f\text{,}$ we can see that the hole is specifically at the point $(2,1.25)\text{.}$ Finally, from the simplified formula for $f\text{,}$ we can see that a graph of $y=f(x)$ includes the vertical asymptote $x=-2\text{.}$

You might anticipate a bonus graph of $f\text{,}$ and if you do your insight is keen. See FigureĀ 14.9.9.

###### Example14.9.10.

Determine all intercepts, holes, and vertical asymptotes on a graph of the functions

\begin{equation*} h(x)=\frac{x^2+4}{x+2}\,\,\text{and}r(x)=\frac{x+2}{x^2+4}. \end{equation*}
Solution

We begin by observing that neither function simplifies in any way, because $x^2+4$ is prime (i.e., does not factor). We also observe that the equation $x^2+4=0$ has no real number solutions, because there are no real numbers that satisfy the equation $x^2=-4\text{.}$ The answers to the stated questions are presented in FigureĀ 14.9.11 and the bonus graphs of the functions are shown in FigureĀ 14.9.12 and FigureĀ 14.9.13.

##### Graphs of Rational Functions - Horizontal and Slant Asymptotes.

The end behavior of a function is a term we use to contextualize what happens to the curve as $x \rightarrow -\infty$ and $x \rightarrow \infty\text{.}$ This behavior for a rational function is dependent upon the relative degrees of the polynomials in the numerator and denominator of the function formula. These behaviors are summarized below.

If the degree of the numerator is equal the degree of the denominator, then the line $y=\frac{c_{\text{num}}}{c_{\text{den}}}$ is a horizontal asymptote for the graph where $c_{\text{num}}$ and $c_{\text{den}}$ are, respectively, the leading coefficients in the numerator and denominator. This is illustrated in FigureĀ 14.9.14 for the function

\begin{equation*} y=\frac{x+4}{(x+6)(x-3)}\text{.} \end{equation*}

If the degree of the numerator is less than the degree of the denominator, then the line $y=0$ is a horizontal asymptote for the graph. This is illustrated in FigureĀ 14.9.15 for the function

\begin{equation*} y=\frac{6x-2}{3x-5}\text{.} \end{equation*}

Note that the line $y=2$ is the horizontal asymptote because the ratio of the leading coefficients, $\frac{6}{3}\text{,}$ simplifies to 2.

If the degree of the numerator is greater than the degree of the denominator, then the graph of the function does not have a horizontal asymptote. If the degree of the numerator is exactly one more than the degree of the denominator, then the graph includes a slant (or skew) asymptote.

This document does not cover how to determine the equation of such an asymptote, but one is illustrated in FigureĀ 14.9.16 for the function

\begin{equation*} y=\frac{x^2-9}{x-1}\text{.} \end{equation*}

If the degree of the numerator is more than one greater than the degree of the denominator, we generally don't categorize the graph as having an end-behavior asymptote.

### ExercisesExercises

For each function determine and state all intercepts, asymptotes, and holes.

###### 1.

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

Solution

Horizontal-intercept: $(4,0)$ Vertical-intercept: $\left(0,-\frac{4}{3}\right)$ Vertical-asymptote: $x=-3$ Horizontal-asymptote: $y=1$ Holes: None

###### 2.

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

Solution

Horizontal-intercept: $(-3,0)$ Vertical-intercept: None Vertical-asymptote: $x=0$ Horizontal-asymptote: $y=-2$ Holes: None

###### 3.

$h(x)=\frac{x^2-5x-14}{x^2-10x+21}$

Solution

We begin by factoring and simplifying the expression.

\begin{align*} h(x)\amp=\frac{x^2-5x-14}{x^2-10x+21}\\ \amp=\frac{(x-7)(x+2)}{(x-7)(x-3)}\\ \amp=\frac{x-7}{x-7} \cdot \frac{x+2}{x-3}\\ \amp=\frac{x+2}{x-3},\,\,x \neq 7 \end{align*}

Horizontal-intercept: $(-2,0)$ Vertical-intercept: $\left(0,-\frac{2}{3}\right)$ Vertical-asymptote: $x=3$ Horizontal-asymptote: $y=1$ Holes: $(7,2.25)$

###### 4.

$k(x)=\frac{x+5}{x^2-16}$

Solution

We begin by factoring the expression.

\begin{align*} k(x)\amp=\frac{x+5}{x^2-16}\\ \amp=\frac{x+5}{(x-4)(x+4)} \end{align*}

Horizontal-intercept: $(-5,0)$

Vertical-intercept: $\left(0,-\frac{5}{16}\right)$

Vertical-asymptotes: $x=4$ and $x=-4$

Horizontal-asymptote: $y=0$

Holes: None

###### 5.

$p(x)=\frac{8-2x^2}{x^2+4}$

Solution

We begin by factoring the expression.

\begin{align*} p(x)\amp=\frac{8-2x^2}{x^2+4}\\ \amp=\frac{2(4-x^2)}{x^2+4}\\ \amp=\frac{2(2-x)(2+x)}{x^2+4} \end{align*}

Horizontal-intercepts: $(2,0)$ and $(-2,0)$

Vertical-intercept: $(0,2)$

Vertical-asymptotes: None

Horizontal-asymptote: $y=-2$

Holes: None