ExpModel.mws

> with(plots):

> with(stats):

Warning, these names have been redefined: anova, describe, fit, importdata, random, statevalf, statplots, transform

> with(fit):

Warning, the names leastmediansquare and leastsquare have been redefined

Data from Exercise 41 page 31 (populations of Mexico).

> d1:=[1950,1960,1970,1980,1990];

d1 := [1950, 1960, 1970, 1980, 1990]

> d2:=[25.8,34.9,48.2,66.8,81.1];

d2 := [25.8, 34.9, 48.2, 66.8, 81.1]

> data:=[seq([d1[i],d2[i]],i=1..5)];

data := [[1950, 25.8], [1960, 34.9], [1970, 48.2], ...

> plot(data,style=point);A:=%:

[Maple Plot]

> log_d:=[ln(25.8),ln(34.9),ln(48.2),ln(66.8),ln(81.1)];

log_d := [3.250374492, 3.552486829, 3.875359021, 4....

> fit[leastsquare[[x,y]]]([d1,log_d]);

>

y = -54.05960143+.2939833640e-1*x

> M:=x->exp(-54.05960143+.2939833640e-1*x);

M := proc (x) options operator, arrow; exp(-54.0596...

> plot(M(x),x=1950..1990);C:=%:

[Maple Plot]

> display(C,A);

[Maple Plot]

In the lynx fur problem, we are trying to fit data to a curve of the form y = a*x+b+A(x)*(cos(alpha*x)+sin(alpha*x)) . We will look for A(x) to be of the form c*exp(d*x) . In order to reduce this problem to the exponential curve fitting method described above, first subtract the value of the linear model a*x+b from the data points. To model the envelop of this data, we onlky need to consider the extrema of this modified data. Since the period of the data has been estimated to be 10 years, the minima and maxima occur every five years. Since sin(x) and cos(x) oscillate between -1 and 1, to model the envelop, we take the absolute value of these data points (the highs and lows). To this data, we apply the above method of exponential curve fitting.