0
$\begingroup$

If

f:= x^3 + 2yz + 5 x^2z 

is a function and if {2,0,1},{3,9,2},{8,5,6},{1,1,7} are points. I would like a Hessian of f with the four points together.

I did that with the first point like:

hessian[x_, y_, z_] = Function[{f}, D[f, {{x, y, z}}, {{x, y, z}}] ]; 
f[x_, y_, z_] :=  x^3 + 2yz + 5 x^2z;
hessian[x, y, z][f[x, y, z]]//FullSimplify
%/.{x->2,y->0,z->1} 

So, I need to apply Hessian of f at all the points at the same time. Thanks for any help

$\endgroup$

1 Answer 1

3
$\begingroup$
hessianF[x_,y_,z_] = hessian[x, y, z][f[x, y, z]]//FullSimplify;

hessianF @@@ {{2,0,1},{3,9,2},{8,5,6},{1,1,7}}
$\endgroup$
1
  • $\begingroup$ No open Mathematica at hand currently, but I believe this should do the tricj. $\endgroup$ Commented Oct 12, 2015 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.