We've updated our
Privacy Policy effective December 15. Please read our updated Privacy Policy and tap

Study Guides > College Algebra

Rational Functions

Suppose we know that the cost of making a product is dependent on the number of items, x, produced. This is given by the equation [latex]C\left(x\right)=15,000x - 0.1{x}^{2}+1000[/latex]. If we want to know the average cost for producing x items, we would divide the cost function by the number of items, x. The average cost function, which yields the average cost per item for x items produced, is

[latex]f\left(x\right)=\frac{15,000x - 0.1{x}^{2}+1000}{x}[/latex]

Many other application problems require finding an average value in a similar way, giving us variables in the denominator. Written without a variable in the denominator, this function will contain a negative integer power. In the last few sections, we have worked with polynomial functions, which are functions with non-negative integers for exponents. In this section, we explore rational functions, which have variables in the denominator.

Characteristics of Rational Functions

We have seen the graphs of the basic reciprocal function and the squared reciprocal function from our study of toolkit functions. Examine these graphs and notice some of their features. Graphs of f(x)=1/x and f(x)=1/x^2 Several things are apparent if we examine the graph of [latex]f\left(x\right)=\frac{1}{x}[/latex].
  1. On the left branch of the graph, the curve approaches the x-axis [latex]\left(y=0\right) \text{ as } x\to -\infty [/latex].
  2. As the graph approaches [latex]x=0[/latex] from the left, the curve drops, but as we approach zero from the right, the curve rises.
  3. Finally, on the right branch of the graph, the curves approaches the x-axis [latex]\left(y=0\right) \text{ as } x\to \infty [/latex].
To summarize, we use arrow notation to show that x or [latex]f\left(x\right)[/latex] is approaching a particular value.
Arrow Notation
Symbol Meaning
[latex]x\to {a}^{-}[/latex] x approaches a from the left (< a but close to a)
[latex]x\to {a}^{+}[/latex] x approaches a from the right (> a but close to a)
[latex]x\to \infty[/latex] x approaches infinity (x increases without bound)
[latex]x\to -\infty [/latex] x approaches negative infinity (x decreases without bound)
[latex]f\left(x\right)\to \infty [/latex] the output approaches infinity (the output increases without bound)
[latex]f\left(x\right)\to -\infty [/latex] the output approaches negative infinity (the output decreases without bound)
[latex]f\left(x\right)\to a[/latex] the output approaches a

Local Behavior of [latex]f\left(x\right)=\frac{1}{x}[/latex]

Let’s begin by looking at the reciprocal function, [latex]f\left(x\right)=\frac{1}{x}[/latex]. We cannot divide by zero, which means the function is undefined at [latex]x=0[/latex]; so zero is not in the domain. As the input values approach zero from the left side (becoming very small, negative values), the function values decrease without bound (in other words, they approach negative infinity). We can see this behavior in the table below.
x –0.1 –0.01 –0.001 –0.0001
[latex]f\left(x\right)=\frac{1}{x}[/latex] –10 –100 –1000 –10,000
We write in arrow notation

[latex]\text{as }x\to {0}^{-},f\left(x\right)\to -\infty [/latex]

As the input values approach zero from the right side (becoming very small, positive values), the function values increase without bound (approaching infinity). We can see this behavior in the table below.
x 0.1 0.01 0.001 0.0001
[latex]f\left(x\right)=\frac{1}{x}[/latex] 10 100 1000 10,000
We write in arrow notation

[latex]\text{As }x\to {0}^{+}, f\left(x\right)\to \infty [/latex].

Graph of f(x)=1/x which denotes the end behavior. As x goes to negative infinity, f(x) goes to 0, and as x goes to 0^-, f(x) goes to negative infinity. As x goes to positive infinity, f(x) goes to 0, and as x goes to 0^+, f(x) goes to positive infinity. This behavior creates a vertical asymptote, which is a vertical line that the graph approaches but never crosses. In this case, the graph is approaching the vertical line = 0 as the input becomes close to zero. Graph of f(x)=1/x with its vertical asymptote at x=0.

A General Note: Vertical Asymptote

A vertical asymptote of a graph is a vertical line [latex]x=a[/latex] where the graph tends toward positive or negative infinity as the inputs approach a. We write [latex]\text{As }x\to a,f\left(x\right)\to \infty , \text{or as }x\to a,f\left(x\right)\to -\infty [/latex].

End Behavior of [latex]f\left(x\right)=\frac{1}{x}[/latex]

As the values of x approach infinity, the function values approach 0. As the values of x approach negative infinity, the function values approach 0. Symbolically, using arrow notation

[latex]\text{As }x\to \infty ,f\left(x\right)\to 0,\text{and as }x\to -\infty ,f\left(x\right)\to 0[/latex].

Graph of f(x)=1/x which highlights the segments of the turning points to denote their end behavior. Based on this overall behavior and the graph, we can see that the function approaches 0 but never actually reaches 0; it seems to level off as the inputs become large. This behavior creates a horizontal asymptote, a horizontal line that the graph approaches as the input increases or decreases without bound. In this case, the graph is approaching the horizontal line [latex]y=0[/latex]. Graph of f(x)=1/x with its vertical asymptote at x=0 and its horizontal asymptote at y=0.

A General Note: Horizontal Asymptote

