On the Equivalence of Automatic and Symbolic Differentiation