A little notation will be useful. Suppose that you have *n* pieces of data.
The data was recorded at times
*t0, t1, t2, ..., tn* and the corresponding measurements
were *P0, P1, P2, ..., Pn*.

We need to make an assumption about how to define the model for time
less than *t0* or time greater than *t1*. We will make
the simplest assumption: the model is always *zero* for times prior to
*t0* or for times greater than *tn*.

The extension of the model outside of the range of data is the same as above.

Construct a formula, valid for *any* set of data points,
that explicitly gives the value
of the model when the input is between *t0* and *t1*,
between *t1* and *t2*, and so on.
Extend the model outside of the range of data in the same way as for
the previous models.

Test your model on the "EPA data" shown in Figure 2. For this data, the graph of your piecewise linear model looks like the Figure below.

The extension of the model outside of the range of data is the same as
the other models, but the fact that we are fitting a cubic polynomial
to the data set gives us additional freedom. In this lab, we have
chosen the cubic polynomial so that the slope of the model at
*t0* is the slope of the line segment from *(t0,P0)* to
*(t1,P1)*. Similarly, the slope of the model at *tn* is
set to be the slope of the line segment from
*(t_(n-1),P_(n-1))* to *(tn,Pn)*.

We will see examples of these models in later portions of the lab.

If you suspect that the data you are gathering is periodic over some interval of time, then it may make sense to choose your model to be periodic as well. In analogy to the "polynomials of best fit," it is possible to write down a model that consists of a sum of sine and cosine functions that best fit the given data. It is necessary, however, to decide ahead of time how many sines and cosines you want to use in your approximation, just as it is necessary to decide on the degree of the polynomial model that you are fitting to the data.

The models that consist of trigonometric functions are called
*Fourier polynomials*. These models are widely used in
engineering, physics, and other sciences to approximate processes that
are periodic.

As an example, suppose that the EPA worker knows that the factory that
he is testing runs two twelve-hour shifts. The worker suspects that
the rate of soot production may be periodic over a twelve hour period.
The simplest Fourier polynomial of "best fit" is then

* 2.5 - 0.775 cos(w t) + 1.342 sin(w t)*
where

Note that Fourier polynomial we produced is periodic over the
time interval *[0,12]*. The comparison of this function with the
experimental data is shown below.

(A) The Fourier polynomial of degree one that best fits the experimental data.

(B) The Fourier polynomial of degree two that best fits the data.

The Geometry Center Calculus Development Team

A portion of this lab is based on a problem appearing in the Harvard Consortium Calculus book, Hughes-Hallet, et al, 1994, p. 174

Last modified: Wed Feb 21 13:10:29 1996