MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Derivative of a function with multiple variables


If you look in the help on D, it was extended to allow easy
computation of the gradient and hessian. I think the syntax is:

gradient
D[f[x,y,z],{{x,y,z},1}]

hessian
D[f[x,y,z],{{x,y,z},2}]



On 9/13/06, Adel Elsabbagh <aelsabbagh at gmail.com> wrote:
> Hi all,
>
> I am sure this is easy to many of you
>
> Assume I have f = f[x,y,z]
> I would like to construct a simple function g[f[x,y,z]] that will
> generate the Hessian. i.e.
> g[f[x,y,z]]=
> {{Derivative[2,0,0][f][x,y,z], Derivative[1,1,0][f][x,y,z],
> Derivative[1,0,1][f][x,y,z]},
> {Derivative[1,1,0][f][x,y,z], Derivative[0,2,0][f][x,y,z],
> Derivative[0,1,1][f][x,y,z]},
> {Derivative[1,0,1][f][x,y,z], Derivative[0,1,1][f][x,y,z],
> Derivative[0,0,2][f][x,y,z]}}.
>
> Any help?
>
> --
> Adel Elsabbagh
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: Result changing
  • Next by Date: Summing elements within a List or Array
  • Previous by thread: Derivative of a function with multiple variables
  • Next by thread: Re: Derivative of a function with multiple variables