Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

Hi! I am using Cadabra 2.2.0 to calculate

test:=\partial_{\mu}{\exp(i*x_{\lambda}*k^{\lambda})}

I expect that the expression on the exponent is also derived and the complex index i evaluated.

What is the best method to achieve this result?

Thank you,

Mattia

in General questions by (410 points)

1 Answer

+1 vote

This is something somewhere in the middle between an abstract and a component computation, and I haven't yet settled completely on what is the best way to handle this. For the time being I would suggest you use a simple substitution rule, e.g.

\partial{#}::PartialDerivative;
test:=\partial_{\mu}{\exp(i*x^{\lambda}*k_{\lambda})};
rl:= \partial_{\mu}{ \exp( A?? ) } -> \exp( A?? ) \partial_{\mu}{ A?? };
substitute(test, rl);
product_rule(test);
substitute(test, $\partial_{\mu}{x^{\lambda}} -> \delta_{\mu}^{\lambda}$ );
unwrap(test);

That gets you almost there, but eliminate_kronecker which you would now want to use cannot handle the duplicate dummy index pair. So you'll need another substitution to get rid of the Kronecker delta.

Good example though, will see if we can make this work more easily.

by (82.5k points)

Perfect, thank you!

...