Formal differentiation: A program synthesis technique