question2

question2 - format long g syms x syms y

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
 format long g syms x syms y f=((-x^4-y^4-x^2*y^2+6*x^2+6*y^2)/(10)); ezsurf (f,[-2,2],[-2,2]); hold on x0=1.5; y0=1.6; z0=subs (f,{x,y},{x0,y0}); fx=diff (f,x); fy=diff (f,y); fx0=subs (fx,{x,y},{x0,y0}); fy0=subs (fy,{x,y},{x0,y0}); point=[x0,y0,z0]; N=[fx0,fy0,-1]; plane (point,N); hold off nice3d figure (2); ezcontourc (f,[-2,2,-2,2],25); axis equal; %Part B disp('Part B') fx=diff (f,x); fy=diff (f,y); [xc,yc]=solve (fx,fy,x,y);[xc,yc] fxx = diff (fx,x); fxy = diff (fx,y); fyy = diff (fy,y); D = fxx*fyy - fxy^2; subs(D,{x,y},{xc(1),yc(1)}); % Relative Min
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
subs(fxx,{x,y},{xc(1),yc(1)}); disp('Relative Min') subs(D,{x,y},{xc(2),yc(2)}); % Saddle subs(fxx,{x,y},{xc(2),yc(2)}); disp('Saddle') subs(D,{x,y},{xc(3),yc(3)}); % Saddle subs(fxx,{x,y},{xc(3),yc(3)});
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

question2 - format long g syms x syms y

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online