Added incremental nsolve function to have more control over termination.