Re: Pattern matching partial derivatives
- To: mathgroup at smc.vnet.net
- Subject: [mg52409] Re: Pattern matching partial derivatives
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Fri, 26 Nov 2004 01:04:39 -0500 (EST)
- References: <co4dsi$l82$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Nicolas Girard wrote: > Hi all, > I can't get finding patterns that would match a simple partial derivative: > > Input: > ?f > ?x > D[f, x, NonConstants -> {f}] // FullForm > > Output: > Global`f > Global`x > D[f, x, Rule[NonConstants, List[f]]] > > Input: > MatchQ[ > D[f, x, Rule[NonConstants, List[f]]], > D[f_, x_, Rule[NonConstants, nc_]] > ] > Output: > False > > > Am I damned ? > Many thanks in advance ! > Cheers, > Nicolas > Nicolas, Yes, getting this output from Mathematica can be a sign of damnation! Alternatively, look at this: D[f_, x_, Rule[NonConstants, nc_]] // FullForm 0 If you want to manipulate derivatives in complicated ways, one way is to use your own notation for a derivative (say dD) which will obviously not evaluate, and then use dD ->D to get evaluation when you need it. David