MathGroup Archive 2009

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

Search the Archive

Best syntax for derivative

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96386] Best syntax for derivative
  • From: Aaron Fude <aaronfude at gmail.com>
  • Date: Thu, 12 Feb 2009 06:41:48 -0500 (EST)

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]

Many thanks in advance.

Aaron


  • Prev by Date: weighted directed graph representation for BipartiteMatching (Combinatorica)
  • Next by Date: Re: Default Input and Output Format
  • Previous by thread: weighted directed graph representation for BipartiteMatching (Combinatorica)
  • Next by thread: Re: Best syntax for derivative