# 8.5 Polynomial and Rational Functions

## Polynomial Functions

Terminology of Polynomial Functions

A polynomial is a function that can be written as $f(x)=a_0+a_1 x+a_2 x^2+\dots+a_n x^n$
Each of the $a_i$ constants are called coefficients and can be positive, negative, or zero, and be whole numbers, decimals, or fractions.
A term of the polynomial is any one piece of the sum, that is any $a_i x^i$. Each individual term is a transformed power function.
The degree of the polynomial is the highest power of the variable that occurs in the polynomial.
The leading term is the term containing the highest power of the variable: the term with the highest degree.
Because of the definition of the “leading” term we often rearrange polynomials so that the powers are descending: $f(x)=a_n x^n+a_{n-1}x^{n-1}\dots a_2 x^2+a_1 x+a_0$

#### Example 1

Identify the degree, leading term, and leading coefficient of the polynomial $f(x)=3+2x^2-4x^3$

The degree is 3, the highest power on $x$. The leading term is the term containing that power, $-4x^3$. The leading coefficient is the coefficient of that term, -4.

## Intercepts

As with any function, the vertical intercept can be found by evaluating the function at an input of zero. Since this is evaluation, it is relatively easy to do it for a polynomial of any degree – it will always be equal to the value of the constant term.

On the other hand, to find horizontal intercepts, we need to solve for when the output will be zero. For general polynomials, this can be a challenging prospect. Consequently, we will limit ourselves to three cases:

1. The polynomial can be factored using known methods: greatest common factor, difference of squares, and quadratic formula.
2. The polynomial is given in factored form.
3. Technology is used to determine the intercepts.

Recall the difference of squares formula:

$a^2-b^2=(a-b)(a+b)$

$ax^2+bx+c=a(x-x_1)(x-x_2)\text{ where } x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$

#### Example 2

Find the horizontal intercepts of $f(x)=x^6-3x^4+2x^2$.

We can attempt to factor this polynomial to find solutions for $f(x) = 0$:

$x^6-3x^4+2x^2=0\rightarrow$ factoring out the greatest common factor:

$x^2(x^4-3x^2+2)=0\rightarrow$ factoring the expression in the bracket as a quadratic in variable $yx^2$:

\begin{align*} x^4-3x^2+2&=y^2-3y+2=a(y-y_1)(y-y_2)\\ &\Rightarrow y_{1,2}=\frac{-(-3)\pm\sqrt{(-3)^2-4\cdot 1\cdot 2}}{2\cdot 1}=\frac{3\pm 1}{2}\\ &\Rightarrow y_1=2, y_2=1\\ &\Rightarrow x^4-3x^2+2=1\cdot(x^2-2)(x^2-1)\\ &\Rightarrow x^4-3x^2+2=(x-\sqrt{2})(x+\sqrt{2})(x-1)(x+1) \end{align*}

And so

$x^2(x-\sqrt{2})(x+\sqrt{2})(x-1)(x+1)=0$ if and only if $x=0, \sqrt{2}, -\sqrt{2}, 1$ or $-1$.

This gives us five horizontal intercepts: $(0,0),(\sqrt{2},0), ( -\sqrt{2},0), (1,0)$ and $(-1,0)$.

#### Example 3

Find the horizontal intercepts of $h(t)=t^3+4t^2+t-6$

Since this polynomial is not in factored form, has no common factors, and does not appear to be factorable using techniques we know, we can turn to technology to find the intercepts.
Graphing this function using an online calculator (for example, see its graph on Desmos), it appears there are horizontal intercepts at $t = -3, -2,$ and $1$. We could check these are correct by plugging in these values for $t$ and verifying that, indeed, $h(-3)=h(-2)=h(1)=0$.

## Solving Polynomial Inequalities

One application of our ability to find intercepts and sketch a graph of polynomials is the ability to solve polynomial inequalities. It is a very common question to ask when a function will be positive and negative, and one we will use later in this course.

#### Example 4

Solve $(x+3)(x+1)^2(x-4)\gt 0$

