Math 121 Calculus for Biology
Spring Semester, 2013
Lab Help

06-Feb-13

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 and third questions 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.

Problem 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);

Problem 2 : 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 right click on the data, then select Add Trendline from the menu. Under Trendline/Regression Type, you select the Power option, then have Excel Display Equation on Chart. 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.

Problem 3: This problem is very similar to the one above. The problem addresses the issue of volume of wood from trees of differing height and diameter. You find the best model for volume of wood based on diameter or height, then study linear and allometric models. The allometric model gives you information on how trees change as they increase in volume.

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 either the linear or power law option, depending on what model you are considering, then have Excel put the equation on your graph. This should be very similar to what you have done already in previous labs. Thus, you should not have too much difficulty with these problems. You are also asked to take the logarithm of the data by simply typing "=ln(x)" where x is the value of the data that you want. This part of the problem 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.

In the last part of the problem, you are creating log-log plots with Excel. This is actually very simple to do. You simply make a copy of the graph with the original allometric model by right clicking on the graph and selecting Copy. Next you click on any cell in the worksheet, then right click, and select Paste with the option to Use Destination Theme (H). Next you click on the graph to activate it. Return to the Main menu under Chart Tools and select Layout. Under Layout you find the box reading Axes. Under Axes you choose Primary Horizontal Axis (and later Primary Vertical axis), then select the option to Show Axis with Log Scale. The graph will now have a logarithmic scale on the selected axis. Be sure to answer all the questions asked in these problems.