MathGroup Archive 2005

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

Search the Archive

Re: Bypassing built-in functions in differentiation

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

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

Hi Peter .

The results

In[3]:= Dt[Transpose[a]]
Out[3]= 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[2345]:= Dt[Transpose[a]]

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

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

In[1]:= 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:

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





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


  • 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