I tried to use SymPy for a similar problem: computing the Jacobian of a complicated integral using quaternion rotations.
Problem was that the symbolic results were way too complicated and the simplify function didn't help much. So, I got back to manual differentiation.