A horizontal asymptote of a graph is a horizontal line [latex]y=b[/latex] where the graph approaches the line as the inputs increase or decrease without bound. We write [latex]\text{As }x\to \infty \text{ or }x\to -\infty ,\text{ }f\left(x\right)\to b[/latex].

Example: Using Arrow Notation

Use arrow notation to describe the end behavior and local behavior of the function below. Graph of f(x)=1/(x-2)+4 with its vertical asymptote at x=2 and its horizontal asymptote at y=4.

Answer: Notice that the graph is showing a vertical asymptote at [latex]x=2[/latex], which tells us that the function is undefined at [latex]x=2[/latex].

[latex]\text{As }x\to {2}^{-},f\left(x\right)\to -\infty ,\text{ and as }x\to {2}^{+},\text{ }f\left(x\right)\to \infty [/latex].

And as the inputs decrease without bound, the graph appears to be leveling off at output values of 4, indicating a horizontal asymptote at [latex]y=4[/latex]. As the inputs increase without bound, the graph levels off at 4.

[latex]\text{As }x\to \infty ,\text{ }f\left(x\right)\to 4\text{ and as }x\to -\infty ,\text{ }f\left(x\right)\to 4[/latex].

Try It

Use arrow notation to describe the end behavior and local behavior for the reciprocal squared function.

Answer: End behavior: as [latex]x\to \pm \infty , f\left(x\right)\to 0[/latex]; Local behavior: as [latex]x\to 0, f\left(x\right)\to \infty [/latex] (there are no x- or y-intercepts)

Domain and Its Effect on Vertical Asymptotes

A vertical asymptote represents a value at which a rational function is undefined, so that value is not in the domain of the function. A reciprocal function cannot have values in its domain that cause the denominator to equal zero. In general, to find the domain of a rational function, we need to determine which inputs would cause division by zero.

A General Note: Domain of a Rational Function

The domain of a rational function includes all real numbers except those that cause the denominator to equal zero.

How To: Given a rational function, find the domain.

  1. Set the denominator equal to zero.
  2. Solve to find the x-values that cause the denominator to equal zero.
  3. The domain is all real numbers except those found in Step 2.

Example: Finding the Domain of a Rational Function

Find the domain of [latex]f\left(x\right)=\frac{x+3}{{x}^{2}-9}[/latex].

Answer: Begin by setting the denominator equal to zero and solving.

[latex]\begin{array}{l} {x}^{2}-9=0 \hfill \\ \text{ }{x}^{2}=9\hfill \\ \text{ }x=\pm 3\hfill \end{array}[/latex]

The denominator is equal to zero when [latex]x=\pm 3[/latex]. The domain of the function is all real numbers except [latex]x=\pm 3[/latex].

Analysis of the Solution

A graph of this function confirms that the function is not defined when [latex]x=\pm 3[/latex]. Graph of f(x)=1/(x-3) with its vertical asymptote at x=3 and its horizontal asymptote at y=0. There is a vertical asymptote at [latex]x=3[/latex] and a hole in the graph at [latex]x=-3[/latex]. We will discuss these types of holes in greater detail later in this section.

Try It

Find the domain of [latex]f\left(x\right)=\frac{4x}{5\left(x - 1\right)\left(x - 5\right)}[/latex].

Answer: The domain is all real numbers except [latex]x=1[/latex] and [latex]x=5[/latex].

By looking at the graph of a rational function, we can investigate its local behavior and easily see whether there are asymptotes. We may even be able to approximate their location. Even without the graph, however, we can still determine whether a given rational function has any asymptotes, and calculate their location. Watch the following video to see more examples of finding the domain of a rational function. https://youtu.be/v0IhvIzCc_I

Vertical Asymptotes

The vertical asymptotes of a rational function may be found by examining the factors of the denominator that are not common to the factors in the numerator. Vertical asymptotes occur at the zeros of such factors.

How To: Given a rational function, identify any vertical asymptotes of its graph.

  1. Factor the numerator and denominator.
  2. Note any restrictions in the domain of the function.
  3. Reduce the expression by canceling common factors in the numerator and the denominator.
  4. Note any values that cause the denominator to be zero in this simplified version. These are where the vertical asymptotes occur.
  5. Note any restrictions in the domain where asymptotes do not occur. These are removable discontinuities.

Example: Identifying Vertical Asymptotes

Find the vertical asymptotes of the graph of [latex]k\left(x\right)=\frac{5+2{x}^{2}}{2-x-{x}^{2}}[/latex].

Answer: First, factor the numerator and denominator.

[latex]\begin{array}{l}k\left(x\right)=\frac{5+2{x}^{2}}{2-x-{x}^{2}}\hfill \\ \text{ }=\frac{5+2{x}^{2}}{\left(2+x\right)\left(1-x\right)}\hfill \end{array}[/latex]

To find the vertical asymptotes, we determine where this function will be undefined by setting the denominator equal to zero:

[latex]\begin{array}{l}\left(2+x\right)\left(1-x\right)=0\hfill \\ \text{ }x=-2,1\hfill \end{array}[/latex]

Neither [latex]x=-2[/latex] nor [latex]x=1[/latex] are zeros of the numerator, so the two values indicate two vertical asymptotes. Figure 9 confirms the location of the two vertical asymptotes. Graph of k(x)=(5+2x)^2/(2-x-x^2) with its vertical asymptotes at x=-2 and x=1 and its horizontal asymptote at y=-2.

 

Removable Discontinuities

