0
$\begingroup$

I'd like a replacement rule that replaces derivatives with their total order. I tried

ReplaceAll[Derivative[x__] -> Plus[x]][Derivative[1, 1]]

but it doesn't return 2, but Sequence[1,1].

How could I get the sum of the sequence to work inside the rule?

$\endgroup$
1
  • 1
    $\begingroup$ RuleDelayed instead of Rule. $\endgroup$ – Carl Woll Sep 15 '17 at 17:15
1
$\begingroup$

As per the comment above,

ReplaceAll[Derivative[x__] :> Plus[x]][Derivative[1, 1]]
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.