linalg(deprecated)/hessian - Help

linalg(deprecated)

 hessian
 compute the Hessian matrix of an expression

 Calling Sequence hessian(expr, vars)

Parameters

 expr - scalar expression vars - vector or list of variables

Description

 • Important: The linalg package has been deprecated. Use the superseding command VectorCalculus[Hessian], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The procedure hessian(expr, vars) computes the Hessian matrix of expr with respect to vars.
 • The matrix result is n x n, where n is the length of vars. The (i, j)th entry of the matrix result is diff(expr, vars[i], vars[j]).
 • The command with(linalg,hessian) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command VectorCalculus[Hessian], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $\mathrm{hessian}\left(xyz,\left[x,y,z\right]\right)$
 $\left[\begin{array}{ccc}{0}& {z}& {y}\\ {z}& {0}& {x}\\ {y}& {x}& {0}\end{array}\right]$ (1)
 > $\mathrm{hessian}\left({x}^{2}y+3x{y}^{2},\left[x,y\right]\right)$
 $\left[\begin{array}{cc}{2}{}{y}& {2}{}{x}{+}{6}{}{y}\\ {2}{}{x}{+}{6}{}{y}& {6}{}{x}\end{array}\right]$ (2)