Processing math: 100%
Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+5 votes

Hi everyone, I'm trying to derive the equations of motion of a scalar field with a potential V(ϕ), S:=g(12gμνμϕνϕ+V)d4x; however when I compute the variational derivative of the action with respect to ϕ the potential does not appear (due to property V::Depends(x), only allow to make objects implicitly dependent on the coordinates). Is there any property in Cadabra which Makes an object explicitly dependent on other objects, like V(ϕ)?

Thank you !!

in General questions by

2 Answers

+3 votes
 
Best answer

This is not automatic (yet), but it's not difficult to work around it by simply adding another rule for how V should vary. Something like

\partial{#}::PartialDerivative;
\delta{#}::Accent;
g^{\mu\nu}::Symmetric;
S:= \int{ \sqrt{-g} ( 1/2 g^{\mu\nu}\partial_{\mu}{\phi} \partial_{\nu}{\phi} + V) }{x};
rl:= \phi -> \delta{\phi}, V -> V' \delta{\phi};
vary(S, rl)
sort_product(S)
canonicalise(_)

will produce

g(μδϕνϕgμν+Vδϕ)dx

after which you can do

distribute(_)
integrate_by_parts(_, $\delta{\phi}$)
factor_out(_, $\delta{\phi}$);

to get things in an equation-of-motion form.

by (85.0k points)
0 votes

It is now working for only scalar fields.

Can we solve the action of Einstein-Maxwell gravity coupled minimally to a scalar field by cadabra?

S=d3xg(R2μϕμϕF2V(ϕ))

Thanks

by (250 points)
edited by

This is not an anser to the question!

...