The minimization algorithms described in this section make use of both the function and its derivative. They require an initial guess for the location of the minimum. There is no absolute guarantee of convergence -- the function must be suitable for this technique and the initial guess must be sufficiently close to the minimum for it to work.
The algorithm uses a generalized trust region to keep each step under control. In order to be accepted a proposed new position @math{x'} must satisfy the condition @math{|D (x' - x)| < \delta}, where @math{D} is a diagonal scaling matrix and @math{\delta} is the size of the trust region. The components of @math{D} are computed internally, using the column norms of the Jacobian to estimate the sensitivity of the residual to each component of @math{x}. This improves the behavior of the algorithm for badly scaled functions.
On each iteration the algorithm attempts to minimize the linear system @math{|F + J p|} subject to the constraint @math{|D p| < \Delta}. The solution to this constrained linear system is found using the Levenberg-Marquardt method.
The proposed step is now tested by evaluating the function at the resulting point, @math{x'}. If the step reduces the norm of the function sufficiently, and follows the predicted behavior of the function within the trust region. then it is accepted and size of the trust region is increased. If the proposed step fails to improve the solution, or differs significantly from the expected behavior within the trust region, then the size of the trust region is decreased and another trial step is computed.
The algorithm also monitors the progress of the solution and returns an error if the changes in the solution are smaller than the machine precision. The possible error codes are,
GSL_ETOLF
GSL_ETOLX
GSL_ETOLG
These error codes indicate that further iterations will be unlikely to change the solution from its current value.