MATLAB!紧急!! Consider the function f(x,y)=2x^3 +6xy^2 -3y^3 -150x

来源:百度知道 编辑:UC知道 时间:2024/06/04 00:37:07
题目 consider the function f(x,y)=2x^3 +6xy^2 -3y^3 -150x
(1)provide appropriate plots of the function f that illustrate its shape.
(2) Find all stationary points of f and classify them as minima, maxima and saddle points using separately the discriminant criterion and the eigenvalues of the Hessian.
(3)Plot the gradient of f alongside a contour plot.
(4)Set up and solve an appropriate differential equation to find the maxima of f(x,y) numerically.

不一定要全做啦。多多益善。谢谢!

%by dynamic
%see also http://www.matlabsky.com
%contact me matlabsky@gmail.com
%2009.2.
%

兄台我是完全按你的要求写程序的 多给些分哦 否则 太不够意思了

这个程序 我调试和编写 至少花了我半个小时哦

% (1)provide appropriate plots of the function f that illustrate its shape.
% (2) Find all stationary points of f and classify them as minima, maxima and saddle points using separately the discriminant criterion and the eigenvalues of the Hessian.
% (3)Plot the gradient of f alongside a contour plot.
% (4)Set up and solve an appropriate differential equation to find the maxima of f(x,y) numerically.
close all
clear
clc
%(1)
fun=@(x,y)2*x.^3 +6*x.*y.^2 -3*y.^3 -150*x;
figure(1)
ezmesh(fun,[-6 6 -6 6])
%(2)
syms x y
f=2*x^3 +6*x*y^2 -3*y^3 -150*x;
df_dx=diff(f,x);
df_dy=diff(f,y);
A=diff(f,x,2);
B=diff(diff(