automatic and symbolic differentiation