The FD= and FDHESSIAN= options specify the use of finitedifference approximations of the derivatives. The FD= option specifies that all derivatives are approximated using function evaluations, and the FDHESSIAN= option specifies that secondorder derivatives are approximated using gradient evaluations.
Computing derivatives by finitedifference approximations can be very timeconsuming, especially for secondorder derivatives based only on values of the objective function (FD= option). If analytical derivatives are difficult to obtain (for example, if a function is computed by an iterative process), you might consider one of the optimization techniques that use firstorder derivatives only (QUANEW, DBLDOG, or CONGRA). In the expressions that follow, denotes the parameter vector, denotes the step size for the ith parameter, and is a vector of zeros with a 1 in the ith position.
The forwarddifference derivative approximations consume less computer time, but they are usually not as precise as approximations that use centraldifference formulas.
For firstorder derivatives, n additional function calls are required:


For secondorder derivatives based on function calls only (Dennis and Schnabel, 1983, p. 80), additional function calls are required for dense Hessian:


For secondorder derivatives based on gradient calls (Dennis and Schnabel, 1983, p. 103), n additional gradient calls are required:


Centraldifference approximations are usually more precise, but they consume more computer time than approximations that use forwarddifference derivative formulas.
For firstorder derivatives, 2n additional function calls are required:


For secondorder derivatives based on function calls only (Abramowitz and Stegun, 1972, p. 884), additional function calls are required.




For secondorder derivatives based on gradient calls, 2n additional gradient calls are required:


You can use the FDIGITS= option to specify the number of accurate digits in the evaluation of the objective function. This specification is helpful in determining an appropriate interval size h to be used in the finitedifference formulas.
The step sizes , are defined as follows:
For the forwarddifference approximation of firstorder derivatives that use function calls and secondorder derivatives that use gradient calls, .
For the forwarddifference approximation of secondorder derivatives that use only function calls and all centraldifference formulas, .
The value of is defined by the FDIGITS= option: