Mathematics 161                                  Laboratory 9                             October 29, 1992
	  
Name: _____________________________   Lab Partner: ___________________________
	  
Consulted with:  ____________________________________________________________

© Lafayette College, 1994

Rational Functions

In this lab we will investigate graphs of rational functions.  Recall, a function that can be written R(x) = P(x)/Q(x), where  P(x) and  Q(x) are polynomial in x, is called rational.

Part 0: Graphs from Functions

Preliminaries

As in preceding labs, we will use some special commands.  They are in a new package called "RationalGraphics." We input the package as follows:

<<i:\course\root\math161\rational.m

The Function to be Graphed

Consider the rational function f (x) = x 2/(x 2 – 1) defined below:

f[x_] := x^2/(x^2  - 1)

Before asking Mathematica to plot its graph, consider what we expect in the graph.

Vertical asymptotes

These can only occur where the rational function is undefined, that is where the denominator is zero.  Where might the graph of f  have vertical asymptotes?

Horizontal asymptotes

These occur at the height of the limit of f(x) as x goes to infinity and negative infinity.  Mathematica can compute the limit using the command

Limit[f[x], x -> Infinity]

Can you compute it faster in your head?  What is this function's horizontal asymptote?

Roots of the function

Rational functions are zero only when their numerator is zero.  Where will the graph of f cross the x-axis?

Now that we have an idea of what to expect, we plot the function, using the command

Plot[f[x], {x, -5, 5}]

This interval contains the vertical asymptotes and roots, with some room at the sides so we can see if the graph is approaching the horizontal asymptote; it is a good choice for this function.  Notice that the graph has the attributes we anticipated before plotting it.

Another Way of Finding Horizontal Asymptotes

Another way of finding asymptotes of a rational function is to use polynomial long division to express the function as a polynomial (called the quotient) plus a rational remainder with the degree of the numerator strictly less than that of the denominator.  The RationalGraphics package has a built-in command that performs the division, it is called ProperForm, since the remainder is called a proper rational function (sort of like a proper fraction).  The command

ProperForm[f[x],x]

shows that for our function f  the polynomial quotient is a constant.  This must be the case if the graph is to have a horizontal asymptote.

Part 1:  Oblique Asymptotes

Now consider the rational function

Following our work above, give the equations of any vertical asymptotes, horizontal asymptotes, and the locations of any roots of the function below.

Vertical asymptotes

Horizontal asymptotes

Roots of the function

Based on your work, what is a good interval on which to graph this function?  (Be sure to include room at the sides to verify the asymptotic behavior of the function.)

Plot the graph of g.  Does your plot show the asymptotes and zeros you anticipated?

Notice the graph of g is approximately linear for large values of x or –x.  Plot the function on a longer interval if this is not apparent yet.  Plot the graph of g and the line y = x together to verify that this is the asymptote for this function.  Asymptotes which are not horizontal or vertical are called oblique; so this is the oblique asymptote for the graph of g.  Apply the ProperForm command to g.   Explain why the result proves the existence of the oblique asymptote.  (Hint:  you will need to evaluate a limit.)

Part 2:  Functions from Graphs

The First Mystery Function

The RationalGraphics package contains information about two rational functions whose definitions you must guess.  To find out about the first function enter the command

Mystery1

This will generate a list of x and y coordinates of points on the graph, and a dotted outline of the graph of the function.  Using what you know about asymptotes and zeros, define a function r that you believe has the same graph and table of values.

r[x_] :=

To compare the graph of your guess with the actual graph, use the command

Compare[r]

To compare the values of your function with the actual ones, use the command

Score[r]

(This command may take a minute to execute, be patient.)  The result is a "grade" for your function, where 100 is a perfect match.

(SCRATCH WORK)

Refine your guess until you find the definition of the actual function.  DO NOT GO ON TO MYSTERY2 UNTIL YOU ARE FINISHED WITH MYSTERY1!

The Second Mystery Function

A second mystery function has information provided by the command

Mystery2

Use the technique you used above to find the definition of this function.  The Compare and Score commands will compare your guess with the function defined by Mystery2 after you enter this command (unless you reenter Mystery1 again), so only work on one mystery function at a time on any one computer.

Once you have defined this function, give the equations of all its asymptotes, including the oblique asymptote.  (The ProperForm command may be handy here.)

(SCRATCH WORK)