As with all inequalities, we start by solving the equality $(x+3)(x+1)^2(x-4)= 0$, which has solutions at $x =$ -3, -1, and 4. We know the function can only change from positive to negative at these values, so these divide the inputs into 4 intervals.
We can then choose a test value in each interval and evaluate each of the factors of the function $f(x)=(x+3)(x+1)^2(x-4)$ at each test value to determine if each of the factors, and thus the overall function, is positive or negative in that interval:

 Interval $(-\infty,-3)$ $(-3,-1)$ $(-1,4)$ $(4,\infty)$ $(x+3)$ $-$ $+$ $+$ $+$ $(x+1)^2$ $+$ $+$ $+$ $+$ $(x-4)$ $-$ $-$ $-$ $+$ $(x+3)(x+1)^2(x-4)$ $+$ $-$ $-$ $+$

Hence, $(x+3)(x+1)^2(x-4)\gt 0$ on $(-\infty,-3)\cup (4,\infty)$.

You can also verify this by defining a function $f(x)=(x+3)(x+1)^2(x-4)$ and graphing it using an graphing calculator such as Desmos. If we consider the graph of $f(x)$ (see Desmos), we can see that this function is positive, i.e., $f(x)>0$ on the intervals $(-\infty,-3)$ and $(4,\infty)$.

## Rational Functions

Rational functions are the ratios, or fractions, of polynomials. They can arise from both simple and complex situations.

#### Example 5

You plan to drive 100 miles. Find a formula for the time the trip will take as a function of the speed you drive.

You may recall that multiplying speed by time will give you distance. If we let $t$ represent the drive time in hours, and $v$ represent the velocity (speed or rate) at which we drive, then $vt=$ distance. Since our distance is fixed at 100 miles, $vt=100$. Solving this relationship for the time gives us the function we desired: $t(v)=\frac{100}{v}$

Notice that this is a transformation of the reciprocal toolkit function, $f(x)=\dfrac{1}{x}$. Several natural phenomena, such as gravitational force and volume of sound, behave in a manner inversely proportional to the square of another quantity. For example, the volume, $V$, of a sound heard at a distance $d$ from the source would be related by $V=\dfrac{k}{d^2}$ for some constant value $k$. These functions are transformations of the reciprocal squared toolkit function $f(x)=\dfrac{1}{x^2}$.

In business the most common rational function is the average cost function $\bar{C}(x)$:

$\bar{C}(x)=\frac{C(x)}{x}, \ \ \ \ x>0$

where $x$ is the number of units and $C(x)$ is the cost of producing $x$ units. Then $\bar{C}(x)$ represents the average cost per unit if $x$ units are produced.

We have seen the graphs of the basic reciprocal function and the squared reciprocal function from our review of toolkit functions. These graphs have several important features. $f(x)=\frac{1}{x}$ $f(x)=\frac{1}{x^2}$

Let’s begin by looking at the reciprocal function, $f(x)=\dfrac{1}{x}$. As you well know, dividing by zero is not allowed and therefore zero is not in the domain, and so the function is undefined at an input of zero.

### Short Run behavior:

As the input values approach zero from the left side (taking on very small, negative values), the function values become very large in the negative direction (in other words, they approach negative infinity). We write: $x\to 0^-$, $f(x)\to -\infty$.

As we approach zero from the right side (small, positive input values), the function values become very large in the positive direction (approaching infinity). We write: as $x\to 0^+$, $f(x)\to \infty$.

This behavior creates a vertical asymptote.

An asymptote is a line that the graph approaches. In this case the graph is approaching the vertical line $x = 0$ as the input approaches zero.

### Long Run behavior:

As the values of $x$ approach infinity, the function values approach 0. Also, as the values of $x$ approach negative infinity, the function values approach 0. Symbolically: as $x\to\pm\infty$, $f(x)\to 0$.

Based on this long run behavior and the graph we can see that the function approaches 0 but never actually reaches 0, it just “levels off” as the inputs become large. This behavior creates a horizontal asymptote . In this case the graph is approaching the horizontal line $f(x)=0$ as the input becomes very large in the negative and positive directions.

### Vertical and Horizontal Asymptotes

A vertical asymptote of a graph is a vertical line $x = a$ where the graph tends towards positive or negative infinity as the inputs approach $a$. As $x\to a$, $f(x)\to\pm\infty$.

A horizontal asymptote of a graph is a horizontal line $y=b$ where the graph approaches the line as the inputs get large. As $x\to\pm\infty$, $f(x)\to b$.

#### Example 6

