Add numerical differentiation function.