3.6.4 Finite Difference Method Applied to 1D Convection
Generally the objective function and constraints are complex, nonlinear functions of the design variables which are not known analytically. We therefore cannot compute analytic derivatives for the required gradients and Hessian information. However, it is still possible to estimate the gradient and Hessian using other methods. The simplest approach is to use finite differences.
A one-sided finite difference requires \(n+1\) function evaluations. The gradient is estimated as
This approximation is first-order accurate: reducing \(\Delta x_ j\) by a factor of 2 reduces the error in the gradient by a factor of 2.
A more accurate estimate can be computed using a central difference, which requires \(2n\) function evaluations:
This approximation is second-order accurate: reducing \(\Delta x_ j\) by a factor of 2 reduces the error in the gradient by a factor of 4.
The Hessian matrix can also be estimated using finite differences. A second-order central approximation of the \((i,j)\) entry of the Hessian matrix is given by: