Previous Page Next Page Contents

linalg::hessian -- Hessian matrix of a scalar function

Introduction

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

Call(s)

linalg::hessian(f,x)

Parameters

f - an arithmetical expression (the scalar function)
x - a list of (indexed) identifiers

Returns

a matrix of the domain Dom::Matrix().

Related Functions

diff, linalg::grad, linalg::jacobian

Example 1

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

>> delete x, y, z:
   linalg::hessian(x*y + 2*z*x, [x, y, z])
                               +-         -+
                               |  0, 1, 2  |
                               |           |
                               |  1, 0, 0  |
                               |           |
                               |  2, 0, 0  |
                               +-         -+

Background




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000