# derivatives with two indices

+1 vote

Hello,

I need to use derivatives with two indices. However, when I use product_rule or integrate_by_parts, Cadabra splits the derivatives into two derivatives with one index each. Is there any way to circumvent this ?

Thank you

That sounds right for product_rule and integration_by_parts, since those act on single derivatives so they have to 'peel off' the derivative they work with.

Can you give a concrete example of some situation in which you think the behaviour is not correct or non-ideal?

I see. It makes sense.

For example, if I define

test:=\partial{G P}{A_{M N}*A^{K L}};

and use product_rule on it, I would like the result to be

\partial{G P}{A_{M N}}*\epsilon{A^{K L}} + A_{M N}*\partial{G P}{A^{K L}}

\partial{G}{\partial{P}{A_{M N}}*\epsilon{A^{K L}} + A_{M N}*\partial_{P}{A^{K L}}}

I would like \partial{G P} to behave as one derivative.

+1 vote

If \partial_{G P}{...} really indicates a single derivative (e.g. G and P are spinor indices obtained from a vector index with the use of a Pauli matrix or something like that), then it may make sense to revert to single-index notation temporarily.

Alternatively, just write a substitution rule, e.g.

{G,P,M,N,K,L}::Indices;
\partial{#}::PartialDerivative;
test:=\partial_{G P}{A_{M N}*A^{K L}};
pr:= \partial_{G P}{A?? B??} = \partial_{G P}{A??} B??
+ A?? \partial_{G P}{B??};
substitute(test, pr);

Cadabra does not have functionality to treat multiple indices as one out-of-the-box at the moment.

by (80.4k points)

Thank you very much ! The "pr" rule seems to work very well.