Precalculus Lab 7: Rational Functions

Introduction

In this lab, we will explore the graphs of rational functions.  Rational functions are ratios of polynomials.  One of our basic functions, the reciprocal function f(x)=(1/x), is a rational function.  Sometimes we can obtain graphs of rational functions as transformations of the reciprocal function, but often we choose to look at the properties of the rational function itself.  For example, we have already discussed examples like,

({{({{g(x)=((x-3)/((x^2)-2x+1))}})=((x-3)/((x-1)(x+1)))}})

We can see that x-intercept is at x=3, because the numerator is zero (and the denominator is nonzero) when x=3, and we can see that g(x) will have vertical asymptotes at x=-1 and x=1, because the denominator is zero (and the numerator is nonzero) at those points.  We can look at a sign line to determine where g(x) is positive and negative, and we can see that the end behavior will be like f(x)=(1/x), so g(x) has a horizontal asymptote at y=0.

Now we will use Mathematica to help us explore the graphs of rational functions that are a bit more subtle or complicated.

Zeros of the numerator, zeros of the denominator

Consider the following rational function:

({{({{f(x)=(((x-1))/((x^2)-3x+2))}})}})

Find the zeros of the numerator, and use this information to identify possible x-intercepts.

Find the zeros of the denominator, and use this information to identify possible vertical asymptotes.

Now, graph the function using the Plot command, and record any x-intercepts and any vertical asymptotes.  (You will need to adjust the x-range.)

Plot[(x-1)/(x^2-3x+2), {x, -1, 1}]

Now consider the function:

({{({{g(x)=(((x-2))/((x^2)-3x+2))}})}})

Again, identify possible x-intercepts by looking at the zeros of the numerator, and identify possible vertical asymptotes by looking at the zeros of the denominator.

Now, graph the function using the Plot command, and record any x-intercepts and any vertical asymptotes.  (You will need to adjust the x-range.)

Plot[(x-2)/(x^2-3x+2), {x, -1, 1}]

What do you notice?  Describe the difference between the discontinuities of f(x) and the discontinuities of g(x), and explain how you could identify the different kinds of discontinuities without having to graph the functions.

When the degree of the numerator is greater than or equal to the degree of the denominator

So far, we have only looked at rational functions whose numerator has smaller degree than the denominator.  Now we will explore the behavior of rational functions whose numerator has degree that is greater than or equal to the degree of the denominator.

First consider the function

({{({{h(x)=(((x^3)-3(x^2)+3x+1)/(x-1))}})}})

By looking at the leading term in the numerator and the leading term in the denominator, make a prediction about the end behavior of h(x).  Use limit notation.

The end behavior of h(x) is roughly like the end behavior of what monomial?  (Remember that monomials are polynomials with one term, like (x^3) or -2(x^2).)

Graph h(x) along with the monomial you chose as an end behavior model, using the Plot command.  You will need to insert your monomial in the place of (...).

Plot[{(x^3-3x^2+3x+1)/(x-1), ...}, {x, -10, 10}, PlotRange->{-10,10}]

Zoom in and zoom out by adjusting the x-range and y-range.  Is your monomial a good approximation for h(x) when x=1?  How about when x = 5 or x=100?

Now we will use long division of polynomials to get another end behavior model for h(x).  Long division of polynomials allows us to rewrite h(x) as the sum of a polynomial and a rational function that whose numerator has smaller degree than its denominator:

({{({{h(x)=((x^2)-2x+1) + (2/(x-1))}})}})

Notice that, as x gets larger and larger (positive or negative), the rational function (2/(x-1)) gets smaller and smaller, so h(x) behaves like (x^2)-2x+1.

Graph h(x) along with the (x^2)-2x+1, using the Plot command.  You will need to insert (x^2)-2x+1 in the place of (...).

Plot[{(x^3-3x^2+3x+1)/(x-1), ...}, {x, -10, 10}, PlotRange->{-10,10}]

Zoom in and zoom out by adjusting the x-range and y-range.  Is (x^2)-2x+1 a good approximation for h(x) when x=1?  How about when x = 5 or x=100?

Compare and contrast the two end behavior polynomials that we explored.  What are their relative advantages and disadvantages?

End behavior asymptotes and polynomial long division

In the previous example, we looked at two end behavior models for a rational function whose numerator had a higher degree than its denominator.  The model obtained by polynomial long division is called an end behavior asymptote, because as x gets larger and larger, the graph of the rational function gets closer and closer to the graph of the model.  We will use Mathematica to find end behavior asymptotes for several other rational functions.

In Mathematica, we can use the command PolynomialQuotientRemainder to do the long division for us.  Consider the function h(x) from the previous section.

({{({{h(x)=(((x^3)-3(x^2)+3x+1)/(x-1))}})}})

This is the command that finds the quotient and remainder:

PolynomialQuotientRemainder[x^3-3x^2+3x+1, x-1, x]

Use Shift+Enter to evaluate.  Notice that the output is a list with two items.  The first item is the polynomial quotient, and the second item is the polynomial remainder.  Now we can write h(x) in the following form:

({{({{h(x)=(polynomial quotient) + ((polynomial remainder)/(denominator of h(x)))}})}})

The first part, the polynomial quotient, is the end behavior asymptote.  The second part is a new rational function, whose numerator has smaller degree than the degree of its denominator.

Use the PolynomialQuotientRemainder command to rewrite the following three rational functions as the sum of the end behavior asymptote and a rational function.  Circle the end behavior asymptote.

({{({{r(x)=((2(x^3)-2x+1)/((x^3)-1))
s(x)=((x^3)/((x^2)-1))
t(x)=(((x^2)-2x-5)/(x-6))}})}})

PolynomialQuotientRemainder[..., ..., x]

More examples

Now we will use what we have learned in the previous two sections to analyze the graphs of several rational functions.  For each rational function below:

Identify all points (x-values) of discontinuity and specify the type of discontinuity (vertical asymptote or removable point.)

Identify all real zeros as well as y-intercepts.

Identify an end behavior asymptote.  (Sometimes this will be a horizontal asymptote.)

Sketch the graph (or attach a plot) showing all the features (intercepts, discontinuities, asymptotes).  Make sure that you show the graph of the end behavior asympote on the same set of axes.

Example (a)

({{({{f(x)=(((x-5)((x^2)+4x+7))/((x-3)(x-2)))}})}})

Example (b)

({{({{g(x)=(((x^3)+3 (x^2)+5 x+6)/(x-3))}})}})

Example (c)

({{({{h(x)=(((x+3)(x-4)(x+2))/(((x^2)-9)((x^2)+2)))}})}})