Math 121 Calculus for Biology
Spring Semester, 2010
Lab Help

10-Feb-10

San Diego State University


Laboratory Help Page for Lab 3

The first question continues your use of the powerful symbolic algebra software Maple. We examine linear and rational functions, which we have studied in class and use Maple to help us solve for intercepts, points of intersection, and asymptotes. We'll also learn how to graph using Maple, which is easier than Excel though not as attractive. The second question fits growth data to a linear model. We will soon learn the importance of this linear growth model or Malthusian growth model. The last question introduce you to allometric or power law modeling. This question parallels the lecture material and extends your work with Excel's Trendline to fit nonlinear functions, particularly Power Functions or Allometric Models. Allometric models are used extensively in Biology for more complicated modeling situations. This question examines physiological properties of dogs. Biological data can often be fit by a power law or allometric model, which implies a relationship of the following form for the data:

y = Axr.

Questions 1: This exercise is meant to continue your work with Maple. This question examines a rational function with a line. 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 above 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);

When you have a discontinuous function, like a rational function, then you have to graph the function a little differently in Excel than a normal continuous function. First, since the function goes to infinity, you will need to make reasonable cut-offs values in y for good display of the graph. The discontinuities also mean that you need to graph the function separately on each of the continuous domains, then add each piece of the graph to the chart separately. Because the changes in the function are often very rapid near the vertical asymptotes, you often do not want even spacing of points, but rather a few extra near the asymptotes to guarantee a smooth looking graph. You may want to view a few of the graphs displayed in the lecture notes on Other Functions or the Examples section. Finally, it is often the case that vertical asymptotes are added to the graph using dotted or dashed lines, which is done by adding points on the vertical line and changing their format.

Question 2: This problem is similar to the material in the lecture notes in the Function Review and Quadratics section on the synthesis of mRNA.You will probably want to reread those notes to help you understand this problem.The first part of this problem is similar to the problems you did last time using Excel's Trendline (Linear), except you must set the y-intercept equal to zero .

In Part c, you find the error terms much as you did in your homework. Each error term is the difference between the growth data point and r times the population data point or

ei = g(Pi) - rPi.

The sum of square errors is simply

J(r) = e12 + e22 + e32 + e42.

You can use Maple to easily simplify this expression. In Maple, use the command

> expand(J(r));

assuming you have properly defined J(r). Use the general formula of the parabola to find the r-coordinate of the vertex for Part c.

Question 3: This problem uses Excel's Trendline feature. The 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,

w = au r.

To work this problem, 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 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 the Excel portion of this problem.