Vector Calculus for Engineers
CME100, Fall 2004
Problem Set #4
(Gradient, Linearization, Constrained and Unconstrained Optimization)
Date: 10/20/2004 Due: 10/27/2004
Reading: Thomas 11.4-11.9. Read sections 11.4 and 11.9 first.
Exercises:
Section 11.4: p. 908 Exercises 4, 10, 32, 34, 47
Section 11.5: p. 923 Exercises 8, 14, 18, 24, 30, 58
Section 11.6: p. 934 Exercises 16, 22, 40
Section 11.7: p. 944 Exercises 6, 14, 24, 29, 46
Section 11.8: p. 956 Exercises 8, 16, 30
Section 11.9: p. 962 Exercises 2, 10
MATLAB Workbook (optional):
Exercises 14, 17, 18, 19
Problem 1 A common problem arising in engineering applications is to maximize or minimize a function of several variables. Although in many cases maxima and minima can be found analytically by setting partial derivatives to zero, as discussed in class, the resulting equations for the independent variables are, in general, difficult to solve. In cases where one or more coefficients vary and solutions need to be recomputed frequently, it is typically more efficient to use a direct optimization method. In this problem you will explore one of the simplest gradient-based methods, usually known as the method of steepest descent.
Suppose the problem is to minimize a function of two variables without constraints. Recall that the gradient of a function points in the direction of its maximum change. Therefore, if one were to start with an initial guess and move in the direction opposite to the direction of the gradient , the value of the function at the new point should be smaller than the value of at . In fact, the direction opposite to the direction of the gradient is the best direction to move in to locate the minimum. Thus, at every iteration n, the coordinates can be updated according to the following rule:
where t is an arbitrary parameter that determines the step size.
a)Consider the following function: where A is a coefficient that can vary between 1 and 2. Assuming make two separate plots of and its level curves over the interval , . From the two plots estimate the approximate location of the minimum (to one decimal place).
b)Write a MATLAB script to implement the method of steepest descent, as described above. Assume and as your initial guesses and use . Perform a sufficient number of iterations for the solution not change to within 4 decimal places. Test your method for the case when and compare your solution to the estimate you made in part a)
c)Create a vector containing 100 equally spaced values of A ranging from 1 to 2. Modify your code to re-compute the optimum values of x and y for each value of A. Make plots of the x and y coordinates of the optimum as a function of A.