hessian takes two arguments : an
expression F of n real variables and a vector of these variable names.
hessian returns the hessian matrix of F, that is the matrix of the
derivatives of order 2.
Example
Find the hessian matrix of F(x,y,z)=2x2y−xz3.
Input :
^
2*y-x*z^
3 , [x,y,z])Output :
^
2)],[2*2*x,0,0],[-(3*z^
2),0,x*3*2*z]]To have the hessian matrix at the critical points, first input :
^
2*y-x*z^
3,[x,y,z]),[x,y,z])Output is the critical points :
Then, to have the hessian matrix at this points, input :
^
2)],[2*2*x,0,0], [-(3*z^
2),0,6*x*z]],[x,y,z],[0,y,0])Output :
^
2)],[4*0,0,0],[-(3*0^
2),0,6*0*0]]and after simplification :