Abstract We review and extend the complex step approach for approximating partial derivatives of smooth vector functions with n independent variables. This method, which leverages complex arithmetic, offers a highly accurate alternative to traditional finite difference techniques, and highly efficient alternative to operator overloading required techniques such as Automatic differentiation. Certain aspects of the multivariable second and higher order derivative approximations are novel. We demonstrate that for 64-bit arithmetic, 15-digit precision is generally obtained for the first partials. 10 to 13 digit precision is routinely obtained for the second partials, and 5 to 8 digit precision is obtained for the third-order partials. The presented formulation does not require operator overloading in modern programming languages such as MATLAB, Python, or C++, and it demands minimal derivation and coding effort. We provide several illustrative examples that demonstrate the utility, accuracy, efficiency, and generality of this approach, including an astrodynamic application.
Yamamoto et al. (Mon,) studied this question.