       Re: Bypassing built-in functions in differentiation

• To: mathgroup at smc.vnet.net
• Subject: [mg62625] Re: Bypassing built-in functions in differentiation
• From: "Ofek Shilon" <ofek at simbionix.com>
• Date: Tue, 29 Nov 2005 06:44:04 -0500 (EST)
• References: <dmh8hi\$8n7\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```> Hi Ofek,
>
> dig a little deeper and change Transpose' :
>
> In:= Unprotect[Transpose];
>    Derivative[Transpose] ^= 1 &
> Out= 1&
> In:= Dt[Transpose[a]]
> Out= Dt[a]
> In:= Dt[Transpose[a] . b]
> Out= Dt[a].b+Transpose[a].Dt[b]
> In:= Dt[(Transpose[a] . b)^2]
> Out= 2 Transpose[a].b (Dt[a].b+Transpose[a].Dt[b])
>
> etc.
>
> Peter
>

Hi Peter .

The results

In:= Dt[Transpose[a]]
Out= Dt[a]

Are EXACTLY what I wish to avoid. ( as I wrote, I'm already able to
reproduce them). what I hope to accomplish is smthng like -

In:= Dt[Transpose[a]]
Out:=Transpose[Dt[a]]

That is, I cannot waive the Transpose head on the derivative.

Since my former post, I started using the following hack:

In:= Transpose'[x_]:=Transpose[Dt[x]] / Dt[x]

Which compensates 'manually' for the Dt[x] factor formed by direct
differentiation, but is still unsatisfactory - since it fails whenever
Dt[x] is set externally to zero.

I often encounter seemingly strange behaviour from differentiation-
heads. My overall experience is that Dt resists manual intervention in
many ways that produce unpredictable results. Try the following input:

In:=
ScalarQ[Dt[f_,y_]]:=True /;TrueQ[ScalarQ[f]]

In:=
ScalarQ[x]=True

In:=
ScalarQ[Dt[x,y]]

Out=
ScalarQ[Dt[x,y]]

Out=
True

Maybe Dt and its cousins (Derivative, D) undergo unconventional
evaluation that I'm unaware of?

Ofek

```

• Prev by Date: Re: Bypassing built-in functions in differentiation
• Next by Date: Re: Get numbers out of PhysicalConstants?
• Previous by thread: Re: Bypassing built-in functions in differentiation
• Next by thread: Bypassing built-in functions in differentiation