       Re: Why does Derivative fail in this case?

• To: mathgroup at smc.vnet.net
• Subject: [mg96583] Re: [mg96557] Why does Derivative fail in this case?
• From: DrMajorBob <btreat1 at austin.rr.com>
• Date: Mon, 16 Feb 2009 16:40:14 -0500 (EST)
• References: <200902161158.GAA03553@smc.vnet.net>

```This works:

f[x_, y_] := x y
g = f[##]*f[##] &;
h[x_, y_] := D[g[x, y], x]
g[x, y]
h[x, y]

x^2 y^2

2 x y^2

As to why the other did not? Not sure.

I do know it's often a poor idea to write functions without arguments.

Bobby

On Mon, 16 Feb 2009 05:58:26 -0600, Aaron Fude <aaronfude at gmail.com> 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
>
>
> Aaron
>

--
DrMajorBob at longhorns.com

```

• Prev by Date: pfa2pfb
• Next by Date: Re: Division by zero, despite strong hint
• Previous by thread: Why does Derivative fail in this case?
• Next by thread: Re: Why does Derivative fail in this case?