SDSU

Math 121 Calculus for Biology
Spring Semester, 2001
Lab Help

23-Feb-01

San Diego State University


Laboratory Help Page for Lab 4

In this lab, the first question examines a rational function, which includes vertical and horizontal asymptotes. You will be extending your ability with Maple. The last two questions introduce you to allometric or power law modeling.

Question 1: A rational function is a polynomial divided by another polynomial. This form of a function may have horizontal or vertical asymptotes. The vertical asymptotes often occur where the function is undefined. The horizontal asymptotes are found by looking at very large values of the function. All of these properties are easily done in Maple. Excel has a great deal of difficulty graphing functions of this type.

As an example, let us consider the following two equations:

f(x) = x - 1 and g(x) = x/(x2 - 4)

We want to graph these two functions.

To enter the functions in Maple, we type

> f := x -> x - 1; g := x -> x/(x^2 - 4);

Since g(x) is undefined at x = -2 and 2, we need to enter special information to plot these graphs. Below is the command that you want to limit the range and let Maple know that g(x) has vertical asymptotes.

> plot({f(x),g(x)}, x=-5..5, y=-10..10, discont=true);

To find where these functions intersect, you use the fsolve command. We modify this slightly from last week because this command would only find one of the 3 solutions. To find all solutions you need to limit where Maple looks for the solutions. Below shows how to find 2 of the points of intersection.

> x1 := fsolve(f(x)=g(x),x=-5..-2); f(x1);

> x2 := fsolve(f(x)=g(x),x=-2..2); f(x2);

You can find where the vertical asymptotes occur by setting the denominator equal to zero. (Maple does this with the command fsolve(x^2-4=0,x);) To find the horizontal asymptote you can use Maple's limit command.

> limit(g(x),x=infinity);

Question 2 and 3: These problems are very similar and use Excel's Trendline feature. These two data sets are nonlinear, so require a nonlinear model. Our choice of modeling techniques is to use allometric or power law models, which say that one variable is proportional to some power of another variable. We will study these models in some depth in lecture very soon.

To work these problems, you enter the data into a new Excel worksheet. You highlight the data and create a graph. You click on the data, then select Add Trendline from the menu. Under Trendline, you select the power law option, then have Excel put the equation on your graph. This should be very similar to what you have done already with the linear fit option in previous labs. Thus, you should not have too much difficulty with these problems. In Question 2, you take the logarithm of the data by simply typing "=ln(x)" where x is the value of the data that you want. This part uses the linear fit, so after modifying the data to the logarithm of the data, then this problem is just like the linear fit problems that you have done before. Be sure to answer all the questions asked in these problems.