Re: Best syntax for derivative
- To: mathgroup at smc.vnet.net
- Subject: [mg96415] Re: Best syntax for derivative
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Fri, 13 Feb 2009 03:42:28 -0500 (EST)
- References: <gn11tc$8e0$1@smc.vnet.net>
Hi, > Suppose I have a function of three variables > > f[x_, y_, z_]:=Sin[x y z] > > And I want to construct g[x, y, z] which is the partial derivative of f > [] with respect to y. I do > > f[x_, y_, z_] := Sin[x y z] > g[x_, y_, z_] := D[f[x, temp, z], temp] /. temp -> y > > but I'm sure there is something better. Something along the lines of > > g = Partial[f, 2] Maybe this is what you are looking for: h = Derivative[0, 1, 0][f] hth, albert