Occasionally, a graph will contain a hole: a single point where the graph is not defined, indicated by an open circle. We call such a hole a removable discontinuity. For example, the function [latex]f\left(x\right)=\frac{{x}^{2}-1}{{x}^{2}-2x - 3}[/latex] may be re-written by factoring the numerator and the denominator.

[latex]f\left(x\right)=\frac{\left(x+1\right)\left(x - 1\right)}{\left(x+1\right)\left(x - 3\right)}[/latex]

Notice that [latex]x+1[/latex] is a common factor to the numerator and the denominator. The zero of this factor, [latex]x=-1[/latex], is the location of the removable discontinuity. Notice also that [latex]x - 3[/latex] is not a factor in both the numerator and denominator. The zero of this factor, [latex]x=3[/latex], is the vertical asymptote. Graph of f(x)=(x^2-1)/(x^2-2x-3) with its vertical asymptote at x=3 and a removable discontinuity at x=-1.

A General Note: Removable Discontinuities of Rational Functions

A removable discontinuity occurs in the graph of a rational function at [latex]x=a[/latex] if a is a zero for a factor in the denominator that is common with a factor in the numerator. We factor the numerator and denominator and check for common factors. If we find any, we set the common factor equal to 0 and solve. This is the location of the removable discontinuity. This is true if the multiplicity of this factor is greater than or equal to that in the denominator. If the multiplicity of this factor is greater in the denominator, then there is still an asymptote at that value.

Example: Identifying Vertical Asymptotes and Removable Discontinuities for a Graph

Find the vertical asymptotes and removable discontinuities of the graph of [latex]k\left(x\right)=\frac{x - 2}{{x}^{2}-4}[/latex].

Answer: Factor the numerator and the denominator.

[latex]k\left(x\right)=\frac{x - 2}{\left(x - 2\right)\left(x+2\right)}[/latex]

Notice that there is a common factor in the numerator and the denominator, [latex]x - 2[/latex]. The zero for this factor is [latex]x=2[/latex]. This is the location of the removable discontinuity. Notice that there is a factor in the denominator that is not in the numerator, [latex]x+2[/latex]. The zero for this factor is [latex]x=-2[/latex]. The vertical asymptote is [latex]x=-2[/latex]. Graph of k(x)=(x-2)/(x-2)(x+2) with its vertical asymptote at x=-2 and a removable discontinuity at x=2. The graph of this function will have the vertical asymptote at [latex]x=-2[/latex], but at [latex]x=2[/latex] the graph will have a hole.

Try It

Find the vertical asymptotes and removable discontinuities of the graph of [latex]f\left(x\right)=\frac{{x}^{2}-25}{{x}^{3}-6{x}^{2}+5x}[/latex].

Answer: Removable discontinuity at [latex]x=5[/latex]. Vertical asymptotes: [latex]x=0,\text{ }x=1[/latex].

Try It

A rational function is shown in the graph below. Use the slider to investigate the changes in the graph for values of a on the interval [latex][-5,5][/latex], and answer the following questions.
  1. For what values of a does [latex]f(a)[/latex] represent a removable discontinuity?
  2. For what values of a does the line  [latex]x = a[/latex] represent a vertical asymptote?
https://www.desmos.com/calculator/sxxheguz0j

Answer: Removable discontinuity for values of a on the interval [latex][2,5][/latex], and on the interval [latex][-5,0][/latex].  Vertical asymptotes for [latex]a=1[/latex].

Horizontal Asymptotes and Intercepts

While vertical asymptotes describe the behavior of a graph as the output gets very large or very small, horizontal asymptotes help describe the behavior of a graph as the input gets very large or very small. Recall that a polynomial’s end behavior will mirror that of the leading term. Likewise, a rational function’s end behavior will mirror that of the ratio of the leading terms of the numerator and denominator functions. There are three distinct outcomes when checking for horizontal asymptotes: Case 1: If the degree of the denominator > degree of the numerator, there is a horizontal asymptote at = 0.

[latex]\text{Example: }f\left(x\right)=\frac{4x+2}{{x}^{2}+4x - 5}[/latex]

In this case, the end behavior is [latex]f\left(x\right)\approx \frac{4x}{{x}^{2}}=\frac{4}{x}[/latex]. This tells us that, as the inputs increase or decrease without bound, this function will behave similarly to the function [latex]g\left(x\right)=\frac{4}{x}[/latex], and the outputs will approach zero, resulting in a horizontal asymptote at = 0. Note that this graph crosses the horizontal asymptote.
Graph of f(x)=(4x+2)/(x^2+4x-5) with its vertical asymptotes at x=-5 and x=1 and its horizontal asymptote at y=0. Horizontal Asymptote y = 0 when [latex]f\left(x\right)=\frac{p\left(x\right)}{q\left(x\right)},q\left(x\right)\ne{0}\text{ where degree of }p<\text{degree of q}[/latex].
Case 2: If the degree of the denominator < degree of the numerator by one, we get a slant asymptote.

[latex]\text{Example: }f\left(x\right)=\frac{3{x}^{2}-2x+1}{x - 1}[/latex]

In this case, the end behavior is [latex]f\left(x\right)\approx \frac{3{x}^{2}}{x}=3x[/latex]. This tells us that as the inputs increase or decrease without bound, this function will behave similarly to the function [latex]g\left(x\right)=3x[/latex]. As the inputs grow large, the outputs will grow and not level off, so this graph has no horizontal asymptote. However, the graph of [latex]g\left(x\right)=3x[/latex] looks like a diagonal line, and since f will behave similarly to g, it will approach a line close to [latex]y=3x[/latex]. This line is a slant asymptote.
Graph of f(x)=(3x^2-2x+1)/(x-1) with its vertical asymptote at x=1 and a slant asymptote aty=3x+1. Slant Asymptote when [latex]f\left(x\right)=\frac{p\left(x\right)}{q\left(x\right)},q\left(x\right)\ne 0[/latex] where degree of [latex]p>\text{ degree of }q\text{ by }1[/latex].
To find the equation of the slant asymptote, divide [latex]\frac{3{x}^{2}-2x+1}{x - 1}[/latex]. The quotient is [latex]3x+1[/latex], and the remainder is 2. The slant asymptote is the graph of the line [latex]g\left(x\right)=3x+1[/latex]. Case 3: If the degree of the denominator = degree of the numerator, there is a horizontal asymptote at [latex]y=\frac{{a}_{n}}{{b}_{n}}[/latex], where [latex]{a}_{n}[/latex] and [latex]{b}_{n}[/latex] are the leading coefficients of [latex]p\left(x\right)[/latex] and [latex]q\left(x\right)[/latex] for [latex]f\left(x\right)=\frac{p\left(x\right)}{q\left(x\right)},q\left(x\right)\ne 0[/latex]. [latex-display]\text{Example: }f\left(x\right)=\frac{3{x}^{2}+2}{{x}^{2}+4x - 5}[/latex-display] In this case, the end behavior is [latex]f\left(x\right)\approx \frac{3{x}^{2}}{{x}^{2}}=3[/latex]. This tells us that as the inputs grow large, this function will behave like the function [latex]g\left(x\right)=3[/latex], which is a horizontal line. As [latex]x\to \pm \infty ,f\left(x\right)\to 3[/latex], resulting in a horizontal asymptote at y = 3. Note that this graph crosses the horizontal asymptote.
Graph of f(x)=(3x^2+2)/(x^2+4x-5) with its vertical asymptotes at x=-5 and x=1 and its horizontal asymptote at y=3. Horizontal Asymptote when [latex]f\left(x\right)=\frac{p\left(x\right)}{q\left(x\right)},q\left(x\right)\ne 0\text{where degree of }p=\text{degree of }q[/latex].
Notice that, while the graph of a rational function will never cross a vertical asymptote, the graph may or may not cross a horizontal or slant asymptote. Also, although the graph of a rational function may have many vertical asymptotes, the graph will have at most one horizontal (or slant) asymptote. It should be noted that, if the degree of the numerator is larger than the degree of the denominator by more than one, the end behavior of the graph will mimic the behavior of the reduced end behavior fraction. For instance, if we had the function

[latex]f\left(x\right)=\frac{3{x}^{5}-{x}^{2}}{x+3}[/latex]

with end behavior

[latex]f\left(x\right)\approx \frac{3{x}^{5}}{x}=3{x}^{4}[/latex],

the end behavior of the graph would look similar to that of an even polynomial with a positive leading coefficient.

[latex]x\to \pm \infty , f\left(x\right)\to \infty [/latex]

Try it

A rational function [latex]f(x)[/latex] is graphed below.  Use the sliders to obtain graphs with the following horizontal asymptotes:
  1. Find values of a and b that will give a graph with a slant asymptote.
  2. Find values of a and b that will give a graph with a horizontal asymptote at [latex]y = o[/latex]
  3. Find values of a and b that will give a graph with a horizontal asymptote that is the ratio of the leading coefficients of [latex]f(x)[/latex].
https://www.desmos.com/calculator/d8eejzinsf

Answer: Answers will vary.

  1. Find values of a and b that will give a graph with a slant asymptote.  For example [latex]b = 3, a = 4[/latex]
  2. Find values of a and b that will give a graph with a horizontal asymptote at [latex]y = o[/latex].  For example, [latex]b = 4, a = 2[/latex]
  3. Find values of a and b that will give a graph with a horizontal asymptote that is the ratio of the leading coefficients of [latex]f(x)[/latex].For example, [latex]b = 4, a = 4[/latex]

 

A General Note: Horizontal Asymptotes of Rational Functions

The horizontal asymptote of a rational function can be determined by looking at the degrees of the numerator and denominator.
  • Degree of numerator is less than degree of denominator: horizontal asymptote at = 0.
  • Degree of numerator is greater than degree of denominator by one: no horizontal asymptote; slant asymptote.
  • Degree of numerator is equal to degree of denominator: horizontal asymptote at ratio of leading coefficients.

Example: Identifying Horizontal and Slant Asymptotes

For the functions below, identify the horizontal or slant asymptote.
  1. [latex]g\left(x\right)=\frac{6{x}^{3}-10x}{2{x}^{3}+5{x}^{2}}[/latex]
  2. [latex]h\left(x\right)=\frac{{x}^{2}-4x+1}{x+2}[/latex]
  3. [latex]k\left(x\right)=\frac{{x}^{2}+4x}{{x}^{3}-8}[/latex]

