MATLAB CODING HELP PLEASE! 1. [10 points] Find the minimum of the three dimensio
ID: 657037 • Letter: M
Question
MATLAB CODING HELP PLEASE!
1. [10 points] Find the minimum of the three dimensional function f (x, y, z) = 2x^2 + y^2 + z^3 - 2xy + yz - 7y - 4z using the steepest descent method by using the steps below.. a. [1 point] First, write a function that will evaluate the value off at any point. b. [3 points] Next, write a function to evaluate the gradient off at any point. c. [2 points] Define a unimodal function. Now, starting at Pc, = (1, 1, 1) work towards the minimum using the steepest descent method as follows: d. [3 points] Use a stepsize (gamma) of 0.25 and compute a second point P that is A. away from P. along the direction of steepest descent. Is the value off smaller at this point? e. [3 points] Now, compute the position of two extra points that are at positions a and (1-X)r away from P. along this same direction. This is the start of a golden ratio search. Is the function unimodal on this interval? f. [3 points] If the function is not unimodal, double A. and repeat until you find an interval where f is unimodal, with P. your starting point in each case. g. [4 points] When you have found a unimodal interval, modify your golden ratio method to find the minimum of the function on that interval. h. [1 point] When you have found the minimum, call this P,. What is the gradient of the function at P,?Explanation / Answer
The following steps might be helpful.
Let f be a function with two variables with continuous second order partial derivatives fxx, fyy and fxy at a critical point (a,b). Let
D = fxx(a,b) fyy(a,b) - fxy2(a,b)
We now present several examples with detailed solutions on how to locate relative minima, maxima and saddle points of functions of two variables. When too many critical points are found, the use of a table is very convenient.
Example 1: Determine the critical points and locate any relative minima, maxima and saddle points of function f defined by
f(x , y) = 2x2 + 2xy + 2y2 - 6x
.
Solution to Example 1:
Find the first partial derivatives fx and fy.
fx(x,y) = 4x + 2y - 6
fy(x,y) = 2x + 4y
The critical points satisfy the equations fx(x,y) = 0 and fy(x,y) = 0 simultaneously. Hence.
4x + 2y - 6 = 0
2x + 4y = 0
The above system of equations has one solution at the point (2,-1).
We now need to find the second order partial derivatives fxx(x,y), fyy(x,y) and fxy(x,y).
fxx(x,y) = 4
fyy(x,y) = 4
fxy(x,y) = 2
We now need to find D defined above.
D = fxx(2,-1) fyy(2,-1) - fxy2(2,-1) = ( 4 )( 4 ) - 22 = 12
Since D is positive and fxx(2,-1) is also positive, according to the above theorem function f has a local minimum at (2,-1).
The 3-Dimensional graph of function f given above shows that f has a local minimum at the point (2,-1,f(2,-1)) = (2,-1,-6).
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.