Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Why does Derivative fail in this case?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96582] Re: Why does Derivative fail in this case?
  • From: dh <dh at metrohm.com>
  • Date: Mon, 16 Feb 2009 16:40:03 -0500 (EST)
  • References: <gnbkcl$3ej$1@smc.vnet.net>


Hi Aaron,

if you write: g = f[##]*f[##] &; the number of arguments to f is not 

defined until you execute g, specifying arguments. g alone will not 

evaluate. Therefore g is treated as a constant in: Derivative[1, 0][g1].

As a remedy, spezify the arguments in:

g1 = f1[#1, #2]^2 &;

and all is well.

hope this helps, Daniel







Aaron Fude wrote:

> Hi,

> 

> This example is self-explanatory:

> 

> f[x_, y_] := x y

> g = f[##]*f[##] &;

> h = Derivative[1, 0][g];

> g[x, y]

> h[x, y]

> 

> I should expect that h[x, y] is 2 x y^2, but instead it is zero. How

> come?

> 

> Version 6.0

> 

> Many thanks in advance,

> 

> Aaron

> 




  • Prev by Date: Re: Length of a held expression
  • Next by Date: pfa2pfb
  • Previous by thread: Re: Why does Derivative fail in this case?
  • Next by thread: Re: Why does Derivative fail in this case?