Ask Your Question

Revision history [back]

You can try something like this (with x and y as variables and z as parameter):

sage: var('x y z')
(x, y, z)
sage: f(x,y) = x*y*z
sage: f.hessian()
[(x, y) |--> 0 (x, y) |--> z]
[(x, y) |--> z (x, y) |--> 0]

You can try something like this (with x and y as variables and z as parameter):

sage: var('x y z')
(x, y, z)
sage: f(x,y) = x*y*z

sage: f.arguments()
(x, y)
sage: f.variables()
(x, y, z)

sage: f.hessian()
[(x, y) |--> 0 (x, y) |--> z]
[(x, y) |--> z (x, y) |--> 0]