Total derivative

238 views
Skip to first unread message

Sjoerd

unread,
Mar 22, 2013, 9:09:40 AM3/22/13
to xa...@googlegroups.com
Hi

Can xAct recognize total derivatives?

And can xAct move the epsilon tensor inside the derivative and recognize this as a total derivative?
epsilong[a, b, c] CD[-a]@v[-b, -c]

Cheers,
Sjoerd

Alfonso García-Parrado

unread,
Mar 22, 2013, 11:20:17 AM3/22/13
to Sjoerd, xa...@googlegroups.com
Hi Sjoerd,
A possible way of moving the epsilon tensor inside the derivative is
through the definition of the following inert head

DefInertHead[HoldDerivative]

Then you apply the rule

epsilong[a,b,c]CD[-a]@v[-b,-c]->CD[-a]@HoldDerivative[epsilong[a,b,c]v[-b,-c]]

Note that you can use (all ?) the xAct commands (ToCanonical, MakeRule,
etc) on the expression with HoldDerivative.

Best regards,

Alfonso.

Sjoerd

unread,
Mar 25, 2013, 5:50:35 AM3/25/13
to xa...@googlegroups.com, Sjoerd
Hi Alfonso,

This works. Thank you for your answer!

Best,
Sjoerd

Leo Stein

unread,
Mar 25, 2013, 2:12:43 PM3/25/13
to Alfonso García-Parrado, Sjoerd, xa...@googlegroups.com
Hi Alfonso,

This is a very nice idea! I think it might be usefully expanded as
follows. If you know that there is a total derivative in your
expression, you can use MapAt to apply a similar rule to one term, and
get the rest to cancel:
ToHoldDerivativeRule = {outside_ cd_?CovDQ[a_]@inside_ :>
cd[a]@HoldDerivative[outside inside] - inside cd[a]@outside};
ToHoldDerivative[expr_] := expr /. ToHoldDerivativeRule
Then for example, on some expanded expression,
In[] := CD[-a][v[b] w[c]]
Out[] := w[c] CD[-a]@v[b] + v[b] CD[-a]@[w[c]
Using MapAt,
In[] := MapAt[ToHoldDerivative, %, 1]
Out[] := CD[-a]@HoldDerivative[v[b] w[c]]

Unfortunately, I don't think there's any way to know in advance to
which term to apply this rule. After all, and expression may not have
any total derivatives.

Best
Leo
> --
> You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages