function LSQ_New_sym_2(x1,y1)        
% Mínimos cuadrados Newton; simbólico
%
 syms x y 
 tol=sqrt(eps); 
 f(x,y)=(exp(x-2*y)-0.5)^2+(exp(x-y)-1.0)^2+(exp(x)-2.0)^2+(exp(x+y)-4.0)^2;
 gra=gradient(f,[x y]); hes=hessian(f,[x y]);
 vec=-hes\gra; 
 while abs(gra(x1,y1)'*[x1;y1])>tol
    xx=double(vec(x1,y1));
    x1=x1+xx(1); y1=y1+xx(2);
    fprintf(' %15.10e %15.10e %15.10e\n',x1,y1,double(f(x1,y1)));
 end
end
