Next: About this document ...
The purpose of this lab is to acquaint you with the application of local extreme values as it applies to the method of least-squares.
To assist you, there is a worksheet associated with this lab that
contains examples. You can
copy that worksheet to your home directory with the following command,
which must be run in a terminal window, not in Maple.
cp /math/calclab/MA1024/Least_squares_start_B08.mws My_Documents
You can copy the worksheet now, but you should read through the lab
before you load it into Maple. Once you have read to the exercises,
start up Maple, load
the worksheet Least_squares_start_B08.mws, and go through it
carefully. Then you can start working on the exercises.
Many applications of calculus involve finding the maximum and minimum
values of functions. For example, suppose that there is a network of
electrical power generating stations, each with its own cost for
producing power, with the cost per unit of power at each station
changing with the amount of power it generates. An important problem
for the network operators
is to determine how much power each station should generate to
minimize the total cost of generating a given amount of power.
A crucial first step in solving such problems is being able to find
and classify local extreme values of a function. What we mean by a
function having a local extreme value at a point is
that for values of near ,
for a local maximum and
for a local minimum.
calculus, we found that we could locate candidates for local extreme
values by finding points where the first derivative vanishes. For
functions of two dimensions, the condition is that both first order
partial derivatives must vanish at a local extreme value candidate
point. Such a point is called a stationary point. It is also one of
the three types of points called critical points.
Note carefully that the condition does not say that a point where the partial
derivatives vanish must be a local extreme point. Rather, it says that
stationary points are candidates for local extrema. Just as was the case
for functions of a single variable, there can be stationary points that
are not extrema. For example, the saddle surface
has a stationary point at the origin, but it is not a local extremum.
Finding and classifying the local extreme values of a function
requires several steps. First, the partial derivatives must
be computed. Then the stationary points must be solved for, which is not
always a simple task.
Next, one must check for the presence of
singular points, which might also be local extreme
values. Finally, each
critical point must be classified
as a local maximum, local minimum, or neither using the second-partials test
is a local minimum.
is a local maximum.
is a saddle point.
then no conclusion can be made.
The least-squares method is based on the linear equation . Given data points, this method finds the equation of the line closest to all the data points. It does this by finding an a and b value such that the vertical distance to the least-squares line is a minimum. When the sum of all the distances squared is minimized, the result yields a slope and y-intercept of the line that best fits the data.
Notice that the function to be minimized is a function of two variables and therefore the second-partials test will be used.
The linear equation is not always the best fit for every set of data. We will look at a few other types of non-linear functions.
One example is the power law
. Taking the natural log of both sides gives us a linear relationship between and as follows:
Another example is the exponential function
which again after taking the natural log of both sides results in a linear relationship between and as follows:
Given the data below, use the first column as data values for .
- Use the second column as data values for . Plot the data set . Find the least-squares line that best fits the data and then plot the data set along with the least-squares line.
- Use the third column as data values for . Plot the data set . Find a power-law function that best fits the data. Include a plot of the data set the corresponds to
along with the least-squares line and also a plot of the original data set along with the power-law function that best fits the data.
- Use the fourth column as data values for . Plot the data set . Find an exponential funtion that best fits the data. Include a plot of the data set the corresponds to along with the least-squares line and also a plot of the original data set along with the exponential function that best fits the data.
Next: About this document ...
Dina J. Solitro-Rassias