hessian

View: New views
2 Messages — Rating Filter:   Alert me  

hessian

by Eric Reyssat-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I don't know how to use the "hessian" function (to get the matrix of
second partial derivatives of a function). Do I have to load some
package ? Does anybody have any example of its use ?

Eric Reyssat
_______________________________________________
Maxima mailing list
Maxima@...
http://www.math.utexas.edu/mailman/listinfo/maxima

Re: hessian

by Barton Willis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

maxima-bounces@... wrote on 11/21/2006 11:04:51 AM:

> Hello,
>
> I don't know how to use the "hessian" function (to get the matrix of
> second partial derivatives of a function). Do I have to load some
> package ? Does anybody have any example of its use ?


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. 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]);


(%i37) 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])$

(%i38) hessian(a*x^2 + b*x*y + c*y^2,[x,y]);
(%o38) matrix([2*a,b],[b,2*c])


Barton
_______________________________________________
Maxima mailing list
Maxima@...
http://www.math.utexas.edu/mailman/listinfo/maxima