Answer: For these solutions, we will use [latex]f\left(x\right)=\frac{p\left(x\right)}{q\left(x\right)}, q\left(x\right)\ne 0[/latex].

  1. [latex]g\left(x\right)=\frac{6{x}^{3}-10x}{2{x}^{3}+5{x}^{2}}[/latex]: The degree of [latex]p=\text{degree of} q=3[/latex], so we can find the horizontal asymptote by taking the ratio of the leading terms. There is a horizontal asymptote at [latex]y=\frac{6}{2}[/latex] or [latex]y=3[/latex].
  2. [latex]h\left(x\right)=\frac{{x}^{2}-4x+1}{x+2}[/latex]: The degree of [latex]p=2[/latex] and degree of [latex]q=1[/latex]. Since [latex]p>q[/latex] by 1, there is a slant asymptote found at [latex]\frac{{x}^{2}-4x+1}{x+2}[/latex].
Screen Shot 2015-11-10 at 4.25.52 PM The quotient is [latex]x - 2[/latex] and the remainder is 13. There is a slant asymptote at [latex]y=-x - 2[/latex]. [latex]k\left(x\right)=\frac{{x}^{2}+4x}{{x}^{3}-8}[/latex]: The degree of [latex]p=2\text{ }<[/latex] degree of [latex]q=3[/latex], so there is a horizontal asymptote y = 0.

Watch this video to see more worked examples of determining which kind of horizontal asymptote a rational function will have. https://youtu.be/A1tApZSE8nI

Example: Identifying Horizontal Asymptotes

In the sugar concentration problem earlier, we created the equation [latex]C\left(t\right)=\frac{5+t}{100+10t}[/latex]. Find the horizontal asymptote and interpret it in context of the problem.

Answer: Both the numerator and denominator are linear (degree 1). Because 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:

[latex]t\to \infty , C\left(t\right)\to \frac{1}{10}[/latex]

This function will have a horizontal asymptote at [latex]y=\frac{1}{10}[/latex]. This tells us that as the values of t increase, the values of C will approach [latex]\frac{1}{10}[/latex]. 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 [latex]\frac{1}{10}[/latex] pounds per gallon.

Example: Identifying Horizontal and Vertical Asymptotes

Find the horizontal and vertical asymptotes of the function

[latex]f\left(x\right)=\frac{\left(x - 2\right)\left(x+3\right)}{\left(x - 1\right)\left(x+2\right)\left(x - 5\right)}[/latex]

Answer: First, note that this function has no common factors, so there are no potential removable discontinuities. The function will have vertical asymptotes when the denominator is zero, causing the function to be undefined. The denominator will be zero at [latex]x=1,-2,\text{and }5[/latex], 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 [latex]x\to \pm \infty , f\left(x\right)\to 0[/latex]. This function will have a horizontal asymptote at [latex]y=0[/latex]. Graph of f(x)=(x-2)(x+3)/(x-1)(x+2)(x-5) with its vertical asymptotes at x=-2, x=1, and x=5 and its horizontal asymptote at y=0.

Try It

Find the vertical and horizontal asymptotes of the function:

[latex]f\left(x\right)=\frac{\left(2x - 1\right)\left(2x+1\right)}{\left(x - 2\right)\left(x+3\right)}[/latex]

Answer: Vertical asymptotes at [latex]x=2[/latex] and [latex]x=-3[/latex]; horizontal asymptote at [latex]y=4[/latex].

A General Note: Intercepts of Rational Functions

A rational function will have a y-intercept when the input is zero, if the function is defined at zero. A rational function will not have a y-intercept if the function is not defined at zero. Likewise, a rational function will have x-intercepts at the inputs that cause the output to be zero. Since a fraction is only equal to zero when the numerator is zero, x-intercepts can only occur when the numerator of the rational function is equal to zero.

Example: Finding the Intercepts of a Rational Function

Find the intercepts of [latex]f\left(x\right)=\frac{\left(x - 2\right)\left(x+3\right)}{\left(x - 1\right)\left(x+2\right)\left(x - 5\right)}[/latex].

Answer: We can find the y-intercept by evaluating the function at zero

[latex]\begin{array}{l}f\left(0\right)=\frac{\left(0 - 2\right)\left(0+3\right)}{\left(0 - 1\right)\left(0+2\right)\left(0 - 5\right)}\hfill \\ \text{ }=\frac{-6}{10}\hfill \\ \text{ }=-\frac{3}{5}\hfill \\ \text{ }=-0.6\hfill \end{array}[/latex]

The x-intercepts will occur when the function is equal to zero:

[latex]\begin{array}{l} 0=\frac{\left(x - 2\right)\left(x+3\right)}{\left(x - 1\right)\left(x+2\right)\left(x - 5\right)}\hfill & \text{This is zero when the numerator is zero}.\hfill \\ 0=\left(x - 2\right)\left(x+3\right)\hfill & \hfill \\ x=2, -3\hfill & \hfill \end{array}[/latex]

The y-intercept is [latex]\left(0,-0.6\right)[/latex], the x-intercepts are [latex]\left(2,0\right)[/latex] and [latex]\left(-3,0\right)[/latex]. Graph of f(x)=(x-2)(x+3)/(x-1)(x+2)(x-5) with its vertical asymptotes at x=-2, x=1, and x=5, its horizontal asymptote at y=0, and its intercepts at (-3, 0), (0, -0.6), and (2, 0).

Try It

Given the reciprocal squared function that is shifted right 3 units and down 4 units, write this as a rational function. Then, find the x- and y-intercepts and the horizontal and vertical asymptotes.

