Re: Bypassing built-in functions in differentiation
- To: mathgroup at smc.vnet.net
- Subject: [mg62647] Re: [mg62577] Bypassing built-in functions in differentiation
- From: <bsyehuda at gmail.com>
- Date: Wed, 30 Nov 2005 00:06:47 -0500 (EST)
- References: <200511290944.EAA08566@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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 yehuda On 11/29/05, Ofek Shilon <ofek at simbionix.com> wrote: > > Dear MathGroup. > > consider the following statement: > > Dt[Transpose[a]] > > 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: > > Unprotect[Dt]; > Dt[Transpose[x_]] := Transpose[Dt[x]] > > but now consider expressions like - > > Dt[Transpose[a].b] > > 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 - > Dt[(Transpose[a].b)^2] > > 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) > > > thanks, > > Ofek > >
- References:
- Bypassing built-in functions in differentiation
- From: "Ofek Shilon" <ofek@simbionix.com>
- Bypassing built-in functions in differentiation