Re: Assumption -> quadratic multivariate function

• To: mathgroup at smc.vnet.net
• Subject: [mg47274] Re: Assumption -> quadratic multivariate function
• From: "Peter Pein" <no at spam.no>
• Date: Fri, 2 Apr 2004 03:30:16 -0500 (EST)
• References: <c40spe\$mqu\$1@smc.vnet.net> <c48qql\$lpf\$1@smc.vnet.net> <c4gds4\$t5d\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```--
Peter Pein, Berlin
StringReplace["petsie at arcand.de",

"Damir Herman" <damir at 2d.com> schrieb im Newsbeitrag
news:c4gds4\$t5d\$1 at smc.vnet.net...
> Hi Peter,
>
> Thank you very much for the tip. However, instead of
>
> >    f /: Dt[f, ___, {x | y, 3}, ___] = 0;
>
> I think the bulletproof assignment would be
>
>       f/: Dt[f, ___, {_, k_/; k>= 3}, ___] = 0;
>
if f doesn't depend on any variable, which depends on x or y this should
work too. But to get the 4th, 5th etc. derivative, you would differntiate
the 3rd, don't you? So I think that

DependsOn[f_, x_^n_] := f /: Dt[f, ___, If[n == 0, x, {x, n + 1}], ___] = 0;
SetAttributes[DependsOn, HoldRest];
DependsOn[f, #] & /@ {x^2, y^2}; DependsOn[x, y^0]; DependsOn[y, x^0];
Dt[f^4, {x, 3}, {y, 3}]
<output omitted>

is sufficient.

> > I suppose you would like to add
> >    x/: Dt[x, ___, y | {y, _}, ___] = 0;
> >    y/: Dt[y, ___, x | {x, _}, ___] = 0;
> > too ;-)
>
> Is this really necessay? I thought that Mathematica automatically
> assumes the variables are independent.
>
> Damir
>
I think it is a possibility to avoid sth. like:

In[1]:= Dt[(x + y)^2, x, y]
Out[1]= 2 (1 + Dt[x, y]) (1 + Dt[y, x])

because
In[2]:= Dt[(x + y)^2, x, y, Constants -> {x, y}]
Out[2]= 0

doesn't (and definitely must not) work.

Peter

--
Peter Pein, Berlin
StringReplace["petsie at arcand.de",