Answer: For the transformed reciprocal squared function, we find the rational form. [latex]f\left(x\right)=\frac{1}{{\left(x - 3\right)}^{2}}-4=\frac{1 - 4{\left(x - 3\right)}^{2}}{{\left(x - 3\right)}^{2}}=\frac{1 - 4\left({x}^{2}-6x+9\right)}{\left(x - 3\right)\left(x - 3\right)}=\frac{-4{x}^{2}+24x - 35}{{x}^{2}-6x+9}[/latex] Because the numerator is the same degree as the denominator we know that as [latex]x\to \pm \infty , f\left(x\right)\to -4; \text{so } y=-4[/latex] is the horizontal asymptote. Next, we set the denominator equal to zero, and find that the vertical asymptote is [latex]x=3[/latex], because as [latex]x\to 3,f\left(x\right)\to \infty[/latex]. We then set the numerator equal to 0 and find the x-intercepts are at [latex]\left(2.5,0\right)[/latex] and [latex]\left(3.5,0\right)[/latex]. Finally, we evaluate the function at 0 and find the y-intercept to be at [latex]\left(0,\frac{-35}{9}\right)[/latex].

Watch the following video to see more worked examples of finding asymptotes, intercepts and holes of rational functions. https://youtu.be/UnVZs2EaEjI

Graph Rational Functions

Previously, we saw that the numerator of a rational function reveals the x-intercepts of the graph, whereas the denominator reveals the vertical asymptotes of the graph. As with polynomials, factors of the numerator may have integer powers greater than one. Fortunately, the effect on the shape of the graph at those intercepts is the same as we saw with polynomials. The vertical asymptotes associated with the factors of the denominator will mirror one of the two toolkit reciprocal functions. When the degree of the factor in the denominator is odd, the distinguishing characteristic is that on one side of the vertical asymptote the graph heads towards positive infinity, and on the other side the graph heads towards negative infinity. Graph of y=1/x with its vertical asymptote at x=0. When the degree of the factor in the denominator is even, the distinguishing characteristic is that the graph either heads toward positive infinity on both sides of the vertical asymptote or heads toward negative infinity on both sides. Graph of y=1/x^2 with its vertical asymptote at x=0. For example, the graph of [latex]f\left(x\right)=\frac{{\left(x+1\right)}^{2}\left(x - 3\right)}{{\left(x+3\right)}^{2}\left(x - 2\right)}[/latex]. Graph of f(x)=(x+1)^2(x-3)/(x+3)^2(x-2) with its vertical asymptotes at x=-3 and x=2, its horizontal asymptote at y=1, and its intercepts at (-1, 0), (0, 1/6), and (3, 0).
  • At the x-intercept [latex]x=-1[/latex] corresponding to the [latex]{\left(x+1\right)}^{2}[/latex] factor of the numerator, the graph bounces, consistent with the quadratic nature of the factor.
  • At the x-intercept [latex]x=3[/latex] corresponding to the [latex]\left(x - 3\right)[/latex] factor of the numerator, the graph passes through the axis as we would expect from a linear factor.
  • At the vertical asymptote [latex]x=-3[/latex] corresponding to the [latex]{\left(x+3\right)}^{2}[/latex] factor of the denominator, the graph heads towards positive infinity on both sides of the asymptote, consistent with the behavior of the function [latex]f\left(x\right)=\frac{1}{{x}^{2}}[/latex].
  • At the vertical asymptote [latex]x=2[/latex], corresponding to the [latex]\left(x - 2\right)[/latex] factor of the denominator, the graph heads towards positive infinity on the left side of the asymptote and towards negative infinity on the right side, consistent with the behavior of the function [latex]f\left(x\right)=\frac{1}{x}[/latex].

How To: Given a rational function, sketch a graph.

  1. Evaluate the function at 0 to find the y-intercept.
  2. Factor the numerator and denominator.
  3. For factors in the numerator not common to the denominator, determine where each factor of the numerator is zero to find the x-intercepts.
  4. Find the multiplicities of the x-intercepts to determine the behavior of the graph at those points.
  5. For factors in the denominator, note the multiplicities of the zeros to determine the local behavior. For those factors not common to the numerator, find the vertical asymptotes by setting those factors equal to zero and then solve.
  6. For factors in the denominator common to factors in the numerator, find the removable discontinuities by setting those factors equal to 0 and then solve.
  7. Compare the degrees of the numerator and the denominator to determine the horizontal or slant asymptotes.
  8. Sketch the graph.

Example: Graphing a Rational Function

Sketch a graph of [latex]f\left(x\right)=\frac{\left(x+2\right)\left(x - 3\right)}{{\left(x+1\right)}^{2}\left(x - 2\right)}[/latex].

Answer: We can start by noting that the function is already factored, saving us a step. Next, we will find the intercepts. Evaluating the function at zero gives the y-intercept:

[latex]\begin{array}{l}f\left(0\right)=\frac{\left(0+2\right)\left(0 - 3\right)}{{\left(0+1\right)}^{2}\left(0 - 2\right)}\hfill \\ \text{ }=3\hfill \end{array}[/latex]

To find the x-intercepts, we determine when the numerator of the function is zero. Setting each factor equal to zero, we find x-intercepts at [latex]x=-2[/latex] and [latex]x=3[/latex]. At each, the behavior will be linear (multiplicity 1), with the graph passing through the intercept. We have a y-intercept at [latex]\left(0,3\right)[/latex] and x-intercepts at [latex]\left(-2,0\right)[/latex] and [latex]\left(3,0\right)[/latex]. To find the vertical asymptotes, we determine when the denominator is equal to zero. This occurs when [latex]x+1=0[/latex] and when [latex]x - 2=0[/latex], giving us vertical asymptotes at [latex]x=-1[/latex] and [latex]x=2[/latex]. There are no common factors in the numerator and denominator. This means there are no removable discontinuities. Finally, the degree of denominator is larger than the degree of the numerator, telling us this graph has a horizontal asymptote at [latex]y=0[/latex]. To sketch the graph, we might start by plotting the three intercepts. Since the graph has no x-intercepts between the vertical asymptotes, and the y-intercept is positive, we know the function must remain positive between the asymptotes, letting us fill in the middle portion of the graph. Graph of only the middle portion of f(x)=(x+2)(x-3)/(x+1)^2(x-2) with its intercepts at (-2, 0), (0, 3), and (3, 0). The factor associated with the vertical asymptote at [latex]x=-1[/latex] was squared, so we know the behavior will be the same on both sides of the asymptote. The graph heads toward positive infinity as the inputs approach the asymptote on the right, so the graph will head toward positive infinity on the left as well. For the vertical asymptote at [latex]x=2[/latex], the factor was not squared, so the graph will have opposite behavior on either side of the asymptote. After passing through the x-intercepts, the graph will then level off toward an output of zero, as indicated by the horizontal asymptote. Graph of f(x)=(x+2)(x-3)/(x+1)^2(x-2) with its vertical asymptotes at x=-1 and x=2, its horizontal asymptote at y=0, and its intercepts at (-2, 0), (0, 3), and (3, 0).

Try It

Given the function [latex]f\left(x\right)=\frac{{\left(x+2\right)}^{2}\left(x - 2\right)}{2{\left(x - 1\right)}^{2}\left(x - 3\right)}[/latex], use the characteristics of polynomials and rational functions to describe its behavior and sketch the function.

Answer: Horizontal asymptote at [latex]y=\frac{1}{2}[/latex]. Vertical asymptotes at [latex]x=1 \text{and} x=3[/latex]. y-intercept at [latex]\left(0,\frac{4}{3}.\right)[/latex]

x-intercepts at [latex]\left(2,0\right) \text{ and }\left(-2,0\right)[/latex]. [latex]\left(-2,0\right)[/latex] is a zero with multiplicity 2, and the graph bounces off the x-axis at this point. [latex]\left(2,0\right)[/latex] is a single zero and the graph crosses the axis at this point.

cnx_precalc_figure_03_07_023

Watch the following video to see another worked example of how to match different kinds of rational functions with their graphs. https://youtu.be/vMVYaFptvkk

Writing Rational Functions

Now that we have analyzed the equations for rational functions and how they relate to a graph of the function, we can use information given by a graph to write the function. A rational function written in factored form will have an x-intercept where each factor of the numerator is equal to zero. (An exception occurs in the case of a removable discontinuity.) As a result, we can form a numerator of a function whose graph will pass through a set of x-intercepts by introducing a corresponding set of factors. Likewise, because the function will have a vertical asymptote where each factor of the denominator is equal to zero, we can form a denominator that will produce the vertical asymptotes by introducing a corresponding set of factors.

A General Note: Writing Rational Functions from Intercepts and Asymptotes

If a rational function has x-intercepts at [latex]x={x}_{1}, {x}_{2}, ..., {x}_{n}[/latex], vertical asymptotes at [latex]x={v}_{1},{v}_{2},\dots ,{v}_{m}[/latex], and no [latex]{x}_{i}=\text{any }{v}_{j}[/latex], then the function can be written in the form:

[latex]f\left(x\right)=a\frac{{\left(x-{x}_{1}\right)}^{{p}_{1}}{\left(x-{x}_{2}\right)}^{{p}_{2}}\cdots {\left(x-{x}_{n}\right)}^{{p}_{n}}}{{\left(x-{v}_{1}\right)}^{{q}_{1}}{\left(x-{v}_{2}\right)}^{{q}_{2}}\cdots {\left(x-{v}_{m}\right)}^{{q}_{n}}}[/latex]

where the powers [latex]{p}_{i}[/latex] or [latex]{q}_{i}[/latex] on each factor can be determined by the behavior of the graph at the corresponding intercept or asymptote, and the stretch factor can be determined given a value of the function other than the x-intercept or by the horizontal asymptote if it is nonzero.

How To: Given a graph of a rational function, write the function.

  1. Determine the factors of the numerator. Examine the behavior of the graph at the x-intercepts to determine the zeroes and their multiplicities. (This is easy to do when finding the "simplest" function with small multiplicities—such as 1 or 3—but may be difficult for larger multiplicities—such as 5 or 7, for example.)
  2. Determine the factors of the denominator. Examine the behavior on both sides of each vertical asymptote to determine the factors and their powers.
  3. Use any clear point on the graph to find the stretch factor.

Example: Writing a Rational Function from Intercepts and Asymptotes

Write an equation for the rational function below. Graph of a rational function.

Answer: The graph appears to have x-intercepts at [latex]x=-2[/latex] and [latex]x=3[/latex]. At both, the graph passes through the intercept, suggesting linear factors. The graph has two vertical asymptotes. The one at [latex]x=-1[/latex] seems to exhibit the basic behavior similar to [latex]\frac{1}{x}[/latex], with the graph heading toward positive infinity on one side and heading toward negative infinity on the other. The asymptote at [latex]x=2[/latex] is exhibiting a behavior similar to [latex]\frac{1}{{x}^{2}}[/latex], with the graph heading toward negative infinity on both sides of the asymptote. Graph of a rational function denoting its vertical asymptotes and x-intercepts. We can use this information to write a function of the form

