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

Hi everyone!

Please take a look at the first term of the result of the second @eliminate_metric and the first term of the @prodsort, in the following code. They must be equal but due an automatic "integral by part" in @prodsort all of the derivatives were moved to just one of the fields without any minus sign.

{\alpha, \beta, \rho, \sigma, \mu, \nu, \gamma, \lambda}::Indices.
    \eta^{\mu \nu}::Metric.
    \eta_{\mu \nu}::Symmetric.
    h^{\mu \nu}::Symmetric.
    \Gamma^{\mu}_{\nu \rho}::Depends(\partial).
    \Gamma^{\mu}_{\nu \rho}::TableauSymmetry(shape={2}, indices={1,2}).
    h^{\mu \nu}::Depends(\partial).
    term:=(\eta^{\mu \nu} \eta^{\alpha \beta}\partial_{\mu}\phi
    -k h^{\mu \nu} \eta^{\alpha \beta}\partial_{\mu}\phi )
    - \partial_{\alpha}(\Gamma^{\rho}_{\beta \nu}\partial_{\rho}\phi));

As another question, in the above code I used @eliminate_metric and @distribute twice sequentially to get the desired effect. Is there any way to use just once with the same effect?

in General questions by (1.1k points)

1 Answer

0 votes
Best answer

If you write


this may look like the right thing on your screen, but actually represents a partial derivative acting on nothing, multiplied with A.

What you need to write is


to explicitly tell Cadabra on which object the derivative acts.

by (71.6k points)
selected by

Oops! You are right! This issue is mentioned in the manual!

Would you please give me a hint for the second question that I made in the final.

You can use the 'repeat until expression no longer changes' form


and ditto for eliminate_metric.

By the way there are much more powerful ways to do this in 2.x; I'd recommend that you switch to 2.x for new projects as that is where all the exciting new things happen. See http://cadabra.science.

But what should I do for three derivates like


The above form is correct?

Thanks for answer. For sure, I am in a phase transition to the second version. Now I am trying to learn Sympy to can use Cadabra2 in a more efficient way.


\partial_{\alpha}{ \partial_{\beta}{ \partial_{\nu}{\phi} } }


\partial_{\alpha \beta \nu}{\phi}