Sketch a graph of the reciprocal function shifted two units to the left and up three units. Identify the horizontal and vertical asymptotes of the graph, if any.

Transforming the graph left 2 and up 3 would result in the function $f(x)=\dfrac{1}{x+2}+3$, or equivalently, by giving the terms a common denominator, $f(x)=\dfrac{3x+7}{x+2}.$
Shifting the toolkit function would give us this graph. Notice that this equation is undefined at $x = -2$, and the graph also is showing a vertical asymptote at $x = -2$. As $x\to -2^-$, $f(x)\to -\infty$, and as $x\to -2^+$, $f(x)\to \infty$. As the inputs grow large, the graph appears to be leveling off at output values of 3, indicating a horizontal asymptote at $y=3$. As $x\to\pm\infty$, $f(x)\to 3$
Notice that horizontal and vertical asymptotes get shifted left 2 and up 3 along with the function.

A general rational function is the ratio of any two polynomials.

A rational function is a function that can be written as the ratio of two polynomials, $P(x)$ and $Q(x)$.
$f(x)=\frac{P(x)}{Q(x)}=\frac{a_0+a_1 x+a_2 x^2+\dots+a_p x^p}{b_0+b_1 x+b_2 x^2+\dots+b_q x^q}$

Rational functions can arise from real situations.

#### Example 7

A large mixing tank currently contains 100 gallons of water, into which 5 pounds of sugar have been mixed. A tap will open pouring 10 gallons per minute of water into the tank and, at the same time, sugar is poured into the tank at a rate of 1 pound per minute. Find the concentration (pounds per gallon) of sugar in the tank after $t$ minutes.

Notice that the amount of water in the tank is changing linearly, as is the amount of sugar in the tank. We can write an equation independently for each:$\text{water}=100+10t \qquad \text{sugar}=5+1t$
The concentration, $C$, will be the ratio of pounds of sugar to gallons of water: $C(t)=\frac{5+t}{100+10t}$

### Domain, Holes and Vertical Asymptotes of a Rational Function

The domain of a rational function will be all real numbers except for those that make the denominator zero.

The vertical asymptotes of a rational function will occur where the denominator of the function is equal to zero and the numerator is not zero.

If both the numerator and the denominator are zero for some input value, then the graph of the function has a hole at that input value.

Typically, to determine whether and where a rational function has a vertical asymptote and/or a hole, we must rewrite both the numerator and the denominator in the factored form, and use that to determine for which input values each of them is zero.

For example, the function $f(x)=\dfrac{5x^2-14x-3}{2x^2-6x}$ can be factored using quadratic formula as follows (verify):

$f(x)=\frac{5\left(x+\dfrac{1}{5}\right)(x-3)}{2x(x-3)}$

Numerator $= 0: x=\frac{1}{5}, 3$

Denominator $=0: x=0, 3$

Therefore, there is a vertical asymptote at $x=0$ and a hole at $x=3$.

Graphically: Desmos

### Horizontal Asymptote of a Rational Function

The horizontal asymptote of a rational function can be determined by looking at the degrees of the numerator and denominator. Suppose we have:

$f(x)=\frac{a_mx^m+a_{m-1}x^{m-1}+\ldots+a_1x+a_0}{b_nx^n+b_{n-1}x^{n-1}+\ldots+b_1x+b_0}$

• Degree of denominator > degree of numerator: horizontal asymptote at $y=0$.
• Degree of denominator < degree of numerator: no horizontal asymptote.
• Degree of denominator = degree of numerator: horizontal asymptote at ratio of leading coefficients, $y=\dfrac{a_m}{b_n}$ ($m$ and $n$ are equal in this case).

In business, you can think of the horizontal asymptote as a “floor” or a “ceiling”, depending on how the graph of the function behaves around the asymptote.

#### Example 8

In the sugar concentration problem from earlier, we created the equation $C(t)=\frac{5+t}{100+10t}$. Find the horizontal asymptote and interpret it in context of the scenario.

Both the numerator and denominator are linear (degree 1), so since the degrees are equal, there will be a horizontal asymptote at the ratio of the leading coefficients. In the numerator, the leading term is $t$, with coefficient 1. In the denominator, the leading term is $10t$, with coefficient 10. The horizontal asymptote will be at the ratio of these values: As $t \to \infty$, $C(t)\to \frac{1}{10}$. This function will have a horizontal asymptote at $y=\frac{1}{10}$.

