On 11/21/06, Barton Willis <willisb at unk.edu> wrote:
> The hessian function is documented, but I don't know where it is. The
> hessian function is listed under the linearalgebra package, but it
> seems that there is no hessian function in linearalgebra.
hessian is defined in share/calculus/qual.mac (and nowhere else).
load(qual) fails, so it's not usable. Looking at qual.mac, hessian is
defined incorrectly anyway.
> Until that problem is fixed, try:
>
> hessian(f,v) := if listp(v) then funmake('matrix, makelist(diff(makelist(
> diff(f,vi),vi,v),vj),vj,v)) else funmake('hessian,[f,v]);
Another possible definition is
hessian (f, v) := if listp(v) then funmake (matrix, outermap (lambda
([a, b], diff (f, a, 1, b, 1)), v, v)) else 'hessian (f, v);
We should probably put a working definition of hessian somewhere --
how about share/vector/vect.mac ? There is already some stuff there
for div and laplacian, although not grad; we should put in grad also.
best
Robert