function [F, J] = newton_ex(x)
% Example function and Jacobian for Newton's method.

% The function
F = [x(1)^2 + x(2)^2 - 1;
     x(1)^3 - x(2)      ];

% The Jacobian
J = [2 * x(1)  , 2 * x(2) ;
     3 * x(1)^2, -1       ];
