Re: Forcing a Derivative

*To*: mathgroup at smc.vnet.net*Subject*: [mg50855] Re: Forcing a Derivative*From*: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>*Date*: Fri, 24 Sep 2004 04:41:29 -0400 (EDT)*References*: <cijej8$hlp$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

For some reason my reply (on 21 September 2004) to this posting vanished into the aether. Here it is again: Here's one way to coerce Mathematica into doing what you want. Use total derivative to evaluate derivatives of objects w.r.t. anything: Dt[f g, x] gives g Dt[f,x]+f Dt[g,x] and Dt[f+g,x] gives Dt[f,x]+Dt[g,x] Don't like the verbose notation? Use the notation package to restore things back to the way you wanted them in the first place. << Utilities`Notation` Define a new notation that bidirectionally relates your preferred primed notation (typeset form) to the Mathematica Dt notation (internal form). Note that the expression below has to be entered using the notation palette because it has some hidden information in it. Notation[x_' \[DoubleLongLeftRightArrow] Dt[x_]] Now (f+g)' gives f'+g' and (f g)' gives g f'+f g' Steve Luttrell "Scott Guthery" <sguthery at mobile-mind.com> wrote in message news:cijej8$hlp$1 at smc.vnet.net... > How does one force Derivative[n] to actually take the derivative? > > For example if ... > > f[x_] = x^2 + 7 > > g[x_]=3x^3 + 23 > > then > > Derivative[2][f * g] > > just puts a couple of primes on the product rather than actually computing > the dervative. > > Thanks for any insight. > > Cheers, Scott >