 clear
 close

disp('             LAGRANGE MULIPLIERS  First Example ')
disp(' ')
disp(' Find the extreme points of     ')
disp('               f(x,y) = x^2 +(y-1)^2 +xy^3   ')
disp('   with constraint   ')
disp('       g(x,y) = x^2 + 2y^2 - 1 = 0    ')
disp(' ')

 corners = [ -2,2, -1.5 1.5];
  f = inline(' x.^2 +(y-1).^2 + x.*y.^3 ', 'x', 'y');
  g = inline(' x.^2 + 2*y.^2 -1 ','x', 'y');

  lagrange(f,g,corners)

  pause
  close

