MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Pattern matching partial derivatives


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


  • Prev by Date: Re: Pattern matching partial derivatives
  • Next by Date: Re: [Newbie Question] changing default font sizes
  • Previous by thread: Re: Pattern matching partial derivatives
  • Next by thread: Re: Pattern matching partial derivatives