       Re: Defining a derivative that distributes for a function

• To: mathgroup at smc.vnet.net
• Subject: [mg64263] Re: Defining a derivative that distributes for a function
• From: "Sasha P" <mathpro.admin at gmail.com>
• Date: Wed, 8 Feb 2006 03:54:02 -0500 (EST)
• References: <ds9mqp\$48\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Dear Andreas,

Instead of redefining D operator, consider introducing customized
\[ScriptCapitalD] which you type as "Esc" scD "Esc". Then

In:=
\[ScriptCapitalD][expr_, x__] /; FreeQ[expr, f[_]] := D[expr, x];
\[ScriptCapitalD][expr_, x__] := Module[{t = D[expr, x]},
t /. {Derivative[n_Integer /; n > 1][f][z_] -> 0} /.
{Derivative[f][z_] :> (1/D[z, x])*f[D[z, x]]}]

In:=
\[ScriptCapitalD][f[x^2] + f[x^4], x]

Out=
f[2*x] + f[4*x^3]

In:=
\[ScriptCapitalD][f[x^2] + f[x^4], {x, 2}]

Out=
f + f[12*x^2]

In:=
\[ScriptCapitalD][f[x^2]*f[x^4], {x, 2}]

Out=
(2/3)*x^2*f*f[12*x^2] + f[x^2]*f[12*x^2] + f*f[x^4]

Hope this is what you aimed at.

Regards,
Sasha

```

• Prev by Date: Problems with With/Block/Module functions
• Next by Date: DSolve:: Bessel's differential equation
• Previous by thread: Re: Defining a derivative that distributes for a function
• Next by thread: Re: Defining a derivative that distributes for a function