[latex]f\left(x\right)=a\frac{\left(x+2\right)\left(x - 3\right)}{\left(x+1\right){\left(x - 2\right)}^{2}}[/latex].

To find the stretch factor, we can use another clear point on the graph, such as the y-intercept [latex]\left(0,-2\right)[/latex].

[latex]\begin{array}{l}-2=a\frac{\left(0+2\right)\left(0 - 3\right)}{\left(0+1\right){\left(0 - 2\right)}^{2}}\hfill \\ -2=a\frac{-6}{4}\hfill \\ \text{ }a=\frac{-8}{-6}=\frac{4}{3}\hfill \end{array}[/latex]

This gives us a final function of [latex]f\left(x\right)=\frac{4\left(x+2\right)\left(x - 3\right)}{3\left(x+1\right){\left(x - 2\right)}^{2}}[/latex].

Key Equations

Rational Function [latex]f\left(x\right)=\frac{P\left(x\right)}{Q\left(x\right)}=\frac{{a}_{p}{x}^{p}+{a}_{p - 1}{x}^{p - 1}+...+{a}_{1}x+{a}_{0}}{{b}_{q}{x}^{q}+{b}_{q - 1}{x}^{q - 1}+...+{b}_{1}x+{b}_{0}}, Q\left(x\right)\ne 0[/latex]

Key Concepts

  • We can use arrow notation to describe local behavior and end behavior of the toolkit functions [latex]f\left(x\right)=\frac{1}{x}[/latex] and [latex]f\left(x\right)=\frac{1}{{x}^{2}}[/latex].
  • A function that levels off at a horizontal value has a horizontal asymptote. A function can have more than one vertical asymptote.
  • Application problems involving rates and concentrations often involve rational functions.
  • The domain of a rational function includes all real numbers except those that cause the denominator to equal 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.
  • A removable discontinuity might occur in the graph of a rational function if an input causes both numerator and denominator to be zero.
  • A rational function’s end behavior will mirror that of the ratio of the leading terms of the numerator and denominator functions.
  • Graph rational functions by finding the intercepts, behavior at the intercepts and asymptotes, and end behavior.
  • If a rational function has x-intercepts at [latex]x={x}_{1},{x}_{2},\dots ,{x}_{n}[/latex], vertical asymptotes at [latex]x={v}_{1},{v}_{2},\dots ,{v}_{m}[/latex], and no [latex]{x}_{i}=\text{any }{v}_{j}[/latex], then the function can be written in the form [latex]f\left(x\right)=a\frac{{\left(x-{x}_{1}\right)}^{{p}_{1}}{\left(x-{x}_{2}\right)}^{{p}_{2}}\cdots {\left(x-{x}_{n}\right)}^{{p}_{n}}}{{\left(x-{v}_{1}\right)}^{{q}_{1}}{\left(x-{v}_{2}\right)}^{{q}_{2}}\cdots {\left(x-{v}_{m}\right)}^{{q}_{n}}}[/latex]

Glossary

arrow notation
a way to symbolically represent the local and end behavior of a function by using arrows to indicate that an input or output approaches a value
horizontal asymptote
a horizontal line = b where the graph approaches the line as the inputs increase or decrease without bound.
rational function
a function that can be written as the ratio of two polynomials
removable discontinuity
a single point at which a function is undefined that, if filled in, would make the function continuous; it appears as a hole on the graph of a function
vertical asymptote
a vertical line = a where the graph tends toward positive or negative infinity as the inputs approach a

Licenses & Attributions

CC licensed content, Original

  • Revision and Adaptation. Provided by: Lumen Learning License: CC BY: Attribution.
  • Domain and Its Effect on Vertical Asymptotes. Authored by: Lumen Learning (with Desmos). Located at: https://www.desmos.com/calculator/sxxheguz0j. License: CC BY: Attribution.

CC licensed content, Shared previously

  • Precalculus. Provided by: OpenStax Authored by: Jay Abramson, et al.. Located at: https://openstax.org/books/precalculus/pages/1-introduction-to-functions. License: CC BY: Attribution. License terms: Download For Free at : http://cnx.org/contents/[email protected]..
  • College Algebra. Provided by: OpenStax Authored by: Abramson, Jay et al.. License: CC BY: Attribution. License terms: Download for free at http://cnx.org/contents/[email protected].
  • Question ID 129042, 129067, 129072, 129075. Authored by: Alyson Day. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Question ID 74565. Authored by: Nearing, Daniel, mb Lippman, David. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Ex: The Domain of Rational Functions . Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • Question ID 105058. Authored by: Jim Smart. License: CC BY: Attribution. License terms: IMathAS Community License, CC-BY + GPL.
  • Question ID 15836. Authored by: James Sousa . License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Ex: Determine Horizontal Asymptotes of Rational Functions . Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • Ex: Find the Intercepts, Asymptotes, and Hole of a Rational Function . Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • Question ID 1802. Authored by: Lippman, David. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Ex: Match Equations of Rational Functions to Graphs . Authored by: James Sousa (Mathispower4u.com) for Lumen Learning. License: CC BY: Attribution.