For the algorithms which require a Jacobian matrix of derivatives of
the fit functions, there are times when an analytic Jacobian may be
unavailable or too expensive to compute. Therefore GSL supports
approximating the Jacobian numerically using finite differences of the fit
functions. This is typically done by setting the relevant function pointers
gsl_multifit_function_fdf data type to NULL, however the
following functions allow the user to access the approximate Jacobian
directly if needed.
This function takes as input the current position x with the function
values computed at the current position f, along with fdf
which specifies the fit function and parameters and approximates the
n-by-p Jacobian J using forward finite differences:
J_ij = d f_i(x,params) / d x_j = (f_i(x^*,params) - f_i(x,params)) / d x_j.
where x^* has the jth element perturbed by \Delta x_j
and \Delta x_j = \epsilon |x_j|, where \epsilon is the
square root of the machine precision
This function computes the vector of function values f and
the approximate Jacobian J at the position vector x using
the system described in fdf. See
for a description of how the Jacobian is computed.