This tells us that as the input gets large, the output values will approach $\frac{1}{10}$. In context, this means that as more time goes by, the concentration of sugar in the tank will approach one tenth of a pound of sugar per gallon of water or $\frac{1}{10}$ pounds per gallon.

#### Example 9

Find the horizontal and vertical asymptotes of the function $f(x)=\frac{(x-2)(x+3)}{(x-1)(x+2)(x-5)}$

First, note this function is has no inputs that make both the numerator and denominator zero, so there are no potential holes. The function will have vertical asymptotes when the denominator is zero, causing the function to be undefined. The denominator will be zero at $x =$ 1, -2, and 5, indicating vertical asymptotes at these values.
The numerator has degree 2, while the denominator has degree 3. Since the degree of the denominator is greater than the degree of the numerator, the denominator will grow faster than the numerator, causing the outputs to tend towards zero as the inputs get large, and so as $x\to\pm\infty$, $f(x)\to 0$. This function will have a horizontal asymptote at $y=0$.

#### Example 10

A manufacturer has determined that it costs them $68,220 to produce 7,000 units of a specific product per day and$81,000 to produce 9,000 per day. Assuming that the cost and the production are linearly related, determine the cost function $C(x)$ and the average cost function $\bar{C}(x)$ in terms of the daily production of $x$ number of units. Determine their domains and holes, vertical asymptotes and horizontal asymptotes, if any, and interpret their meaning in the context of this problem. Calculate $C(20000)$and $\bar{C}(20000)$ and interpret the results.

Task: $C(x)=?$, $\bar{C}(x)=?$ where $C$ is cost, $\bar{C}$ is average daily cost, $x$ is number of units produced per day; domain, holes and asymptotes and interpretation for each?; $C(20000)=?$ , $\bar{C}(2000)=?$, interpretation for each?

Conditions: $C$ and $x$ linearly related $\Rightarrow C(x)=mx+b$ for some $m$ and $b$.

$C(x)=?$

$m=\frac{\text{change in output}}{\text{change in input}}=\frac{68220 -81000}{7000-9000}=6.39$

Therefore, $C(x)=6.39x+b$.

$b=?:$ at $x=7000, C(x)=68220$ and so

\begin{align*} 68220=6.39(7000)+b&\Rightarrow b=68220-6.39(7000)=23490\\ &\Rightarrow C(x)=6.39x+23490 \end{align*}

domain of $C(x)$?

$C(x)$ can be calculated for all $x$, but $x=$ number of units, so $x\ge 0$.

Therefore, domain of $C(x)$: $[0,\infty)$, i.e., theoretically, the cost can be calculated using $C(x)=6.39x+23490$ for any nonnegative value of $x$.

holes, vertical asymptotes of $C(x)$?

$C(x)$ is a linear function, so it is a polynomial, and therefore has no holes or vertical or horizontal asymptotes.

$\bar{C}(x)=?$

$\bar{C}(x)=\frac{C(x)}{x}=\frac{6.39x+23490}{x}=6.39+\frac{23490}{x}$

domain of $\bar{C}(x)$?

$\bar{C}(x)$ can be calculated for all $x\neq 0$, but $x=$ number of units, so $x> 0$.

Therefore, domain of $\bar{C}(x)$: $(0,\infty)$.

Note that this makes sense because we can’t calculate average cost if no units have been produced, i.e., if $x=0$.

holes, vertical asymptotes of $\bar{C}(x)$?

$\bar{C}(x)$ is a rational function, so we must investigate when the denominator is zero and check that against when the numerator is zero.

Since the denominator is zero only when $x=0$ and the numerator is not equal to zero when $x=0$, we get a vertical asymptote at $x=0$, with $\bar{C}(x)=6.39+\frac{23490}{x}$ approaching $\infty$. In other words, the average cost per unit approaches infinity as the number of units approaches 0.

Since the numerator and the denominator are of the same degree (1, since linear), there will be a horizontal asymptote at $\frac{6.39}{1}=6.39$. This means that in the long run, as the production increases, the average cost approaches the value of $6.39/unit. Note that this makes sense in the business context because, when calculating the average cost per unit, the fixed cost is spread out across the units. So the more units are produced, the less of a contribution the fixed cost makes to the average cost of one unit. This makes the average cost very close to the variable cost per unit if the daily production gets sufficiently high. You can also visualize that from $\bar{C}(x)=6.39+\frac{23490}{x}$ because, as $x$ approaches infinity, the value of $\frac{23490}{x}$ approaches 0. $C(20000)=?$ $C(2000)=6.39(20000)+23490=151290$ This means that the cost of producing 20,000 units per day is$151,290.

