Question: Use the following MATLAB commands to construct a symbolic function. syms x y f = (y + l)^3 + x * y^2 + y^2 -
syms x y
f = (y + l)^3 + x * y^2 + y^2 - 4 * x * y - 4 * y + l
Compute the first partials of f and the Hessian of f by setting
fx = dif f (f, x), fy = dif f (f, y)
H = [diff (fx, x), diff (fx, y); diff (fy, x), diff (fy, y)]
We can evaluate the Hessian for a given (x,y) pair using the subs command. For example, to evaluate the Hessian when x = 3 and y = 5, set
HI = subs(H,[x,y],[3,5])
Use the MATLAB command solve (fx, fy) to determine vectors x and y containing the x and y coordinates of the stationary points. Evaluate the Hessian at each stationary point and then determine whether the stationary point is a local maximum, local minimum, or saddle point.
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
The stationary points of the Hessian are 14 0 and 714 4 If the stationary values are su... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
949-M-L-A-E (914).docx
120 KBs Word File
