|
[Date Index]
[Thread Index]
[Author Index]
Re: D[myFunc[g[x]]] -> myFunc[D[g[x],x]: How to do in ch
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: D[myFunc[g[x]]] -> myFunc[D[g[x],x]: How to do in ch
- From: sfeir at mines.u-nancy.fr
- Date: Tue, 15 Sep 92 11:54:41 +0200
>(* Hi mathgroup,
>
>I hope you can help with this problem. I want to give the function 'myFunc'
>the property of being 'transparent' to differentiation.
>i.e., I want to have
>
> d myFunc[g[x]] d g[x]
> -------------- give me myFunc[ ------ ] (1)
> dx dx
>
>where g is an arbitrary function. "Easy" I hear you say, just write...
>*)
I would suggest the following solution to your problem using tagged set
delayed
D[MyFunc[a_],b_]^:=MyFunc[D[a,b]]
TAGGED means the rule is associated with MyFunc and NOT with D
SET-DELAYED because the rule is executed when it is used and NOT when it is
defined.
EXAMPLES
D[MyFunc[x^n],x]
returns MyFunc[n*x^(-1 + n)]
D[Sin[x^n],x]
returns n*x^(-1 + n)*Cos[x^n]
there is no need to deprotect D
A.A. SFEIR
ECOLE DES MINES DE NANCY, FRANCE
sfeir at mines.u-nancy.fr
Prev by Date:
Re: Can MMa run on a NeXT with 8Mbyte?
Next by Date:
Redirecting Graphics Output
Previous by thread:
Has someone a Simplify that really simplifies?
Next by thread:
Redirecting Graphics Output
|