Mathematics 161                                  Laboratory 10                             November 5, 1992
	  
Name: _____________________________   Lab Partner: ___________________________
	  
Consulted with:  ____________________________________________________________

© Lafayette College, 1994

Optimization

In this lab we will learn some of the tools Mathematica has available for solving max-min problems, and use them to solve a problem similar to one assigned in Graded Homework #8 (due yesterday).

Part 1: A New Command:  FindRoot

Mathematica's FindRoot command uses Newton's method to search for a solution to an equation.  The form of the command is

FindRoot[lhs == rhs, {x,x0}]

Here, lhs == rhs is the equation which you want to solve, x is the unknown quantity, and x0 is your initial estimate of the solution.

Use FindRoot to estimate the value of x for which cosx = x. Use x = 0 as your initial guess.  The x value is:

Use FindRoot to approximate the first two positive solutions of the equation x = tanx.

                                        initial guess                              final estimate

1st positive root:         __________                               ____________

2nd positive root:        __________                               ____________

Part 2:  Another New Command:  FindMinimum

You have spent a good bit of time recently determining extreme values of functions by locating the critical numbers of the functions.  Mathematica's FindMinimum procedure uses a somewhat different (and very efficient) approach to approximate local minimum values of functions.  The form of the command is

FindMinimum[f[x], {x,x0}]

where x0 is an initial estimate of the location of the minimum value of f[x] you are seeking.  The output of FindMinimum is of the form {fmin,{x->xmin}} where fmin is the minimum value of f[x] found and xmin is the value of x at which that minimum occurs.

Use the FindMinimum command to find the absolute minimum value of the Bessel function of the first kind with index 0,  J0(x), on the interval  [0, 10].  A plot of  J0(x) over this interval may help.  Call the x coordinate giving this minimum xmin.   Use FindMinimum to find the absolute maximum of  J0(x) on the interval [xmin, 10].  Give the extreme values below, and explain briefly how you used a command that finds minimums to find a maximum.  Recall we worked with  J0(x) in Lab 6; Mathematica knows it as BesselJ[0,x].

Part 3:  Where does the Pump Go?

Towns Austin and Boise have cooperated in building a new reservoir and are now in the process of locating a pumping station which will serve both towns.  Austin sits 8 miles west and 6 miles north of the center of the resevoir while Boise is 6 miles east and 10 miles north of the center.  Choose a location for the pump along the shore of the resevoir which will minimize the amount of pipe needed to connect the two towns to the reservoir.  (A numerical answer is fine.)  The diagram on the next page depicts the situation, and gives the equation for the shoreline of the resevoir.

Be sure to include all of the following in your solution.

• A clear indication of what the variables you are using represent.  For example, you
    might label the diagram in an appropriate way.

•  A formula for the function you wish to minimize.

•  A solid justification for saying that you have found the minimum value of your
    function.

•  A clear statement of your answer.  Answer the question, "Where should the
    pumping station be placed to minimize the amount of pipe needed to connect the
    two towns to the reservoir?"