hessian

Hessian matrix of a scalar function

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

hessian(f, x)

Description

hessian(f, x) computes the Hesse matrix (the Hessian) of the scalar function in Cartesian coordinates, i.e., the square matrix of second partial derivatives of .

Examples

Example 1

The Hessian of the function f(x, y, z) = xy + 2 xz is the following matrix:

delete x, y, z:
hessian(x*y + 2*z*x, [x, y, z])

Parameters

f

An arithmetical expression (the scalar function)

x

A list of (indexed) identifiers

Return Values

Matrix of the domain Dom::Matrix().

Algorithms

For a function , X a subset of , the p×p matrix

is called the Hesse matrix of f.

See Also

MuPAD Functions

Was this topic helpful?