sym_diff symbolic differentiation References https://www.microsoft.com/en-us/research/publication/the-d-symbolic-differentiation-algorithm/