Plotting Points and Curves

by

Jerry G. Ianni

Mathematics Department

LaGuardia Community College

Note: This worksheet was originally created in August 1998.

We will illustrate the technique by solving exercise #1 from Lab #7 of the PreCalculus supplementary lab manual. Essentially, the exercise boils down to plotting a list of points and then finding and plotting the exponential model which gives a best fit. So, let us begin by creating the list of points. Note that each point is placed in brackets and the entire list is enclosed in brackets .

> s:=[[0,100],[5.3,50.0],[10.6,25.0],[15.9,12.5],[21.2,6.25],[26.5,3.13],[31.8,1.56]];

[Maple Math]

Next, we shall plot our points.

> plot(s,style=point);

[Maple Plot]

The graph of our list of points

Nota Bene : Without declaring the style, Maple would output a polygonal graph instead.

Our next task is to begin the curve fitting process.

> e:=exp(1);

[Maple Math]

> plot([s,100*e^(-.05*t)],t=0..35,C,style=[point,patch]);

[Maple Plot]

The graph of our Cobalt data and one possible model

We can refine our curve fitting either one guess at a time or by using a "for" loop for several guesses!

> plot([s,100*e^(-.07*t)],t=0..35,C,style=[point,patch]);

[Maple Plot]

The graph of our Cobalt data and another possible model

> for i from 1 to 6 do
plot([s,100*e^((-.05-.02*i)*t)],t=0..35,C,style=[point,patch]);print("possible model",i);od;

[Maple Plot]

[Maple Math]

[Maple Plot]

[Maple Math]

[Maple Plot]

[Maple Math]

[Maple Plot]

[Maple Math]

[Maple Plot]

[Maple Math]

[Maple Plot]

[Maple Math]

From visual inspection, it is clear that the model with [Maple Math] gives the best fit. So, [Maple Math] is the desired function.