Previous Up Next

13.7.3 Hessian matrix

Recall, the Hessian of a function F of n variables x1,…,xn is the matrix of second order derivatives:










2 F
x12
2 F
x1xn
2 F
xnx1
2 F
xn2









The hessian command computes the Hessian of a function.

Examples

Find the Hessian matrix of F(x,y,z)=2x2yxz3.

hessian(2*x^2*y-x*z^3,[x,y,z])



4 y4 x−3 z2
2· 2 x00
−3 z20−2· 3 x z



          

To get the Hessian matrix at the critical points:

solve(derive(2*x^2*y-x*z^3,[x,y,z]),[x,y,z])

Output (the critical points):



0,y,0

          

Input to evaluate the Hessian at these points:

subst([[4*y,4*x,-3*z^2],[2*2*x,0,0],[-3*z^2,0,6*x*z]],[x,y,z],[0,y,0])



4 y00
000
000



          

Previous Up Next