symbolic differentiation in Ocaml