
%
function [L,f,Lu,fu,Luu,fuu]=bobs_popn_example(u)
%
% u = [x(1) y(1) x(2) y(2)]'
%
  x1 = u(1); x2 = u(2); y1 = u(3); y2 = u(4);
%
  a = 10;
  b = 2;
%
  L = (x1-x2)^2+(y1-y2)^2;
  Lu = [2*(x1-x2) -2*(x1-x2) 2*(y1-y2) -2*(y1-y2)];
  Luu = [2 -2 0 0; -2 2 0 0; 0 0 2 -2; 0 0 -2 2];
  f = [(x1^2+y1^2-1); ((x2/a)^2 + (y2/b)^2 -1)];
  fu = [2*x1 0 2*y1 0; 0 2*x2/a^2 0 2*y2/b^2];
  fuu = [2 0 0 0; 0 0 0 0; 0 0 2 0; 0 0 0 0; 0 0 0 0; 0 2/a^2 0 0; 0 0 0 0; 0 0 0 2/b^2];
%
%
  return;
  
  