Is this a BUG of D[f, var1, ..., NonConstants -> {u1, ...}] ?

• To: mathgroup at smc.vnet.net
• Subject: [mg65186] Is this a BUG of D[f, var1, ..., NonConstants -> {u1, ...}] ?
• From: "wyelen at gmail.com" <wyelen at gmail.com>
• Date: Fri, 17 Mar 2006 00:13:29 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```As we all know, when Evaluating the following command:

D[f[x], t, NonConstants -> {x}]

we should got something like this:

D[x, t, NonConstants -> {x}] f ' [x]

But there seems to be some particular names in Mathematica, which will
cause strange things when using as variables.

eg. We expect a result as

D[g, t, NonConstants -> {g}] f ' [g]

when Evaluate

D[f[g], t, NonConstants -> {g}]

but in fact Mathematica gives 0.

And let's go further, to run the following code to see more instances.

(*define a arbitrary function fn's derivative*)
Clear[tpf]
tpf[mvr_, vr_] := D[fn[mvr], vr, NonConstants -> {mvr}]

(*we'll calculate derivatives using variables named over this List*)
stl = ToExpression[CharacterRange["a", "z"]];

(*the result-table. you'll find some unexpected and regular zeros.*)
dchn = Table[tpf[stl[[lp1]], stl[[lp2]]], {lp1, 26}, {lp2, 26}];
TableForm[dchn]

(*for clear vision*)
TableForm[dchn /. D :> (Subscript[#1, #2] & )]

In order to paste the result here, I replaced all of the nonzero
elements in it with ".", so you can see clearly.

a b c d e f g h i j k l m n o p q r s t u v w x y z
a . . . . . 0 . . . . . . . 0 . . . . 0 . . . . . . .
b . . . . . 0 . . . . . . . . 0 . . . 0 . . . . . . .
c . . . . . 0 . . . . . . . . . 0 . . 0 . . . . . . .
d . . . . . 0 . . . . . . . . . . 0 . 0 . . . . . . .
e . . . . . 0 . . . . . . . . . . . 0 0 . . . . . . .
f . . . . . . . . . . . . . . . . . . 0 . . . . . . .
g . . . . . 0 . . . . . . . . . . . . 0 0 . . . . . .
h . . . . . 0 . . . . . . . . . . . . 0 . 0 . . . . .
i . . . . . 0 . . . . . . . . . . . . 0 . . 0 . . . .
j . . . . . 0 . . . . . . . . . . . . 0 . . . 0 . . .
k . . . . . 0 . . . . . . . . . . . . 0 . . . . 0 . .
l . . . . . 0 . . . . . . . . . . . . 0 . . . . . 0 .
m . . . . . 0 . . . . . . . . . . . . 0 . . . . . . 0
n 0 . . . . 0 . . . . . . . . . . . . 0 . . . . . . .
o . 0 . . . 0 . . . . . . . . . . . . 0 . . . . . . .
p . . 0 . . 0 . . . . . . . . . . . . 0 . . . . . . .
q . . . 0 . 0 . . . . . . . . . . . . 0 . . . . . . .
r . . . . 0 0 . . . . . . . . . . . . 0 . . . . . . .
s . . . . . 0 . . . . . . . . . . . . . . . . . . . .
t . . . . . 0 0 . . . . . . . . . . . 0 . . . . . . .
u . . . . . 0 . 0 . . . . . . . . . . 0 . . . . . . .
v . . . . . 0 . . 0 . . . . . . . . . 0 . . . . . . .
w . . . . . 0 . . . 0 . . . . . . . . 0 . . . . . . .
x . . . . . 0 . . . . 0 . . . . . . . 0 . . . . . . .
y . . . . . 0 . . . . . 0 . . . . . . 0 . . . . . . .
z . . . . . 0 . . . . . . 0 . . . . . 0 . . . . . . .

```

• Prev by Date: Re: Construction of Vandermonde equations:
• Next by Date: Re: Re: Unevaluated a[[1]]*a[[2]]
• Previous by thread: Re: Subscripted variables and function definitions
• Next by thread: Re: Is this a BUG of D[f, var1, ..., NonConstants -> {u1, ...}] ?