$\bar{C}(20000)=?$

$\bar{C}(20000)=6.39+\frac{23490}{20000}=7.5645 \approx 7.56$

This means that, at the daily production level of 20,000 units, the average cost is approximately \$7.56 per unit.

For visualization, here are the graphs of the cost function $C(x)$ and the average cost function $\bar{C}(x)$. Confirm visually their characteristics that we determined above.

Cost function: Desmos

Average cost function: Desmos

### Horizontal and Vertical Intercepts of a Rational Function

As with all functions, a rational function will have a vertical intercept when the input is zero, if the function is defined at zero. It is possible for a rational function to not have a vertical intercept if the function is undefined at zero. This will occur when the numerator is zero, but the denominator is not.

Likewise, a rational function will have horizontal intercepts at the inputs that cause the output to be zero (unless that input corresponds to a hole). It is possible there are no horizontal intercepts. Since a fraction is only equal to zero when we are dividing zero with a non-zero number, horizontal intercepts will occur when the numerator of the rational function is equal to zero but the denominator is not.

#### Example 11

Find the intercepts of $f(x)=\frac{(x-2)(x+3)}{(x-1)(x+2)(x-5)}$

We can find the vertical intercept by evaluating the function at zero: $f(0)=\frac{(0-2)(0+3)}{(0-1)(0+2)(0-5)}=\frac{-6}{10}=-\frac{3}{5}.$
The horizontal intercepts will occur when the function is equal to zero:
\begin{align*} 0 & = \frac{(x-2)(x+3)}{(x-1)(x+2)(x-5)} \qquad \text{(This is zero when the numerator is zero.)}\\ &\\ &\Rightarrow 0 = (x-2)(x+3)\\ &\\ &\Rightarrow x = 2, -3 \end{align*}

## Summary of characteristics of polynomial and rational functions

#### Summary of characteristics of polynomial functions

A polynomial function is defined on all real numbers, i.e., its domain is $(-\inft,\infty)$.

A polynomial function has no holes or asymptotes.

A polynomial function approaches $\infty$ or $-\infty$ in the long run, depending on the degree and the leading coefficient of the polynomial. The vertical intercept of a polynomial function is the value of its constant term.

The horizontal intercepts of a polynomial function are the zeros of the factors of the polynomial. If $n$ is the degree of the polynomial, the polynomial has at most $n$ horizontal intercepts, i.e., zeros.

#### Summary of characteristics of rational functions

A rational function is defined on all real numbers except those that make the denominator 0, if any.

A rational function may have holes or vertical or horizontal asymptotes (or it may have none of them).

To determine whether a rational function has holes or vertical asymptotes, we must analyze the zeros of the numerator and the denominator.

• Factor the numerator and the denominator fully.
• If there are factors in the numerator and the denominator that can be equal to 0 for some input value and the factors cancel out fully, then there is a hole in the graph of the function at that input value.
• If there are factors in the numerator and the denominator that can be equal to 0 for some input value but do not cancel out fully, then there is a vertical asymptote in the graph of the function at that input value.

To determine whether a rational function has a horizontal asymptote, we must analyze the degrees and the leading coefficients of both the numerator and the denominator.

• If the degrees of the numerator and the denominator are equal, there is a horizontal asymptote at output value equal to the fraction
$\frac{\text{ leading coefficient of the numerator}}{\text{ leading coefficient of the denominator}}$
• If the degree of the numerator is smaller than the degree of the denominator, there is a horizontal asymptote at output value of 0, i.e., the horizontal axis is the horizontal asymptote.
• If the degree of the numerator is larger than the degree of the denominator, there is no horizontal asymptote.

The vertical intercept of a rational function, if any, is the value of the function at the input value 0.

The horizontal intercepts of a rational function are the zeros of the factors of the numerator that are not also zeros of the factors of the denominator. If $n$ is the degree of the numerator, the function has at most $n$ horizontal intercepts, i.e., zeros. 