function x0 = newtonMethod(f, x0, varargin)
x0 = x0(:);
for k=1:10
    fval = feval(f,x0, varargin{:});
    A = jacobian(f,x0, varargin{:});
    step = A\fval(:);
    x0 = x0-step;
end