Scientific Python

  • Scipy  jac = ‘cs’ – using complex derivative which gives more accurate results than other numerical methods (2-point and 3-point). In order to understand how complex derivative works, see some links below: 
  • Numerical differentiation – wikipedia 
  • Complex Step Differentiation – by Cleve Moler 
  • The Complex-Step Derivative Approximation – by JOAQUIM R. R. A. MARTINS 
  • USING MULTICOMPLEX VARIABLES FOR AUTOMATIC COMPUTATION OF HIGH-ORDER DERIVATIVES – by Gregory Lantoine
  • Computation of higher-order derivatives using the multi-complexstep method – by A. Verheyleweghe  
  • Python : Mathematical functions for complex numbers – cmath 
  • Python cmath Module – w3school 
  • complex_step_derivative.py – Franktoffel 
  • Complex-step derivative approximation – example  

 

  • Complex-step derivative can be applied to second order derivative too, and even higher-orders. It requires some deep knowledge in mathematics, but it is a powerful tool that gives more accurate results than finite difference methods. Some links below gives an overview of second-derivative calculation using complex-step derivative:
  • Finite difference – wikipedia 
  • Extensions of the first and second complex-step derivative approximations – KL Lai & JL Crassidis 

  • USING MULTICOMPLEX VARIABLES FOR AUTOMATIC COMPUTATION OF HIGH-ORDER DERIVATIVES Gregory Lantoine 
  • Computation of higher-order derivatives using the multi-complex step method- by Verheyleweghen 
  • Generalizations of the Complex-Step Derivative Approximation – KL Lai & JL Crassidis 
  • On the generalization of the Complex Step Method – by R. Abreu  

  • Second-Order Divided-Difference Filter Using a Generalized Complex-Step Approximation – KL Lai
  • New Complex-Step Derivative Approximations with Application to Second-Order Kalman Filtering – KL Lai
  • The complex-step derivative approximation – by Joaquim Martins