Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Bypassing built-in functions in differentiation

  • To: mathgroup at
  • Subject: [mg62666] Re: [mg62577] Bypassing built-in functions in differentiation
  • From: Ofek Shilon <ofek at>
  • Date: Wed, 30 Nov 2005 05:40:39 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Hi Yehuda
I don't have access to the mathematica journal at the moment, but i suspect
their solution 
for matrix derivatives relates to matrices with explicit entries, that is -
explicit 2 dimensional arrays. 
is this the case?     (i'll try and get my hands on this journal issue
either way, of course)


From: bsyehuda at [mailto:bsyehuda at] 
To: mathgroup at
Subject: [mg62666] Re: [mg62577] Bypassing built-in functions in differentiation

Hi Ofek,
If have an access to the Mathematica Journal, look at Volume 8, Issue 4. 
Chapter "In and Out" by Paul Abbott (page 529) gives a full solution for
matrix derivatives

On 11/29/05, Ofek Shilon <ofek at> wrote: 

Dear MathGroup.

consider the following statement:


which evaluates to

Dt[a] Transpose`[a]

that is, mathematica treats Transpose as a function and uses the chain
rule. i can try and bypass this behaviour manually: 

Dt[Transpose[x_]] := Transpose[Dt[x]]

but now consider expressions like -


which still produces:

Transpose[a].Dt[b] + Dt[a] Transpose`[a] b

which is a bit surprising. i can of course bypass this behaviour 
manually as well:

Dt[Transpose[x_].y_] := Transpose[Dt[x]].y + Transpose[x].Dt[y]

which gives the desired result, but then check the following -

etc. etc.

i tried also to define - 
Dt[Transpose[x_]] =1

which produces readable results, but discards the (correct, and needed)
'Transpose' head over a factor in the differentiation.

There has to be a general solution. is there a 'hook' where i can 
interfere with the derivative computation? (i thought user definitions
would suffice, but apparently not)



  • Prev by Date: Re: Notebook for Borel-Tanner Distribution
  • Next by Date: Re: function of a function
  • Previous by thread: Re: Bypassing built-in functions in differentiation
  • Next by thread: Re: Built-In fuctions redefined---How?