You could also use a package that I wrote for that purpose https://continuum-mechanics.readthedocs.io/en/latest/
If you are interested in Cartesian coordinates only you could just do the following u = Matrix([x, 2*y*z, 3*x*y]) J = u.jacobian([x, y, z]) H = Array([J[:, k].jacobian([x, y, z]) for k in range(3)], (3, 3, 3)) to get [[0 0 0] [0 0 0] [0 0 0]] [[ ] [ ] [ ]] [[0 0 0] [0 0 2] [0 2 0]] [[ ] [ ] [ ]] [[0 3 0] [3 0 0] [0 0 0]] On Friday, July 3, 2020 at 6:24:44 PM UTC-5, Isaque Soares wrote: > > Is there a way to compute the gradient and hessian matrices of a vector > field like u = (x) i + (2yz) j + (3xy) k. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/2b72761f-aeb2-466c-a383-391743c34533o%40googlegroups.com.