In: Advanced Math
Problem 7.1. Let f (x, y) = x4 − 3xy + 2y2.
(a) Compute the partial derivatives of f as well as its
discriminant. Then use
solve to find the critical points and to classify each one as a
local maximum,
local minimum, or saddle point.
(b) Check your answer to (a) by showing that fminsearch correctly
locates
the same local minima when you start at (0.5, 0.5) or at (−0.5,
0.5).
(c) What happens when you apply fminsearch with a starting value
of
(0, 0)? Explain your answer.
(d) What are the values of f at the extrema? Now, using fmesh,
graph the function
on a rectangle that includes all the critical points. Experiment
with view
and axis until you get a picture that shows the behavior near the
critical points.
Use the graph and all the previous data to justify the assertion:
Sometimes symbolic
and/or numerical computations are more revealing than graphical
information.
(b) Using fminsearch of MATLAB we get the two minimum for the initial point [0.5,0.5] and [-0.5,0.5] respectively. The code is as follows:
fun = @(x)x(1)^4 - 3*x(1)*x(2)+2*x(2)^2;
x0 = [-0.5,0.5];
x = fminsearch(fun,x0)
(c) If we take the initial point at [0,0] then the solution cannot be found as the initial point is a saddle point.
(d) f at (-3/4,-9/16) is -0.3164 and also at (3/4,9/16) f is -0.3164.
The code for the graph is:
[X,Y] = meshgrid(-1:.05:1);
Z = X.^4-(3*X.*Y)+2*Y.^2;
mesh(X,Y,Z)
and the graph is: