ecterrab

14540 Reputation

24 Badges

20 years, 20 days

MaplePrimes Activity


These are answers submitted by ecterrab

First, according to odeadvisor's help page,


The matching of the types is checked sequentially, and odeadvisor might return more than one type; otherwise, the first matching of a pattern interrupts the process and a classification is returned.

In fact, enter DEtools:-odeadvisor(ode, [dAlembert]) and you see your ode also matches dAlembert, not just separable.

Second, you realize the scope of a command like dsolve requires more than a classification: several ODEs can be tackled using different approaches, and choosing an appropriate one for each case requires considering multiple things. Your ode is a simple example of that. To make the point, a much more common, and complicated case is when the ODE does not match any standard classification but there are different symmetries available, sometimes also different integrating factors, all these leading to different forms of the solution. Anyway, solving your example using dAlembert's formulation is just more appropriate than tackling it as a separable equation.

Third, see ?dsolve,setup and you see you can force dsolve to use methods in an ordering different than the one I coded (mind you, the choice you see on that page is nontrivial).

Fourth, this ode you brought, as several other ones you have been posting, is nonlinear in the highest derivative; several methods require isolating the highest derivative, which involves choosing branches. Typically, the choice of a branch makes the solution valid only in some regions. This "problem" is unavoidable: either you accept an ode nonlinear in its highest derivative as a valid problem or not. If yes, you need to decide on what to do with these choices of branches. It is mainly for this reason I coded the implicit option.

With the above paragraphs in mind, this is what I see for your ode

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

 

First reply: "the indicated formula has singularities". I goofed with that comment (deleted now), as @vv tells below. The formula suggested by Wolinski above is now returned by the FunctionAdvisor and by convert(tan(z), Sum) as per pic below.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft


 

To install the fix, open Maple and input Physics:-Version(latest).
The solution returned, however, is not the simplest you show but this other one:

ode := diff(y(x), x, x) = (diff(y(x), x))^3-(diff(y(x), x))^2

IC := y(0) = 3, (D(y))(0) = 1

dsolve([ode, IC])

y(x) = ln(LambertW(-RootOf(LambertW(-_Z*exp(-1)))*exp(x-1)))+4-ln(-RootOf(LambertW(-_Z*exp(-1))))

(1)

`assuming`([simplify(y(x) = ln(LambertW(-RootOf(LambertW(-_Z*exp(-1)))*exp(x-1)))+4-ln(-RootOf(LambertW(-_Z*exp(-1)))))], [positive])

y(x) = x+3-LambertW(-RootOf(LambertW(-_Z*exp(-1)))*exp(x-1))

(2)

odetest(y(x) = ln(LambertW(-RootOf(LambertW(-_Z*exp(-1)))*exp(x-1)))+4-ln(-RootOf(LambertW(-_Z*exp(-1)))), ode)

0

(3)

To test the IC requires using limit

limit(y(x) = ln(LambertW(-RootOf(LambertW(-_Z*exp(-1)))*exp(x-1)))+4-ln(-RootOf(LambertW(-_Z*exp(-1)))), x = 0)

y(0) = limit(ln(LambertW(-RootOf(LambertW(-_Z*exp(-1)))*exp(x-1)))+4-ln(-RootOf(LambertW(-_Z*exp(-1)))), x = 0)

(4)

simplify(y(0) = limit(ln(LambertW(-RootOf(LambertW(-_Z*exp(-1)))*exp(x-1)))+4-ln(-RootOf(LambertW(-_Z*exp(-1)))), x = 0))

y(0) = 3

(5)

limit(diff(y(x) = ln(LambertW(-RootOf(LambertW(-_Z*exp(-1)))*exp(x-1)))+4-ln(-RootOf(LambertW(-_Z*exp(-1)))), x), x = 0)

(D(y))(0) = 1

(6)

NULL


 

Download Fixed_in_v.1780.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

 



Download representation_of_code_(reviewed).mw

PS: if you use Maple 2024, remember to input Physics:-Version(latest) to work with the current Physics version.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft
 

Hi
d_[1](g(r)) will return different from 0 if and only if r depends on the Cartesian coordinates (that you defined as such). When you enter r = sqrt(x^2 + y^2 + z^2), so using the `=` operator, r does not get assigned anything. Input r and you see r as output. Use the assignment operator `:=` and i you will get what you were expecting.

Regarding diff(r, x) after you loaded the Physics:-Vectors package, that package comes with a diff command that automatically use the interdependency between Cartesian (x, y, z), Cylindrical (rho, phi, z) and Spherical coordinates (r, theta, phi) without you having to assign or state anything, and that in turn is also a setting: input Setup(geometricdifferentiation), and you see its value is false after loading Physics but before loading Vectors and true after loading it. This setting only affects the output of Physics:-Vectors:-diff, not Physics:-d_. I realize this is more of a design issue; intentional though: more often than otherwise, when using d_ we do not want geometricdifferentiation to interfere with computations, and if you want, it suffices to use := instead of = as mentioned above.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft.

This is your worksheet with some minor corrections, comments, and three different ways of arriving at the same result (note you didn't say what is the result you expect)

 

restart

with(Physics)

with(Vectors)NULL

Setup(spacetimeindices = greek, spaceindices = lowercaselatin, su2indices = uppercaselatin, signature = `+++-`, coordinates = spherical)

[coordinatesystems = {X}, signature = `+ + + -`, spaceindices = lowercaselatin, spacetimeindices = greek, su2indices = uppercaselatin]

(1)

Setup(realobjects = {g, diff(x, x), diff(y(x), x), diff(z(x), x), f__A(X[1])})

[realobjects = {g, phi, r, rho, theta, x, `x'`, y, `y'`, z, `z'`, f__A(r)}]

(2)

I see you are using primed variables, which is perfectly fine, just recalling the prime in this context does not mean derivative.

 

Here is the first adjustment: you use the assignment operator :=, but on the left you put functionality: in doing so, you create a function, as you see in the output of your post, but after that, you only use the primed variables as symbols, not as functions, so your definition is not used (this is not related to Physics, but to how computer algebra systems work).

 

I am then removing the functionality on the lhs so that the primed variables have the value you indicated

diff(x, x) := r*sin(theta)*cos(phi)

r*sin(theta)*cos(phi)

(3)

diff(y(x), x) := r*sin(theta)*sin(phi)

r*sin(theta)*sin(phi)

(4)

diff(z(x), x) := r*cos(theta)

r*cos(theta)

(5)

Define(R[a] = [(diff(x, x))/r, (diff(y(x), x))/r, (diff(z(x), x))/r])

{Physics:-Dgamma[mu], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(6)

You see how the value is now taken into account:

R[definition]

R[a] = [sin(theta)*cos(phi), sin(theta)*sin(phi), cos(theta)]

(7)

Next you assigned to a sum, I imagine to want automatic simplification ... it is not how it works: if you want the following simplification you need to invoke it. I am changing that := by  = and show

(diff(x, x))^2+(diff(y(x), x))^2+(diff(z(x), x))^2 = r^2

r^2*sin(theta)^2*cos(phi)^2+r^2*sin(theta)^2*sin(phi)^2+r^2*cos(theta)^2 = r^2

(8)

simplify(r^2*sin(theta)^2*cos(phi)^2+r^2*sin(theta)^2*sin(phi)^2+r^2*cos(theta)^2 = r^2)

r^2 = r^2

(9)

Next you use X[1], not wrong but perhaps more clear: you could have used its value

X[1]

r

(10)

"Define(A[mu,~a] =(1-`f__A`(X[1]) )/(g*X[1])*LeviCivita[a, mu,j,4]* R[j] )  "

{A[mu, `~a`], Physics:-Dgamma[mu], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(11)

A[definition]

A[mu, `~a`] = (1-f__A(r))*Physics:-LeviCivita[4, a, j, mu]*R[j]/(g*r)

(12)

Here again you see the value of the primed variables, not themselves

A[]

A[mu, a] = Matrix(%id = 36893488158540457972)

(13)

Define(F[mu, nu, a] = d_[nu](A[mu, a])-d_[mu](A[nu, a])+LeviCivita[a, b, c, 4]*A[mu, b]*A[nu, c])

{A[mu, `~a`], Physics:-Dgamma[mu], F[mu, nu, a], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(14)

F[definition]

F[mu, nu, a] = Physics:-d_[nu](A[mu, a], [X])-Physics:-d_[mu](A[nu, a], [X])-Physics:-LeviCivita[4, a, b, c]*A[mu, b]*A[nu, c]

(15)

Again, the output involves the value of the primed variables

simplify(F[])

F[mu, nu, a] = _rtable[36893488153612237268]

(16)

Now the Sum over all the repeated indices

"`L__FST` := simplify(-1/(4)SumOverRepeatedIndices(F[mu,nu,a]  F[~mu,~nu,a])  )"

(1/2)*(g^2*r^2*(sin(theta)^2*cos(phi)^2+1)*(diff(f__A(r), r))^2+2*g^2*r*(-1+f__A(r))*(sin(theta)*sin(phi)*cos(theta)*cos(phi)*r-sin(theta)^2*cos(phi)^2-1)*(diff(f__A(r), r))-(-1+f__A(r))^2*(1+f__A(r)^2-2*f__A(r)+g^2*(r^2*cos(theta)^2-sin(theta)^2)*cos(phi)^2+2*sin(theta)*sin(phi)*cos(theta)*cos(phi)*g^2*r+(-2*r^2-1)*g^2))/(g^4*r^4)

(17)

Is this a scalar? Yes, in the sense that there are no tensors around. Is this the result you were expecting? I don't know, it would help if you type in the result you were expecting.

 

Also, you see that (17) above depends on theta and phi. You can determine the conditions on f__A(r) such that L__FST depends only on r by differentiating

simplify(diff(L__FST, theta))

(1/2)*(cos(phi)*((diff(f__A(r), r))^2*r^2-2*r*(-1+f__A(r))*(diff(f__A(r), r))+(-1+f__A(r))^2*(r^2+1))*sin(2*theta)+2*cos(2*theta)*r*sin(phi)*(-1+f__A(r))*(1-f__A(r)+r*(diff(f__A(r), r))))*cos(phi)/(r^4*g^2)

(18)

simplify(diff(L__FST, phi))

-(sin(theta)*sin(phi)*r*(diff(f__A(r), r))-(-1+f__A(r))*(r*cos(phi)*cos(theta)+sin(theta)*sin(phi)))*(sin(theta)*cos(phi)*(diff(f__A(r), r))*r+(-1+f__A(r))*(cos(theta)*r*sin(phi)-sin(theta)*cos(phi)))/(r^4*g^2)

(19)

 

Any f__A(r) that cancels both equations result in L__FST depending only on r.


Alternatively, you can compute the same but keeping the primed variables around till the last step, as follows

 

restart

with(Physics)

with(Vectors)``

Setup(spacetimeindices = greek, su2indices = lowercaselatin, signature = `+++-`, coordinates = spherical)

[coordinatesystems = {X}, signature = `+ + + -`, spacetimeindices = greek, su2indices = lowercaselatin]

(20)

Setup(realobjects = {g, diff(x, x), diff(y(x), x), diff(z(x), x), f__A(X[1])})

[realobjects = {g, phi, r, rho, theta, x, `x'`, y, `y'`, z, `z'`, f__A(r)}]

(21)

So do not assign the primed variables. Instead, create a set of substitution equations (i.e. use =, not :=) to be used only when you want

"x'(r, theta, phi)  = r * sin(theta) * cos(phi)"

`x'`(r, theta, phi) = r*sin(theta)*cos(phi)

(22)

"y'(r, theta, phi) = r * sin(theta) * sin(phi)"

`y'`(r, theta, phi) = r*sin(theta)*sin(phi)

(23)

"z'(r, theta, phi)  =r * cos(theta)"

`z'`(r, theta, phi) = r*cos(theta)

(24)

xyz := [`x'`(r, theta, phi) = r*sin(theta)*cos(phi), `y'`(r, theta, phi) = r*sin(theta)*sin(phi), `z'`(r, theta, phi) = r*cos(theta)]

[`x'`(r, theta, phi) = r*sin(theta)*cos(phi), `y'`(r, theta, phi) = r*sin(theta)*sin(phi), `z'`(r, theta, phi) = r*cos(theta)]

(25)

 

CompactDisplay(xyz)

`z'`(r, theta, phi)*`will now be displayed as`*`z'`

(26)

Proceed now using the primed variables themselves instead of their expression in terms of spherical coordinates

"Define(R[a] = [(x'(r,theta,phi))/(r),(y'(r,theta,phi))/(r),(z'(r,theta,phi))/(r)])"

{Physics:-Dgamma[mu], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(27)

You see now the definition in terms of the primed variables

R[definition]

R[a] = [`x'`(r, theta, phi)/r, `y'`(r, theta, phi)/r, `z'`(r, theta, phi)/r]

(28)

which all depend on the spherical coordinates

show

R[a] = [`x'`(r, theta, phi)/r, `y'`(r, theta, phi)/r, `z'`(r, theta, phi)/r]

(29)

Next, the following is an identity, I will assign it here to some name, eq, in order to use it for simplification purposes later

"eq :=  x'(r,theta,phi)^(2)+y'(r,theta,phi)^(2)+z'(r,theta,phi)^(2) =r^(2) "

`x'`(r, theta, phi)^2+`y'`(r, theta, phi)^2+`z'`(r, theta, phi)^2 = r^2

(30)

subs(xyz, eq)

r^2*sin(theta)^2*cos(phi)^2+r^2*sin(theta)^2*sin(phi)^2+r^2*cos(theta)^2 = r^2

(31)

simplify(r^2*sin(theta)^2*cos(phi)^2+r^2*sin(theta)^2*sin(phi)^2+r^2*cos(theta)^2 = r^2)

r^2 = r^2

(32)

Define now A

Define(A[mu, a] = (1-f__A(X[1]))*LeviCivita[a, mu, j, 4]*R[j]/(g*X[1]))

{A[mu, a], Physics:-Dgamma[mu], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(33)

A[definition]

A[mu, a] = (1-f__A(r))*Physics:-LeviCivita[4, a, j, mu]*R[j]/(g*r)

(34)

Here again you see the primed variables themselves, not their value

A[]

A[mu, a] = Matrix(%id = 36893488158429633340)

(35)

All primed ones are functions of the spherical coordinates:

show

A[mu, a] = Matrix(%id = 36893488158429633340)

(36)

Define now your F

Define(F[mu, nu, a] = d_[nu](A[mu, a])-d_[mu](A[nu, a])+LeviCivita[a, b, c, 4]*A[mu, b]*A[nu, c])

{A[mu, a], Physics:-Dgamma[mu], F[mu, nu, a], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(37)

F[definition]

F[mu, nu, a] = Physics:-d_[nu](A[mu, a], [X])-Physics:-d_[mu](A[nu, a], [X])-Physics:-LeviCivita[4, a, b, c]*A[mu, b]*A[nu, c]

(38)

Again, the output involves the primed variables, and their derivatives, denoted with an index

simplify(F[])

F[mu, nu, a] = _rtable[36893488152118081044]

(39)

Now the Sum over all the repeated indices

" -1/(4)SumOverRepeatedIndices(F[mu,nu,a] F[~mu,~nu,a]) "

-(1/2)*(-2*f__A(r)^2*(diff(`x'`(r, theta, phi), r))*(diff(`y'`(r, theta, phi), theta))*g^2*r^4-2*f__A(r)^2*(diff(`x'`(r, theta, phi), r))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4-2*f__A(r)^2*(diff(`y'`(r, theta, phi), theta))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4+4*f__A(r)^2*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*g^2*r^3+4*f__A(r)^2*`z'`(r, theta, phi)*(diff(`z'`(r, theta, phi), r))*g^2*r^3+8*f__A(r)^2*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^3+4*f__A(r)^2*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^3+4*f__A(r)^2*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^3+4*f__A(r)*`y'`(r, theta, phi)^2*(diff(f__A(r), r))*g^2*r^3+4*f__A(r)*`z'`(r, theta, phi)^2*(diff(f__A(r), r))*g^2*r^3+8*f__A(r)*(diff(f__A(r), r))*`x'`(r, theta, phi)^2*g^2*r^3+4*f__A(r)*(diff(`x'`(r, theta, phi), r))*(diff(`y'`(r, theta, phi), theta))*g^2*r^4+4*f__A(r)*(diff(`x'`(r, theta, phi), r))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4+4*f__A(r)*(diff(`y'`(r, theta, phi), theta))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4+2*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*(diff(f__A(r), r))*g^2*r^4+2*`z'`(r, theta, phi)*(diff(f__A(r), r))*(diff(`z'`(r, theta, phi), r))*g^2*r^4+4*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^4+2*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^4+2*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^4-8*f__A(r)*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*g^2*r^3-8*f__A(r)*`z'`(r, theta, phi)*(diff(`z'`(r, theta, phi), r))*g^2*r^3-16*f__A(r)*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^3-8*f__A(r)*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^3-8*f__A(r)*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^3-2*f__A(r)*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*(diff(f__A(r), r))*g^2*r^4-2*f__A(r)*`z'`(r, theta, phi)*(diff(f__A(r), r))*(diff(`z'`(r, theta, phi), r))*g^2*r^4-4*f__A(r)*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^4-2*f__A(r)*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^4-2*f__A(r)*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^4-f__A(r)^2*(diff(`z'`(r, theta, phi), theta))^2*g^2*r^4-f__A(r)^2*(diff(`x'`(r, theta, phi), phi))^2*g^2*r^4-f__A(r)^2*(diff(`y'`(r, theta, phi), r))^2*g^2*r^4-2*f__A(r)^2*(diff(`x'`(r, theta, phi), r))^2*g^2*r^4-2*f__A(r)^2*(diff(`y'`(r, theta, phi), theta))^2*g^2*r^4-f__A(r)^2*(diff(`x'`(r, theta, phi), theta))^2*g^2*r^4-f__A(r)^2*(diff(`y'`(r, theta, phi), phi))^2*g^2*r^4-2*f__A(r)^2*(diff(`z'`(r, theta, phi), phi))^2*g^2*r^4-f__A(r)^2*(diff(`z'`(r, theta, phi), r))^2*g^2*r^4-`y'`(r, theta, phi)^2*(diff(f__A(r), r))^2*g^2*r^4-`z'`(r, theta, phi)^2*(diff(f__A(r), r))^2*g^2*r^4-2*(diff(f__A(r), r))^2*`x'`(r, theta, phi)^2*g^2*r^4+2*f__A(r)*(diff(`z'`(r, theta, phi), theta))^2*g^2*r^4+2*f__A(r)*(diff(`x'`(r, theta, phi), phi))^2*g^2*r^4+2*f__A(r)*(diff(`y'`(r, theta, phi), r))^2*g^2*r^4+4*f__A(r)*(diff(`x'`(r, theta, phi), r))^2*g^2*r^4+4*f__A(r)*(diff(`y'`(r, theta, phi), theta))^2*g^2*r^4+2*f__A(r)*(diff(`x'`(r, theta, phi), theta))^2*g^2*r^4+2*f__A(r)*(diff(`y'`(r, theta, phi), phi))^2*g^2*r^4+4*f__A(r)*(diff(`z'`(r, theta, phi), phi))^2*g^2*r^4+2*f__A(r)*(diff(`z'`(r, theta, phi), r))^2*g^2*r^4-4*f__A(r)^2*`y'`(r, theta, phi)^2*g^2*r^2-4*f__A(r)^2*`z'`(r, theta, phi)^2*g^2*r^2-8*f__A(r)^2*`x'`(r, theta, phi)^2*g^2*r^2-4*`y'`(r, theta, phi)^2*(diff(f__A(r), r))*g^2*r^3-4*`z'`(r, theta, phi)^2*(diff(f__A(r), r))*g^2*r^3-8*(diff(f__A(r), r))*`x'`(r, theta, phi)^2*g^2*r^3-2*(diff(`x'`(r, theta, phi), r))*(diff(`y'`(r, theta, phi), theta))*g^2*r^4-2*(diff(`x'`(r, theta, phi), r))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4-2*(diff(`y'`(r, theta, phi), theta))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4+8*f__A(r)*`y'`(r, theta, phi)^2*g^2*r^2+8*f__A(r)*`z'`(r, theta, phi)^2*g^2*r^2+16*f__A(r)*`x'`(r, theta, phi)^2*g^2*r^2+4*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*g^2*r^3+4*`z'`(r, theta, phi)*(diff(`z'`(r, theta, phi), r))*g^2*r^3+8*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^3+4*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^3+4*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^3+2*f__A(r)^4*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2+2*f__A(r)^4*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+2*f__A(r)^4*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-(diff(`z'`(r, theta, phi), theta))^2*g^2*r^4-(diff(`x'`(r, theta, phi), phi))^2*g^2*r^4-(diff(`y'`(r, theta, phi), r))^2*g^2*r^4-2*(diff(`x'`(r, theta, phi), r))^2*g^2*r^4-2*(diff(`y'`(r, theta, phi), theta))^2*g^2*r^4-(diff(`x'`(r, theta, phi), theta))^2*g^2*r^4-(diff(`y'`(r, theta, phi), phi))^2*g^2*r^4-2*(diff(`z'`(r, theta, phi), phi))^2*g^2*r^4-(diff(`z'`(r, theta, phi), r))^2*g^2*r^4-8*f__A(r)^3*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2-8*f__A(r)^3*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-8*f__A(r)^3*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+12*f__A(r)^2*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2+12*f__A(r)^2*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+12*f__A(r)^2*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-4*`y'`(r, theta, phi)^2*g^2*r^2-4*`z'`(r, theta, phi)^2*g^2*r^2-8*`x'`(r, theta, phi)^2*g^2*r^2-8*f__A(r)*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2-8*f__A(r)*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-8*f__A(r)*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+f__A(r)^4*`y'`(r, theta, phi)^4+f__A(r)^4*`z'`(r, theta, phi)^4+f__A(r)^4*`x'`(r, theta, phi)^4-4*f__A(r)^3*`y'`(r, theta, phi)^4-4*f__A(r)^3*`z'`(r, theta, phi)^4-4*f__A(r)^3*`x'`(r, theta, phi)^4+6*f__A(r)^2*`y'`(r, theta, phi)^4+6*f__A(r)^2*`z'`(r, theta, phi)^4+6*f__A(r)^2*`x'`(r, theta, phi)^4-4*f__A(r)*`y'`(r, theta, phi)^4-4*f__A(r)*`z'`(r, theta, phi)^4-4*f__A(r)*`x'`(r, theta, phi)^4+2*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2+2*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+2*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+`y'`(r, theta, phi)^4+`z'`(r, theta, phi)^4+`x'`(r, theta, phi)^4)/(r^8*g^4)

(40)

Simplify the above taking into account eq

eq

`x'`(r, theta, phi)^2+`y'`(r, theta, phi)^2+`z'`(r, theta, phi)^2 = r^2

(41)

simplify(-(1/2)*(-f__A(r)^2*(diff(`z'`(r, theta, phi), theta))^2*g^2*r^4-f__A(r)^2*(diff(`x'`(r, theta, phi), phi))^2*g^2*r^4-f__A(r)^2*(diff(`y'`(r, theta, phi), r))^2*g^2*r^4-f__A(r)^2*(diff(`x'`(r, theta, phi), theta))^2*g^2*r^4-f__A(r)^2*(diff(`y'`(r, theta, phi), phi))^2*g^2*r^4-f__A(r)^2*(diff(`z'`(r, theta, phi), r))^2*g^2*r^4-`y'`(r, theta, phi)^2*(diff(f__A(r), r))^2*g^2*r^4-`z'`(r, theta, phi)^2*(diff(f__A(r), r))^2*g^2*r^4-2*f__A(r)^2*(diff(`x'`(r, theta, phi), r))^2*g^2*r^4-2*f__A(r)^2*(diff(`y'`(r, theta, phi), theta))^2*g^2*r^4-2*f__A(r)^2*(diff(`z'`(r, theta, phi), phi))^2*g^2*r^4-2*(diff(f__A(r), r))^2*`x'`(r, theta, phi)^2*g^2*r^4+2*f__A(r)*(diff(`z'`(r, theta, phi), theta))^2*g^2*r^4+2*f__A(r)*(diff(`x'`(r, theta, phi), phi))^2*g^2*r^4+2*f__A(r)*(diff(`y'`(r, theta, phi), r))^2*g^2*r^4+4*f__A(r)*(diff(`x'`(r, theta, phi), r))^2*g^2*r^4+4*f__A(r)*(diff(`y'`(r, theta, phi), theta))^2*g^2*r^4+2*f__A(r)*(diff(`x'`(r, theta, phi), theta))^2*g^2*r^4+2*f__A(r)*(diff(`y'`(r, theta, phi), phi))^2*g^2*r^4+4*f__A(r)*(diff(`z'`(r, theta, phi), phi))^2*g^2*r^4+2*f__A(r)*(diff(`z'`(r, theta, phi), r))^2*g^2*r^4-4*f__A(r)^2*`y'`(r, theta, phi)^2*g^2*r^2-4*f__A(r)^2*`z'`(r, theta, phi)^2*g^2*r^2-8*f__A(r)^2*`x'`(r, theta, phi)^2*g^2*r^2-4*`y'`(r, theta, phi)^2*(diff(f__A(r), r))*g^2*r^3-4*`z'`(r, theta, phi)^2*(diff(f__A(r), r))*g^2*r^3-8*(diff(f__A(r), r))*`x'`(r, theta, phi)^2*g^2*r^3-2*(diff(`x'`(r, theta, phi), r))*(diff(`y'`(r, theta, phi), theta))*g^2*r^4-2*(diff(`x'`(r, theta, phi), r))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4-2*(diff(`y'`(r, theta, phi), theta))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4+8*f__A(r)*`y'`(r, theta, phi)^2*g^2*r^2+8*f__A(r)*`z'`(r, theta, phi)^2*g^2*r^2+16*f__A(r)*`x'`(r, theta, phi)^2*g^2*r^2+4*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*g^2*r^3+4*`z'`(r, theta, phi)*(diff(`z'`(r, theta, phi), r))*g^2*r^3+8*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^3+4*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^3+4*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^3+f__A(r)^4*`y'`(r, theta, phi)^4+f__A(r)^4*`z'`(r, theta, phi)^4+f__A(r)^4*`x'`(r, theta, phi)^4-4*f__A(r)^3*`y'`(r, theta, phi)^4-4*f__A(r)^3*`z'`(r, theta, phi)^4-4*f__A(r)^3*`x'`(r, theta, phi)^4+6*f__A(r)^2*`y'`(r, theta, phi)^4+6*f__A(r)^2*`z'`(r, theta, phi)^4+6*f__A(r)^2*`x'`(r, theta, phi)^4-4*f__A(r)*`y'`(r, theta, phi)^4-4*f__A(r)*`z'`(r, theta, phi)^4-4*f__A(r)*`x'`(r, theta, phi)^4+2*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2+2*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+2*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-(diff(`z'`(r, theta, phi), theta))^2*g^2*r^4-(diff(`x'`(r, theta, phi), phi))^2*g^2*r^4-(diff(`y'`(r, theta, phi), r))^2*g^2*r^4-(diff(`x'`(r, theta, phi), theta))^2*g^2*r^4-(diff(`y'`(r, theta, phi), phi))^2*g^2*r^4-(diff(`z'`(r, theta, phi), r))^2*g^2*r^4+2*f__A(r)^4*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2+2*f__A(r)^4*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+2*f__A(r)^4*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-2*(diff(`x'`(r, theta, phi), r))^2*g^2*r^4-2*(diff(`y'`(r, theta, phi), theta))^2*g^2*r^4-2*(diff(`z'`(r, theta, phi), phi))^2*g^2*r^4-8*f__A(r)^3*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2-8*f__A(r)^3*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-8*f__A(r)^3*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+12*f__A(r)^2*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2+12*f__A(r)^2*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2+12*f__A(r)^2*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-4*`y'`(r, theta, phi)^2*g^2*r^2-4*`z'`(r, theta, phi)^2*g^2*r^2-8*`x'`(r, theta, phi)^2*g^2*r^2-8*f__A(r)*`y'`(r, theta, phi)^2*`z'`(r, theta, phi)^2-8*f__A(r)*`y'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-8*f__A(r)*`z'`(r, theta, phi)^2*`x'`(r, theta, phi)^2-2*f__A(r)^2*(diff(`x'`(r, theta, phi), r))*(diff(`y'`(r, theta, phi), theta))*g^2*r^4-2*f__A(r)^2*(diff(`x'`(r, theta, phi), r))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4-2*f__A(r)^2*(diff(`y'`(r, theta, phi), theta))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4+4*f__A(r)^2*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*g^2*r^3+4*f__A(r)^2*`z'`(r, theta, phi)*(diff(`z'`(r, theta, phi), r))*g^2*r^3+8*f__A(r)^2*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^3+4*f__A(r)^2*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^3+4*f__A(r)^2*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^3+4*f__A(r)*`y'`(r, theta, phi)^2*(diff(f__A(r), r))*g^2*r^3+4*f__A(r)*`z'`(r, theta, phi)^2*(diff(f__A(r), r))*g^2*r^3+8*f__A(r)*(diff(f__A(r), r))*`x'`(r, theta, phi)^2*g^2*r^3+4*f__A(r)*(diff(`x'`(r, theta, phi), r))*(diff(`y'`(r, theta, phi), theta))*g^2*r^4+4*f__A(r)*(diff(`x'`(r, theta, phi), r))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4+4*f__A(r)*(diff(`y'`(r, theta, phi), theta))*(diff(`z'`(r, theta, phi), phi))*g^2*r^4+2*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*(diff(f__A(r), r))*g^2*r^4+2*`z'`(r, theta, phi)*(diff(f__A(r), r))*(diff(`z'`(r, theta, phi), r))*g^2*r^4+4*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^4+2*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^4+2*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^4-8*f__A(r)*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*g^2*r^3-8*f__A(r)*`z'`(r, theta, phi)*(diff(`z'`(r, theta, phi), r))*g^2*r^3-16*f__A(r)*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^3-8*f__A(r)*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^3-8*f__A(r)*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^3+`y'`(r, theta, phi)^4+`z'`(r, theta, phi)^4+`x'`(r, theta, phi)^4-2*f__A(r)*`y'`(r, theta, phi)*(diff(`y'`(r, theta, phi), r))*(diff(f__A(r), r))*g^2*r^4-2*f__A(r)*`z'`(r, theta, phi)*(diff(f__A(r), r))*(diff(`z'`(r, theta, phi), r))*g^2*r^4-4*f__A(r)*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`x'`(r, theta, phi), r))*g^2*r^4-2*f__A(r)*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`y'`(r, theta, phi), theta))*g^2*r^4-2*f__A(r)*(diff(f__A(r), r))*`x'`(r, theta, phi)*(diff(`z'`(r, theta, phi), phi))*g^2*r^4)/(r^8*g^4), {eq})

(1/2)*(2*g^2*r^2*(-1+f__A(r))^2*(diff(`y'`(r, theta, phi), theta))^2+2*g^2*(r*(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))+(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r+`x'`(r, theta, phi)*(r*(diff(f__A(r), r))-2*f__A(r)+2))*r*(-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))+2*g^2*r^2*(-1+f__A(r))^2*(diff(`z'`(r, theta, phi), phi))^2+2*((-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r+`x'`(r, theta, phi)*(r*(diff(f__A(r), r))-2*f__A(r)+2))*g^2*r*(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))+2*g^2*r^2*(-1+f__A(r))^2*(diff(`x'`(r, theta, phi), r))^2+4*g^2*r*`x'`(r, theta, phi)*(-1+f__A(r))*(r*(diff(f__A(r), r))-2*f__A(r)+2)*(diff(`x'`(r, theta, phi), r))+g^2*r^2*(-1+f__A(r))^2*(diff(`y'`(r, theta, phi), r))^2+2*g^2*r*`y'`(r, theta, phi)*(-1+f__A(r))*(r*(diff(f__A(r), r))-2*f__A(r)+2)*(diff(`y'`(r, theta, phi), r))+g^2*r^2*(-1+f__A(r))^2*(diff(`z'`(r, theta, phi), r))^2+2*g^2*r*`z'`(r, theta, phi)*(-1+f__A(r))*(r*(diff(f__A(r), r))-2*f__A(r)+2)*(diff(`z'`(r, theta, phi), r))+g^2*r^2*(-1+f__A(r))^2*(diff(`x'`(r, theta, phi), theta))^2+g^2*r^2*(-1+f__A(r))^2*(diff(`z'`(r, theta, phi), theta))^2+g^2*r^2*(-1+f__A(r))^2*(diff(`x'`(r, theta, phi), phi))^2+g^2*r^2*(-1+f__A(r))^2*(diff(`y'`(r, theta, phi), phi))^2+g^2*(r*(diff(f__A(r), r))-2*f__A(r)+2)^2*`x'`(r, theta, phi)^2+(g*r*(diff(f__A(r), r))-2*(-(1/2)*f__A(r)+g+1/2)*(-1+f__A(r)))*(g*r*(diff(f__A(r), r))-2*((1/2)*f__A(r)+g-1/2)*(-1+f__A(r)))*r^2)/(r^6*g^4)

(42)

Express now the primed variables as functions of the spherical coordinates

xyz

[`x'`(r, theta, phi) = r*sin(theta)*cos(phi), `y'`(r, theta, phi) = r*sin(theta)*sin(phi), `z'`(r, theta, phi) = r*cos(theta)]

(43)

So your L__FST now is given by

L__FST := simplify(eval((1/2)*(2*g^2*r^2*(-1+f__A(r))^2*(diff(`y'`(r, theta, phi), theta))^2+2*g^2*(r*(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))+(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r+`x'`(r, theta, phi)*(r*(diff(f__A(r), r))-2*f__A(r)+2))*r*(-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))+2*g^2*r^2*(-1+f__A(r))^2*(diff(`z'`(r, theta, phi), phi))^2+2*((-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r+`x'`(r, theta, phi)*(r*(diff(f__A(r), r))-2*f__A(r)+2))*g^2*r*(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))+2*g^2*r^2*(-1+f__A(r))^2*(diff(`x'`(r, theta, phi), r))^2+4*g^2*r*`x'`(r, theta, phi)*(-1+f__A(r))*(r*(diff(f__A(r), r))-2*f__A(r)+2)*(diff(`x'`(r, theta, phi), r))+g^2*r^2*(-1+f__A(r))^2*(diff(`y'`(r, theta, phi), r))^2+2*g^2*r*`y'`(r, theta, phi)*(-1+f__A(r))*(r*(diff(f__A(r), r))-2*f__A(r)+2)*(diff(`y'`(r, theta, phi), r))+g^2*r^2*(-1+f__A(r))^2*(diff(`z'`(r, theta, phi), r))^2+2*g^2*r*`z'`(r, theta, phi)*(-1+f__A(r))*(r*(diff(f__A(r), r))-2*f__A(r)+2)*(diff(`z'`(r, theta, phi), r))+g^2*r^2*(-1+f__A(r))^2*(diff(`x'`(r, theta, phi), theta))^2+g^2*r^2*(-1+f__A(r))^2*(diff(`z'`(r, theta, phi), theta))^2+g^2*r^2*(-1+f__A(r))^2*(diff(`x'`(r, theta, phi), phi))^2+g^2*r^2*(-1+f__A(r))^2*(diff(`y'`(r, theta, phi), phi))^2+g^2*(r*(diff(f__A(r), r))-2*f__A(r)+2)^2*`x'`(r, theta, phi)^2+(g*r*(diff(f__A(r), r))-2*(-(1/2)*f__A(r)+g+1/2)*(-1+f__A(r)))*(g*r*(diff(f__A(r), r))-2*((1/2)*f__A(r)+g-1/2)*(-1+f__A(r)))*r^2)/(r^6*g^4), xyz))

(1/2)*(g^2*r^2*(sin(theta)^2*cos(phi)^2+1)*(diff(f__A(r), r))^2+2*g^2*r*(-1+f__A(r))*(r*sin(theta)*cos(phi)*cos(theta)*sin(phi)-sin(theta)^2*cos(phi)^2-1)*(diff(f__A(r), r))-(1+f__A(r)^2-2*f__A(r)+g^2*(r^2*cos(theta)^2-sin(theta)^2)*cos(phi)^2+2*g^2*r*sin(theta)*cos(phi)*cos(theta)*sin(phi)+(-2*r^2-1)*g^2)*(-1+f__A(r))^2)/(r^4*g^4)

(44)

This is the same result obtained following the previous approach, where L__FST = (1/2)*(g^2*r^2*(sin(theta)^2*cos(phi)^2+1)*(diff(f__A(r), r))^2+2*g^2*r*(-1+f__A(r))*(sin(theta)*sin(phi)*cos(theta)*cos(phi)*r-sin(theta)^2*cos(phi)^2-1)*(diff(f__A(r), r))-(-1+f__A(r))^2*(1+f__A(r)^2-2*f__A(r)+g^2*(r^2*cos(theta)^2-sin(theta)^2)*cos(phi)^2+2*sin(theta)*sin(phi)*cos(theta)*cos(phi)*g^2*r+(-2*r^2-1)*g^2))/(g^4*r^4)

(1/2)*(g^2*r^2*(sin(theta)^2*cos(phi)^2+1)*(diff(f__A(r), r))^2+2*g^2*r*(-1+f__A(r))*(sin(theta)*sin(phi)*cos(theta)*cos(phi)*r-sin(theta)^2*cos(phi)^2-1)*(diff(f__A(r), r))-(-1+f__A(r))^2*(1+f__A(r)^2-2*f__A(r)+g^2*(r^2*cos(theta)^2-sin(theta)^2)*cos(phi)^2+2*sin(theta)*sin(phi)*cos(theta)*cos(phi)*g^2*r+(-2*r^2-1)*g^2))/(g^4*r^4)

(1/2)*(g^2*r^2*(sin(theta)^2*cos(phi)^2+1)*(diff(f__A(r), r))^2+2*g^2*r*(-1+f__A(r))*(r*sin(theta)*cos(phi)*cos(theta)*sin(phi)-sin(theta)^2*cos(phi)^2-1)*(diff(f__A(r), r))-(1+f__A(r)^2-2*f__A(r)+g^2*(r^2*cos(theta)^2-sin(theta)^2)*cos(phi)^2+2*g^2*r*sin(theta)*cos(phi)*cos(theta)*sin(phi)+(-2*r^2-1)*g^2)*(-1+f__A(r))^2)/(r^4*g^4)

(45)

simplify(L__FST-(1/2)*(g^2*r^2*(sin(theta)^2*cos(phi)^2+1)*(diff(f__A(r), r))^2+2*g^2*r*(-1+f__A(r))*(sin(theta)*sin(phi)*cos(theta)*cos(phi)*r-sin(theta)^2*cos(phi)^2-1)*(diff(f__A(r), r))-(-1+f__A(r))^2*(1+f__A(r)^2-2*f__A(r)+g^2*(r^2*cos(theta)^2-sin(theta)^2)*cos(phi)^2+2*sin(theta)*sin(phi)*cos(theta)*cos(phi)*g^2*r+(-2*r^2-1)*g^2))/(g^4*r^4))

0

(46)

A last verification, also resulting in the same: compute with everything inert, to revise by eye each step. This is the Lagrangian

"`L__FST` := -1/(4)SumOverRepeatedIndices(`%F`[mu,nu,a] `%F`[~mu,~nu,a]) "

-(1/4)*%F[1, 3, 1]*%F[`~1`, `~3`, 1]-(1/4)*%F[1, 3, 2]*%F[`~1`, `~3`, 2]-(1/4)*%F[1, 3, 3]*%F[`~1`, `~3`, 3]-(1/4)*%F[2, 3, 1]*%F[`~2`, `~3`, 1]-(1/4)*%F[2, 3, 2]*%F[`~2`, `~3`, 2]-(1/4)*%F[2, 3, 3]*%F[`~2`, `~3`, 3]-(1/4)*%F[3, 3, 1]*%F[`~3`, `~3`, 1]-(1/4)*%F[3, 3, 2]*%F[`~3`, `~3`, 2]-(1/4)*%F[3, 3, 3]*%F[`~3`, `~3`, 3]-(1/4)*%F[4, 3, 1]*%F[`~4`, `~3`, 1]-(1/4)*%F[4, 3, 2]*%F[`~4`, `~3`, 2]-(1/4)*%F[4, 3, 3]*%F[`~4`, `~3`, 3]-(1/4)*%F[1, 4, 1]*%F[`~1`, `~4`, 1]-(1/4)*%F[1, 4, 2]*%F[`~1`, `~4`, 2]-(1/4)*%F[1, 4, 3]*%F[`~1`, `~4`, 3]-(1/4)*%F[2, 4, 1]*%F[`~2`, `~4`, 1]-(1/4)*%F[2, 4, 2]*%F[`~2`, `~4`, 2]-(1/4)*%F[2, 4, 3]*%F[`~2`, `~4`, 3]-(1/4)*%F[3, 4, 1]*%F[`~3`, `~4`, 1]-(1/4)*%F[3, 4, 2]*%F[`~3`, `~4`, 2]-(1/4)*%F[3, 4, 3]*%F[`~3`, `~4`, 3]-(1/4)*%F[4, 4, 1]*%F[`~4`, `~4`, 1]-(1/4)*%F[4, 4, 2]*%F[`~4`, `~4`, 2]-(1/4)*%F[4, 4, 3]*%F[`~4`, `~4`, 3]-(1/4)*%F[1, 1, 1]*%F[`~1`, `~1`, 1]-(1/4)*%F[1, 1, 2]*%F[`~1`, `~1`, 2]-(1/4)*%F[1, 1, 3]*%F[`~1`, `~1`, 3]-(1/4)*%F[2, 1, 1]*%F[`~2`, `~1`, 1]-(1/4)*%F[2, 1, 2]*%F[`~2`, `~1`, 2]-(1/4)*%F[2, 1, 3]*%F[`~2`, `~1`, 3]-(1/4)*%F[3, 1, 1]*%F[`~3`, `~1`, 1]-(1/4)*%F[3, 1, 2]*%F[`~3`, `~1`, 2]-(1/4)*%F[3, 1, 3]*%F[`~3`, `~1`, 3]-(1/4)*%F[4, 1, 1]*%F[`~4`, `~1`, 1]-(1/4)*%F[4, 1, 2]*%F[`~4`, `~1`, 2]-(1/4)*%F[4, 1, 3]*%F[`~4`, `~1`, 3]-(1/4)*%F[1, 2, 1]*%F[`~1`, `~2`, 1]-(1/4)*%F[1, 2, 2]*%F[`~1`, `~2`, 2]-(1/4)*%F[1, 2, 3]*%F[`~1`, `~2`, 3]-(1/4)*%F[2, 2, 1]*%F[`~2`, `~2`, 1]-(1/4)*%F[2, 2, 2]*%F[`~2`, `~2`, 2]-(1/4)*%F[2, 2, 3]*%F[`~2`, `~2`, 3]-(1/4)*%F[3, 2, 1]*%F[`~3`, `~2`, 1]-(1/4)*%F[3, 2, 2]*%F[`~3`, `~2`, 2]-(1/4)*%F[3, 2, 3]*%F[`~3`, `~2`, 3]-(1/4)*%F[4, 2, 1]*%F[`~4`, `~2`, 1]-(1/4)*%F[4, 2, 2]*%F[`~4`, `~2`, 2]-(1/4)*%F[4, 2, 3]*%F[`~4`, `~2`, 3]

(47)

You see that the su2 indices, last index in F, run from 1 to 3 only

map2(op, -1, indets(-(1/4)*%F[1, 3, 1]*%F[`~1`, `~3`, 1]-(1/4)*%F[1, 3, 2]*%F[`~1`, `~3`, 2]-(1/4)*%F[1, 3, 3]*%F[`~1`, `~3`, 3]-(1/4)*%F[2, 3, 1]*%F[`~2`, `~3`, 1]-(1/4)*%F[2, 3, 2]*%F[`~2`, `~3`, 2]-(1/4)*%F[2, 3, 3]*%F[`~2`, `~3`, 3]-(1/4)*%F[3, 3, 1]*%F[`~3`, `~3`, 1]-(1/4)*%F[3, 3, 2]*%F[`~3`, `~3`, 2]-(1/4)*%F[3, 3, 3]*%F[`~3`, `~3`, 3]-(1/4)*%F[4, 3, 1]*%F[`~4`, `~3`, 1]-(1/4)*%F[4, 3, 2]*%F[`~4`, `~3`, 2]-(1/4)*%F[4, 3, 3]*%F[`~4`, `~3`, 3]-(1/4)*%F[1, 4, 1]*%F[`~1`, `~4`, 1]-(1/4)*%F[1, 4, 2]*%F[`~1`, `~4`, 2]-(1/4)*%F[1, 4, 3]*%F[`~1`, `~4`, 3]-(1/4)*%F[2, 4, 1]*%F[`~2`, `~4`, 1]-(1/4)*%F[2, 4, 2]*%F[`~2`, `~4`, 2]-(1/4)*%F[2, 4, 3]*%F[`~2`, `~4`, 3]-(1/4)*%F[3, 4, 1]*%F[`~3`, `~4`, 1]-(1/4)*%F[3, 4, 2]*%F[`~3`, `~4`, 2]-(1/4)*%F[3, 4, 3]*%F[`~3`, `~4`, 3]-(1/4)*%F[4, 4, 1]*%F[`~4`, `~4`, 1]-(1/4)*%F[4, 4, 2]*%F[`~4`, `~4`, 2]-(1/4)*%F[4, 4, 3]*%F[`~4`, `~4`, 3]-(1/4)*%F[1, 1, 1]*%F[`~1`, `~1`, 1]-(1/4)*%F[1, 1, 2]*%F[`~1`, `~1`, 2]-(1/4)*%F[1, 1, 3]*%F[`~1`, `~1`, 3]-(1/4)*%F[2, 1, 1]*%F[`~2`, `~1`, 1]-(1/4)*%F[2, 1, 2]*%F[`~2`, `~1`, 2]-(1/4)*%F[2, 1, 3]*%F[`~2`, `~1`, 3]-(1/4)*%F[3, 1, 1]*%F[`~3`, `~1`, 1]-(1/4)*%F[3, 1, 2]*%F[`~3`, `~1`, 2]-(1/4)*%F[3, 1, 3]*%F[`~3`, `~1`, 3]-(1/4)*%F[4, 1, 1]*%F[`~4`, `~1`, 1]-(1/4)*%F[4, 1, 2]*%F[`~4`, `~1`, 2]-(1/4)*%F[4, 1, 3]*%F[`~4`, `~1`, 3]-(1/4)*%F[1, 2, 1]*%F[`~1`, `~2`, 1]-(1/4)*%F[1, 2, 2]*%F[`~1`, `~2`, 2]-(1/4)*%F[1, 2, 3]*%F[`~1`, `~2`, 3]-(1/4)*%F[2, 2, 1]*%F[`~2`, `~2`, 1]-(1/4)*%F[2, 2, 2]*%F[`~2`, `~2`, 2]-(1/4)*%F[2, 2, 3]*%F[`~2`, `~2`, 3]-(1/4)*%F[3, 2, 1]*%F[`~3`, `~2`, 1]-(1/4)*%F[3, 2, 2]*%F[`~3`, `~2`, 2]-(1/4)*%F[3, 2, 3]*%F[`~3`, `~2`, 3]-(1/4)*%F[4, 2, 1]*%F[`~4`, `~2`, 1]-(1/4)*%F[4, 2, 2]*%F[`~4`, `~2`, 2]-(1/4)*%F[4, 2, 3]*%F[`~4`, `~2`, 3], indexed))

{1, 2, 3}

(48)

Compute the value of each of these inert F

TensorArray(%F[mu, nu, a] = F[mu, nu, a], output = setofequations)

{%F[1, 1, 1] = 0, %F[1, 1, 2] = 0, %F[1, 1, 3] = 0, %F[1, 2, 1] = (((diff(f__A(r), r))*`z'`(r, theta, phi)*r-(1-f__A(r))*(diff(`z'`(r, theta, phi), r))*r+2*(1-f__A(r))*`z'`(r, theta, phi))*g*r+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[1, 2, 2] = ((-1+f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^4*g^2), %F[1, 2, 3] = ((1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(2*(-1+f__A(r))*`x'`(r, theta, phi)-(diff(f__A(r), r))*`x'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))/(r^4*g^2), %F[1, 3, 1] = ((2*(-1+f__A(r))*`y'`(r, theta, phi)-(diff(f__A(r), r))*`y'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`y'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[1, 3, 2] = ((-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+((diff(f__A(r), r))*`x'`(r, theta, phi)*r-(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r+2*(1-f__A(r))*`x'`(r, theta, phi))*g*r+(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))/(r^4*g^2), %F[1, 3, 3] = ((1-f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^4*g^2), %F[1, 4, 1] = 0, %F[1, 4, 2] = 0, %F[1, 4, 3] = 0, %F[2, 1, 1] = ((-(diff(f__A(r), r))*`z'`(r, theta, phi)*r+(1-f__A(r))*(diff(`z'`(r, theta, phi), r))*r-2*(1-f__A(r))*`z'`(r, theta, phi))*g*r-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[2, 1, 2] = (-(-1+f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^4*g^2), %F[2, 1, 3] = ((-2*(-1+f__A(r))*`x'`(r, theta, phi)+(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))/(r^4*g^2), %F[2, 2, 1] = 0, %F[2, 2, 2] = 0, %F[2, 2, 3] = 0, %F[2, 3, 1] = ((1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))/(r^4*g^2), %F[2, 3, 2] = (-(1-f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[2, 3, 3] = ((-1+f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[2, 4, 1] = 0, %F[2, 4, 2] = 0, %F[2, 4, 3] = 0, %F[3, 1, 1] = ((-2*(-1+f__A(r))*`y'`(r, theta, phi)+(diff(f__A(r), r))*`y'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`y'`(r, theta, phi), r))*r)*g*r+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[3, 1, 2] = ((-(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r-2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))/(r^4*g^2), %F[3, 1, 3] = (-(1-f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^4*g^2), %F[3, 2, 1] = ((-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))/(r^4*g^2), %F[3, 2, 2] = ((1-f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[3, 2, 3] = (-(-1+f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[3, 3, 1] = 0, %F[3, 3, 2] = 0, %F[3, 3, 3] = 0, %F[3, 4, 1] = 0, %F[3, 4, 2] = 0, %F[3, 4, 3] = 0, %F[4, 1, 1] = 0, %F[4, 1, 2] = 0, %F[4, 1, 3] = 0, %F[4, 2, 1] = 0, %F[4, 2, 2] = 0, %F[4, 2, 3] = 0, %F[4, 3, 1] = 0, %F[4, 3, 2] = 0, %F[4, 3, 3] = 0, %F[4, 4, 1] = 0, %F[4, 4, 2] = 0, %F[4, 4, 3] = 0}

(49)

Now for the contravariant ones

"TensorArray(`%F`[~mu,~nu,a] = F[~mu,~nu,a],output=setofequations) "

{%F[`~1`, `~1`, 1] = 0, %F[`~1`, `~1`, 2] = 0, %F[`~1`, `~1`, 3] = 0, %F[`~1`, `~2`, 1] = ((2*(-1+f__A(r))*`z'`(r, theta, phi)-(diff(f__A(r), r))*`z'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`z'`(r, theta, phi), r))*r)*g*r+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[`~1`, `~2`, 2] = ((1-f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^4*g^2), %F[`~1`, `~2`, 3] = ((-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+((diff(f__A(r), r))*`x'`(r, theta, phi)*r-(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r+2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))/(r^4*g^2), %F[`~1`, `~3`, 1] = (((diff(f__A(r), r))*`y'`(r, theta, phi)*r-(1-f__A(r))*(diff(`y'`(r, theta, phi), r))*r+2*(1-f__A(r))*`y'`(r, theta, phi))*g*r-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[`~1`, `~3`, 2] = ((1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(2*(-1+f__A(r))*`x'`(r, theta, phi)-(diff(f__A(r), r))*`x'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r+(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))/(r^4*g^2), %F[`~1`, `~3`, 3] = ((-1+f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^4*g^2), %F[`~1`, `~4`, 1] = 0, %F[`~1`, `~4`, 2] = 0, %F[`~1`, `~4`, 3] = 0, %F[`~2`, `~1`, 1] = ((-2*(-1+f__A(r))*`z'`(r, theta, phi)+(diff(f__A(r), r))*`z'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`z'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[`~2`, `~1`, 2] = (-(1-f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^4*g^2), %F[`~2`, `~1`, 3] = ((-(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r-2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))/(r^4*g^2), %F[`~2`, `~2`, 1] = 0, %F[`~2`, `~2`, 2] = 0, %F[`~2`, `~2`, 3] = 0, %F[`~2`, `~3`, 1] = ((-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))/(r^4*g^2), %F[`~2`, `~3`, 2] = (-(-1+f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[`~2`, `~3`, 3] = ((1-f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[`~2`, `~4`, 1] = 0, %F[`~2`, `~4`, 2] = 0, %F[`~2`, `~4`, 3] = 0, %F[`~3`, `~1`, 1] = ((-(diff(f__A(r), r))*`y'`(r, theta, phi)*r+(1-f__A(r))*(diff(`y'`(r, theta, phi), r))*r-2*(1-f__A(r))*`y'`(r, theta, phi))*g*r+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[`~3`, `~1`, 2] = ((-2*(-1+f__A(r))*`x'`(r, theta, phi)+(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))/(r^4*g^2), %F[`~3`, `~1`, 3] = (-(-1+f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^4*g^2), %F[`~3`, `~2`, 1] = ((1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))/(r^4*g^2), %F[`~3`, `~2`, 2] = ((-1+f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[`~3`, `~2`, 3] = (-(1-f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^4*g^2), %F[`~3`, `~3`, 1] = 0, %F[`~3`, `~3`, 2] = 0, %F[`~3`, `~3`, 3] = 0, %F[`~3`, `~4`, 1] = 0, %F[`~3`, `~4`, 2] = 0, %F[`~3`, `~4`, 3] = 0, %F[`~4`, `~1`, 1] = 0, %F[`~4`, `~1`, 2] = 0, %F[`~4`, `~1`, 3] = 0, %F[`~4`, `~2`, 1] = 0, %F[`~4`, `~2`, 2] = 0, %F[`~4`, `~2`, 3] = 0, %F[`~4`, `~3`, 1] = 0, %F[`~4`, `~3`, 2] = 0, %F[`~4`, `~3`, 3] = 0, %F[`~4`, `~4`, 1] = 0, %F[`~4`, `~4`, 2] = 0, %F[`~4`, `~4`, 3] = 0}

(50)

At this point, you have the Lagrangian in terms of inert F in (47), so that you can follow by eye that the computation is running as expected, and in (49),(50) you have the value of each inert F. So go ahead and de-inertize all F in (47)NULL

value(-(1/4)*%F[1, 3, 1]*%F[`~1`, `~3`, 1]-(1/4)*%F[1, 3, 2]*%F[`~1`, `~3`, 2]-(1/4)*%F[1, 3, 3]*%F[`~1`, `~3`, 3]-(1/4)*%F[2, 3, 1]*%F[`~2`, `~3`, 1]-(1/4)*%F[2, 3, 2]*%F[`~2`, `~3`, 2]-(1/4)*%F[2, 3, 3]*%F[`~2`, `~3`, 3]-(1/4)*%F[3, 3, 1]*%F[`~3`, `~3`, 1]-(1/4)*%F[3, 3, 2]*%F[`~3`, `~3`, 2]-(1/4)*%F[3, 3, 3]*%F[`~3`, `~3`, 3]-(1/4)*%F[4, 3, 1]*%F[`~4`, `~3`, 1]-(1/4)*%F[4, 3, 2]*%F[`~4`, `~3`, 2]-(1/4)*%F[4, 3, 3]*%F[`~4`, `~3`, 3]-(1/4)*%F[1, 4, 1]*%F[`~1`, `~4`, 1]-(1/4)*%F[1, 4, 2]*%F[`~1`, `~4`, 2]-(1/4)*%F[1, 4, 3]*%F[`~1`, `~4`, 3]-(1/4)*%F[2, 4, 1]*%F[`~2`, `~4`, 1]-(1/4)*%F[2, 4, 2]*%F[`~2`, `~4`, 2]-(1/4)*%F[2, 4, 3]*%F[`~2`, `~4`, 3]-(1/4)*%F[3, 4, 1]*%F[`~3`, `~4`, 1]-(1/4)*%F[3, 4, 2]*%F[`~3`, `~4`, 2]-(1/4)*%F[3, 4, 3]*%F[`~3`, `~4`, 3]-(1/4)*%F[4, 4, 1]*%F[`~4`, `~4`, 1]-(1/4)*%F[4, 4, 2]*%F[`~4`, `~4`, 2]-(1/4)*%F[4, 4, 3]*%F[`~4`, `~4`, 3]-(1/4)*%F[1, 1, 1]*%F[`~1`, `~1`, 1]-(1/4)*%F[1, 1, 2]*%F[`~1`, `~1`, 2]-(1/4)*%F[1, 1, 3]*%F[`~1`, `~1`, 3]-(1/4)*%F[2, 1, 1]*%F[`~2`, `~1`, 1]-(1/4)*%F[2, 1, 2]*%F[`~2`, `~1`, 2]-(1/4)*%F[2, 1, 3]*%F[`~2`, `~1`, 3]-(1/4)*%F[3, 1, 1]*%F[`~3`, `~1`, 1]-(1/4)*%F[3, 1, 2]*%F[`~3`, `~1`, 2]-(1/4)*%F[3, 1, 3]*%F[`~3`, `~1`, 3]-(1/4)*%F[4, 1, 1]*%F[`~4`, `~1`, 1]-(1/4)*%F[4, 1, 2]*%F[`~4`, `~1`, 2]-(1/4)*%F[4, 1, 3]*%F[`~4`, `~1`, 3]-(1/4)*%F[1, 2, 1]*%F[`~1`, `~2`, 1]-(1/4)*%F[1, 2, 2]*%F[`~1`, `~2`, 2]-(1/4)*%F[1, 2, 3]*%F[`~1`, `~2`, 3]-(1/4)*%F[2, 2, 1]*%F[`~2`, `~2`, 1]-(1/4)*%F[2, 2, 2]*%F[`~2`, `~2`, 2]-(1/4)*%F[2, 2, 3]*%F[`~2`, `~2`, 3]-(1/4)*%F[3, 2, 1]*%F[`~3`, `~2`, 1]-(1/4)*%F[3, 2, 2]*%F[`~3`, `~2`, 2]-(1/4)*%F[3, 2, 3]*%F[`~3`, `~2`, 3]-(1/4)*%F[4, 2, 1]*%F[`~4`, `~2`, 1]-(1/4)*%F[4, 2, 2]*%F[`~4`, `~2`, 2]-(1/4)*%F[4, 2, 3]*%F[`~4`, `~2`, 3])

-(1/4)*((2*(-1+f__A(r))*`y'`(r, theta, phi)-(diff(f__A(r), r))*`y'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`y'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))*(((diff(f__A(r), r))*`y'`(r, theta, phi)*r-(1-f__A(r))*(diff(`y'`(r, theta, phi), r))*r+2*(1-f__A(r))*`y'`(r, theta, phi))*g*r-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+((diff(f__A(r), r))*`x'`(r, theta, phi)*r-(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r+2*(1-f__A(r))*`x'`(r, theta, phi))*g*r+(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))*((1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(2*(-1+f__A(r))*`x'`(r, theta, phi)-(diff(f__A(r), r))*`x'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r+(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))/(r^8*g^4)-(1/4)*((1-f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))*((-1+f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^8*g^4)-(1/4)*((1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))*((-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))/(r^8*g^4)-(1/4)*(-(1-f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))*(-(-1+f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-1+f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))*((1-f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-(diff(f__A(r), r))*`z'`(r, theta, phi)*r+(1-f__A(r))*(diff(`z'`(r, theta, phi), r))*r-2*(1-f__A(r))*`z'`(r, theta, phi))*g*r-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))*((-2*(-1+f__A(r))*`z'`(r, theta, phi)+(diff(f__A(r), r))*`z'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`z'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*(-(-1+f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))*(-(1-f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-2*(-1+f__A(r))*`x'`(r, theta, phi)+(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))*((-(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r-2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))/(r^8*g^4)-(1/4)*((-2*(-1+f__A(r))*`y'`(r, theta, phi)+(diff(f__A(r), r))*`y'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`y'`(r, theta, phi), r))*r)*g*r+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))*((-(diff(f__A(r), r))*`y'`(r, theta, phi)*r+(1-f__A(r))*(diff(`y'`(r, theta, phi), r))*r-2*(1-f__A(r))*`y'`(r, theta, phi))*g*r+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r-2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))*((-2*(-1+f__A(r))*`x'`(r, theta, phi)+(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))/(r^8*g^4)-(1/4)*(-(1-f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))*(-(-1+f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^8*g^4)-(1/4)*(((diff(f__A(r), r))*`z'`(r, theta, phi)*r-(1-f__A(r))*(diff(`z'`(r, theta, phi), r))*r+2*(1-f__A(r))*`z'`(r, theta, phi))*g*r+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))*((2*(-1+f__A(r))*`z'`(r, theta, phi)-(diff(f__A(r), r))*`z'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`z'`(r, theta, phi), r))*r)*g*r+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-1+f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))*((1-f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^8*g^4)-(1/4)*((1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(2*(-1+f__A(r))*`x'`(r, theta, phi)-(diff(f__A(r), r))*`x'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))*((-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+((diff(f__A(r), r))*`x'`(r, theta, phi)*r-(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r+2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))/(r^8*g^4)-(1/4)*((-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))*((1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))/(r^8*g^4)-(1/4)*((1-f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))*((-1+f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*(-(-1+f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))*(-(1-f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)

(51)

Introduce the value of the primed variables in terms of spherical coordinates to get your L__FST

L__FST := simplify(eval(-(1/4)*((2*(-1+f__A(r))*`y'`(r, theta, phi)-(diff(f__A(r), r))*`y'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`y'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))*(((diff(f__A(r), r))*`y'`(r, theta, phi)*r-(1-f__A(r))*(diff(`y'`(r, theta, phi), r))*r+2*(1-f__A(r))*`y'`(r, theta, phi))*g*r-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+((diff(f__A(r), r))*`x'`(r, theta, phi)*r-(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r+2*(1-f__A(r))*`x'`(r, theta, phi))*g*r+(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))*((1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(2*(-1+f__A(r))*`x'`(r, theta, phi)-(diff(f__A(r), r))*`x'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r+(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))/(r^8*g^4)-(1/4)*((1-f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))*((-1+f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^8*g^4)-(1/4)*((1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))*((-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))/(r^8*g^4)-(1/4)*(-(1-f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))*(-(-1+f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-1+f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))*((1-f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-(diff(f__A(r), r))*`z'`(r, theta, phi)*r+(1-f__A(r))*(diff(`z'`(r, theta, phi), r))*r-2*(1-f__A(r))*`z'`(r, theta, phi))*g*r-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))*((-2*(-1+f__A(r))*`z'`(r, theta, phi)+(diff(f__A(r), r))*`z'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`z'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*(-(-1+f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))*(-(1-f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-2*(-1+f__A(r))*`x'`(r, theta, phi)+(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))*((-(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r-2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))/(r^8*g^4)-(1/4)*((-2*(-1+f__A(r))*`y'`(r, theta, phi)+(diff(f__A(r), r))*`y'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`y'`(r, theta, phi), r))*r)*g*r+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))*((-(diff(f__A(r), r))*`y'`(r, theta, phi)*r+(1-f__A(r))*(diff(`y'`(r, theta, phi), r))*r-2*(1-f__A(r))*`y'`(r, theta, phi))*g*r+(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r-2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))*((-2*(-1+f__A(r))*`x'`(r, theta, phi)+(diff(f__A(r), r))*`x'`(r, theta, phi)*r+(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g-(1-f__A(r))*`y'`(r, theta, phi)^2*(-1+f__A(r)))/(r^8*g^4)-(1/4)*(-(1-f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))*(-(-1+f__A(r))*(diff(`y'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^8*g^4)-(1/4)*(((diff(f__A(r), r))*`z'`(r, theta, phi)*r-(1-f__A(r))*(diff(`z'`(r, theta, phi), r))*r+2*(1-f__A(r))*`z'`(r, theta, phi))*g*r+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))*((2*(-1+f__A(r))*`z'`(r, theta, phi)-(diff(f__A(r), r))*`z'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`z'`(r, theta, phi), r))*r)*g*r+(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*((-1+f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))*((1-f__A(r))*(diff(`z'`(r, theta, phi), theta))*r^2*g+(-1+f__A(r))^2*`y'`(r, theta, phi)*`z'`(r, theta, phi))/(r^8*g^4)-(1/4)*((1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+(2*(-1+f__A(r))*`x'`(r, theta, phi)-(diff(f__A(r), r))*`x'`(r, theta, phi)*r-(-1+f__A(r))*(diff(`x'`(r, theta, phi), r))*r)*g*r-(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))*((-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g+((diff(f__A(r), r))*`x'`(r, theta, phi)*r-(1-f__A(r))*(diff(`x'`(r, theta, phi), r))*r+2*(1-f__A(r))*`x'`(r, theta, phi))*g*r-(-1+f__A(r))*`z'`(r, theta, phi)^2*(1-f__A(r)))/(r^8*g^4)-(1/4)*((-1+f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(1-f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))*((1-f__A(r))*(diff(`y'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))*(diff(`z'`(r, theta, phi), phi))*r^2*g+(-1+f__A(r))*`x'`(r, theta, phi)^2*(1-f__A(r)))/(r^8*g^4)-(1/4)*((1-f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))*((-1+f__A(r))*(diff(`x'`(r, theta, phi), theta))*r^2*g-(-1+f__A(r))^2*`y'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4)-(1/4)*(-(-1+f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))*(-(1-f__A(r))*(diff(`x'`(r, theta, phi), phi))*r^2*g-(-1+f__A(r))^2*`z'`(r, theta, phi)*`x'`(r, theta, phi))/(r^8*g^4), xyz))

(1/2)*(g^2*r^2*(sin(theta)^2*cos(phi)^2+1)*(diff(f__A(r), r))^2+2*g^2*r*(-1+f__A(r))*(r*sin(theta)*cos(phi)*cos(theta)*sin(phi)-sin(theta)^2*cos(phi)^2-1)*(diff(f__A(r), r))-(1+f__A(r)^2-2*f__A(r)+g^2*(r^2*cos(theta)^2-sin(theta)^2)*cos(phi)^2+2*g^2*r*sin(theta)*cos(phi)*cos(theta)*sin(phi)+(-2*r^2-1)*g^2)*(-1+f__A(r))^2)/(r^4*g^4)

(52)

This is again equation (17), the Lagrangian you got in the first approach

simplify(L__FST-(1/2)*(g^2*r^2*(sin(theta)^2*cos(phi)^2+1)*(diff(f__A(r), r))^2+2*g^2*r*(-1+f__A(r))*(sin(theta)*sin(phi)*cos(theta)*cos(phi)*r-sin(theta)^2*cos(phi)^2-1)*(diff(f__A(r), r))-(-1+f__A(r))^2*(1+f__A(r)^2-2*f__A(r)+g^2*(r^2*cos(theta)^2-sin(theta)^2)*cos(phi)^2+2*sin(theta)*sin(phi)*cos(theta)*cos(phi)*g^2*r+(-2*r^2-1)*g^2))/(g^4*r^4))

0

(53)

NULL


 

Download SU(2)-field-strength-tensor_(reviewed).mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

OK, it is fixed and the fix distributed as usual within Maplesoft's Physics Updates package, so input Physics:-Version(latest) and that's it.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

You know, PDE solutions depend on arbitrary functions, so specializing them you have infinitely many particular solutions. The one you show is very so, it has no arbitrary functions and no arbitrary constants. The pdsolve command attempts to find general solutions, and if that is not possible, then complete solutions or else it does not attempt to find all and any possible particular solution, but for separable (simple or more general forms) or travelling wave ones.

Anyway, for more specific particular forms of solutions, e.g. polynomial ones as the one you show, there are specific commands in PDEtools, in this case PDEtools:-PolynomialSolutions.

So here are some more general - still particular - solutions, these ones depending on arbitrary constants.

 

with(PDEtools)

declare(Hamil(x, y, u, v))

Hamil(x, y, u, v)*`will now be displayed as`*Hamil

(1)


PDEHamil := u*(diff(Hamil(x, y, u, v), x))+v*(diff(Hamil(x, y, u, v), y))+(-2*x*y-x)*(diff(Hamil(x, y, u, v), u))+(-x^2+y^2-y)*(diff(Hamil(x, y, u, v), v)) = 0

u*(diff(Hamil(x, y, u, v), x))+v*(diff(Hamil(x, y, u, v), y))+(-2*x*y-x)*(diff(Hamil(x, y, u, v), u))+(-x^2+y^2-y)*(diff(Hamil(x, y, u, v), v)) = 0


(2)

This one depends on 2 arbitrary constants

PolynomialSolutions(PDEHamil, degree = 3)

{Hamil(x, y, u, v) = (1/6)*(6*x^2*y-2*y^3+3*u^2+3*v^2+3*x^2+3*y^2)*c__2+c__1}

(3)

pdetest(%, PDEHamil)

0

(4)


This other one depends on 4 arbitrary constants, c__1, c__2, c__3, c__4

PolynomialSolutions(PDEHamil, degree = 10)

{Hamil(x, y, u, v) = (2/3)*(y+1/2)^3*c__4*x^6+(2*c__3+c__4*(-(2/3)*y^3+u^2+v^2+y^2))*(y+1/2)^2*x^4+(1/2)*(-(2/3)*y^3+u^2+v^2+y^2)^2*c__3-(2/81)*(y-3/2)^3*y^6*c__4+(1/2)*(y+1/2)*(4*(-(2/3)*y^3+u^2+v^2+y^2)*c__3+v^4*c__4+2*(-(2/3)*y^3+u^2+y^2)*c__4*v^2+u^4*c__4-(4/3)*(y-3/2)*y^2*c__4*u^2+(4/9)*(y-3/2)^2*y^4*c__4+2*c__2)*x^2+(1/12)*c__4*v^6-(1/12)*(2*y^3-3*u^2-3*y^2)*c__4*v^4+(1/36)*(9*u^4*c__4-12*(y-3/2)*y^2*c__4*u^2+4*(y-3/2)^2*y^4*c__4+18*c__2)*v^2+(1/12)*c__4*u^6-(1/12)*(2*y-3)*y^2*c__4*u^4+(1/18)*(2*(y-3/2)^2*y^4*c__4+9*c__2)*u^2-(1/3)*c__2*y^3+(1/2)*c__2*y^2+c__1}

(5)

pdetest(%, PDEHamil)

0

(6)


This other one depends on 6 arbitrary constants; I omit the output to avoid cluttering.

PolynomialSolutions(PDEHamil, degree = 15)


The 6 arbitrary constants (you could also use suffixed(c__))

indets(%, suffixed(_C))

{c__1, c__2, c__3, c__4, c__5, c__6}

(7)

NULL


 

Download particular_solutions.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

There are different things you may want regarding the covariant derivative of Einstein's tensor. Below you have a sample of them.

 

with(Physics); Coordinates(spherical)

{X}

(1)

ds_2 := -A(r)*dt^2+B(r)*dr^2+dtheta^2+sin(theta)^2*dphi^2

-A(r)*dt^2+B(r)*dr^2+dtheta^2+sin(theta)^2*dphi^2

(2)

Setup(metric = ds_2)

[metric = {(1, 1) = B(r), (2, 2) = 1, (3, 3) = sin(theta)^2, (4, 4) = -A(r)}, spaceindices = lowercaselatin_is]

(3)

Note that after a call to CompactDisplay , derivatives are displayed indexed; to see what is behind this display, use show

CompactDisplay([metric = {(1, 1) = B(r), (2, 2) = 1, (3, 3) = sin(theta)^2, (4, 4) = -A(r)}, spaceindices = lowercaselatin_is])

B(r)*`will now be displayed as`*B

(4)

Einstein[]

Physics:-Einstein[mu, nu] = Matrix(%id = 36893488151945680044)

(5)

show

Physics:-Einstein[mu, nu] = Matrix(%id = 36893488151945680044)

(6)

The covariant derivative, you may want to compute with it symbolically (simplification of expressions involving it is invoked using Physics:-Simplify).

D_[mu](Einstein[alpha, beta])

Physics:-D_[mu](Physics:-Einstein[alpha, beta], [X])

(7)

expand(Physics[D_][mu](Physics[Einstein][alpha, beta], [X]))

Physics:-d_[mu](Physics:-Einstein[alpha, beta], [X])-Physics:-Christoffel[`~nu`, alpha, mu]*Physics:-Einstein[beta, nu]-Physics:-Christoffel[`~nu`, beta, mu]*Physics:-Einstein[alpha, nu]

(8)

(7) has three indices, the default display is a slice

TensorArray(Physics[D_][mu](Physics[Einstein][alpha, beta], [X]))

_rtable[36893488152498098532]

(9)

This is practical

TensorArray(Physics[D_][mu](Physics[Einstein][alpha, beta], [X]), output = setofequations)

{(1/4)*(2*(diff(diff(diff(A(r), r), r), r))*B(r)^2*A(r)^2-4*B(r)^2*A(r)*(diff(diff(A(r), r), r))*(diff(A(r), r))+2*B(r)^2*(diff(A(r), r))^3-3*B(r)*A(r)^2*(diff(diff(A(r), r), r))*(diff(B(r), r))-B(r)*A(r)^2*(diff(A(r), r))*(diff(diff(B(r), r), r))+2*B(r)*A(r)*(diff(B(r), r))*(diff(A(r), r))^2+2*A(r)^2*(diff(B(r), r))^2*(diff(A(r), r)))/(B(r)^3*A(r)^3) = 0, (1/4)*sin(theta)^2*(2*(diff(diff(diff(A(r), r), r), r))*B(r)^2*A(r)^2-4*B(r)^2*A(r)*(diff(diff(A(r), r), r))*(diff(A(r), r))+2*B(r)^2*(diff(A(r), r))^3-3*B(r)*A(r)^2*(diff(diff(A(r), r), r))*(diff(B(r), r))-B(r)*A(r)^2*(diff(A(r), r))*(diff(diff(B(r), r), r))+2*B(r)*A(r)*(diff(B(r), r))*(diff(A(r), r))^2+2*A(r)^2*(diff(B(r), r))^2*(diff(A(r), r)))/(B(r)^3*A(r)^3) = 0, -(1/8)*(2*(diff(diff(A(r), r), r))*B(r)*A(r)-(diff(A(r), r))^2*B(r)-(diff(A(r), r))*(diff(B(r), r))*A(r))*(2*cot(theta)*sin(theta)^2-sin(2*theta))/(B(r)^2*A(r)^2) = 0, -(1/2)*sin(theta)*(2*(diff(diff(A(r), r), r))*B(r)*A(r)-(diff(A(r), r))^2*B(r)-(diff(A(r), r))*(diff(B(r), r))*A(r))*(cot(theta)*sin(theta)-cos(theta))/(B(r)^2*A(r)^2) = 0}

(10)

simplify({(1/4)*(2*(diff(diff(diff(A(r), r), r), r))*B(r)^2*A(r)^2-4*B(r)^2*A(r)*(diff(diff(A(r), r), r))*(diff(A(r), r))+2*B(r)^2*(diff(A(r), r))^3-3*B(r)*A(r)^2*(diff(diff(A(r), r), r))*(diff(B(r), r))-B(r)*A(r)^2*(diff(A(r), r))*(diff(diff(B(r), r), r))+2*B(r)*A(r)*(diff(B(r), r))*(diff(A(r), r))^2+2*A(r)^2*(diff(B(r), r))^2*(diff(A(r), r)))/(B(r)^3*A(r)^3) = 0, (1/4)*sin(theta)^2*(2*(diff(diff(diff(A(r), r), r), r))*B(r)^2*A(r)^2-4*B(r)^2*A(r)*(diff(diff(A(r), r), r))*(diff(A(r), r))+2*B(r)^2*(diff(A(r), r))^3-3*B(r)*A(r)^2*(diff(diff(A(r), r), r))*(diff(B(r), r))-B(r)*A(r)^2*(diff(A(r), r))*(diff(diff(B(r), r), r))+2*B(r)*A(r)*(diff(B(r), r))*(diff(A(r), r))^2+2*A(r)^2*(diff(B(r), r))^2*(diff(A(r), r)))/(B(r)^3*A(r)^3) = 0, -(1/8)*(2*(diff(diff(A(r), r), r))*B(r)*A(r)-(diff(A(r), r))^2*B(r)-(diff(A(r), r))*(diff(B(r), r))*A(r))*(2*cot(theta)*sin(theta)^2-sin(2*theta))/(B(r)^2*A(r)^2) = 0, -(1/2)*sin(theta)*(2*(diff(diff(A(r), r), r))*B(r)*A(r)-(diff(A(r), r))^2*B(r)-(diff(A(r), r))*(diff(B(r), r))*A(r))*(cot(theta)*sin(theta)-cos(theta))/(B(r)^2*A(r)^2) = 0})

{0 = 0, (1/4)*(2*(diff(diff(diff(A(r), r), r), r))*B(r)^2*A(r)^2-4*B(r)^2*A(r)*(diff(diff(A(r), r), r))*(diff(A(r), r))+2*B(r)^2*(diff(A(r), r))^3-3*B(r)*A(r)^2*(diff(diff(A(r), r), r))*(diff(B(r), r))-B(r)*A(r)^2*(diff(A(r), r))*(diff(diff(B(r), r), r))+2*B(r)*A(r)*(diff(B(r), r))*(diff(A(r), r))^2+2*A(r)^2*(diff(B(r), r))^2*(diff(A(r), r)))/(B(r)^3*A(r)^3) = 0, (1/4)*sin(theta)^2*(2*(diff(diff(diff(A(r), r), r), r))*B(r)^2*A(r)^2-4*B(r)^2*A(r)*(diff(diff(A(r), r), r))*(diff(A(r), r))+2*B(r)^2*(diff(A(r), r))^3-3*B(r)*A(r)^2*(diff(diff(A(r), r), r))*(diff(B(r), r))-B(r)*A(r)^2*(diff(A(r), r))*(diff(diff(B(r), r), r))+2*B(r)*A(r)*(diff(B(r), r))*(diff(A(r), r))^2+2*A(r)^2*(diff(B(r), r))^2*(diff(A(r), r)))/(B(r)^3*A(r)^3) = 0}

(11)

This gives you a slice display

seq(Physics[D_][mu](Physics[Einstein][alpha, beta], [X]), mu = 1 .. 4)

Physics:-D_[1](Physics:-Einstein[alpha, beta](r, theta), [X]), Physics:-D_[2](Physics:-Einstein[alpha, beta](r, theta), [X]), Physics:-D_[3](Physics:-Einstein[alpha, beta](r, theta), [X]), Physics:-D_[4](Physics:-Einstein[alpha, beta](r, theta), [X])

(12)

seq(Physics[D_][mu](Physics[Einstein][alpha, beta], [X]) = TensorArray(Physics[D_][mu](Physics[Einstein][alpha, beta], [X]), simplifier = simplify), mu = 1 .. 4)

Physics:-D_[1](Physics:-Einstein[alpha, beta](r, theta), [X]) = Matrix(%id = 36893488151928256020), Physics:-D_[2](Physics:-Einstein[alpha, beta](r, theta), [X]) = Matrix(%id = 36893488152498095876), Physics:-D_[3](Physics:-Einstein[alpha, beta](r, theta), [X]) = Matrix(%id = 36893488152498080212), Physics:-D_[4](Physics:-Einstein[alpha, beta](r, theta), [X]) = Matrix(%id = 36893488152498057212)

(13)

This allows you to explore each slice, having mu, alpha or beta varying from 1 to 4

TensorArray(Physics[D_][mu](Physics[Einstein][alpha, beta], [X]), explore)

`▿`[mu](G[alpha, beta])*`      `(`ordering of free indices` = [mu, alpha, beta])

(14)

For details, or in general, check the help pages for Physics:-D_ and Physics,Tensors.

NULL


 

Download Covariant_derivative_of_Einstein_tensor.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Or all in one go:

op(op(indets(SolL, specfunc(f__1))))


Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Check ?dsolve,details, Parameters, then the last paragraph under "Arbitrary Constants ,.....". It is said there it is an alias. Two additional comments, in view of some of the replies I read. Using an alias for this has the significant advantage that ALL previously existing Maple code, inside the Maple library or written by Maple users, that were expecting the old display of them as _Cn, continue working exactly as before. You don't need to change anything. How come? Because the alias only changes how the _Cn is displayed, but it is still the old _Cn there.

So as soon as some c__n appears around by hands of dsolve (not yours) Maple knows it is _Cn, and you can 'touch' it either entering c__n, or _Cn, both things point to the same memory address (after the alias got set by dsolve before displaying it, not before that). Moreover, if you prefer not to see them displayed as c__n or have these aliases set, suppose that would be your choice: the mentioned help page tells you how to set Maple to work the old way. By the way I did a post in Mapleprimes about this when implementing it.

By the way, according to the above, which is what is said in ?dsolve,details, in your code, write everything as what it is there is _Cn, because that is what it is, and everything will work as you'd expect, regardless of how it is displayed. This was also mentioned in the Mapleprimes post.

My opinion: the implementation through an alias couldn't be better; disclosure: I am the author of this.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

restart

with(Physics)

with(Vectors)

Setup(spacetimeindices = greek, spaceindices = lowercaselatin, signature = `+++-`, coordinates = spherical)

[coordinatesystems = {X}, signature = `+ + + -`, spaceindices = lowercaselatin, spacetimeindices = greek]

(1)

Note that r is a coordinate, do not define it also as a tensor. Use another letter, for instance R

Also, define all the components in one go instead of one component at a time

 

NULL 

NULL

 

Define(R[a] = [sin(theta)*cos(phi), sin(theta)*sin(phi), cos(theta)])

{Physics:-Dgamma[mu], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2)

Check it out

R[definition]

R[a] = [sin(theta)*cos(phi), sin(theta)*sin(phi), cos(theta)]

(3)

The same for A[mu, a], define all its components in one go, it is simpler, so comment these lines, then define it

NULL

NULL

NULL

NULL
NULL
NULL``

NULL

NULL

NULL

NULL``

NULLNULL


Here is the above in one go: use LeviCivita with four indices, as in `ε`[a, mu, j, 4]

Define(A[mu, a] = (1-f__A(X[1]))*LeviCivita[a, mu, j, 4]*R[j]/(g*X[1]))

{A[mu, a], Physics:-Dgamma[mu], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(4)

Check it out

A[definition]

A[mu, a] = (1-f__A(r))*Physics:-LeviCivita[4, a, j, mu]*R[j]/(g*r)

(5)

A[]

A[mu, a] = Matrix(%id = 36893488151887036156)

(6)

``

Your next definition: my suggestion to you is again to use LeviCivita with four indices, the forth being the number 4

Define(F[mu, nu, a] = d_[nu](A[mu, a])-d_[mu](A[nu, a])+LeviCivita[a, b, c, 4]*A[mu, `~b`]*A[nu, `~c`])

{A[mu, a], Physics:-Dgamma[mu], F[mu, nu, a], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(7)

F[definition]

F[mu, nu, a] = -Physics:-d_[nu](A[a, mu], [X])+Physics:-d_[mu](A[a, nu], [X])-Physics:-LeviCivita[4, a, b, c]*A[mu, `~b`]*A[nu, `~c`]

(8)

Next you could use local D but you will find that the results of your computation involve the D Maple differentiation operator (check its help page), so to avoid this problem use _D, and make it point to any convenient letter you can get from the palettes (the column at our left), for instance `𝒟`

macro(_D = `𝒟`)


Now use _D all around for your covariant derivative operator

Define(_D[mu] = d_[mu]+(1/2*I)*g*Psigma[a]*A[mu, a])

{`𝒟`[mu], A[mu, a], Physics:-Dgamma[mu], F[mu, nu, a], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(9)

_D[definition]

`𝒟`[mu] = Physics:-d_[mu]-((1/2)*I)*g*A[a, mu]*Physics:-Psigma[a]

(10)

SumOverRepeatedIndices(`𝒟`[mu] = Physics[d_][mu]-((1/2)*I)*g*A[a, mu]*Physics[Psigma][a], a)

`𝒟`[mu] = Physics:-d_[mu]-((1/2)*I)*g*A[1, mu]*Physics:-Psigma[1]-((1/2)*I)*g*A[2, mu]*Physics:-Psigma[2]-((1/2)*I)*g*A[3, mu]*Physics:-Psigma[3]

(11)

To see the components of any tensor, you can use TensorArray, or directly this

_D[]

`𝒟`[mu] = Array(%id = 36893488153853020748)

(12)

NULL

 

simplify(F[])

F[mu, nu, a] = _rtable[36893488153826239660]

(13)

" F[mu,nu,a]*F[~mu,~nu,a]"

F[mu, nu, a]*F[`~mu`, `~nu`, a]

(14)

"Simplify(SumOverRepeatedIndices(F[mu,nu,a]*F[~mu,~nu,a]));"

(1/4)*(-(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))^2*g^2*cos(2*phi-2*theta)-(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))^2*g^2*cos(2*phi+2*theta)-8*g*r*(-1+f__A(r))^3*sin(-theta+phi)-2*(r^2*(diff(f__A(r), r))^2-2*r*(-1+f__A(r))*(diff(f__A(r), r))+(-1+f__A(r))^2*(r^2+1))*g^2*cos(2*theta)-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)-8*g*r*(-1+f__A(r))^3*sin(theta+phi)+10*(diff(f__A(r), r))^2*g^2*r^2-20*g^2*r*(-1+f__A(r))*(diff(f__A(r), r))+14*((4/7)*f__A(r)^2-(8/7)*f__A(r)+4/7+(r^2+5/7)*g^2)*(-1+f__A(r))^2)/(g^4*r^4)

(15)

L__FST := -1/4*((1/4)*(-(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))^2*g^2*cos(2*phi-2*theta)-(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))^2*g^2*cos(2*phi+2*theta)-8*g*r*(-1+f__A(r))^3*sin(-theta+phi)-2*(r^2*(diff(f__A(r), r))^2-2*r*(-1+f__A(r))*(diff(f__A(r), r))+(-1+f__A(r))^2*(r^2+1))*g^2*cos(2*theta)-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)-8*g*r*(-1+f__A(r))^3*sin(theta+phi)+10*(diff(f__A(r), r))^2*g^2*r^2-20*g^2*r*(-1+f__A(r))*(diff(f__A(r), r))+14*((4/7)*f__A(r)^2-(8/7)*f__A(r)+4/7+(r^2+5/7)*g^2)*(-1+f__A(r))^2)/(g^4*r^4))

-(1/16)*(-(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))^2*g^2*cos(2*phi-2*theta)-(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))^2*g^2*cos(2*phi+2*theta)-8*g*r*(-1+f__A(r))^3*sin(-theta+phi)-2*(r^2*(diff(f__A(r), r))^2-2*r*(-1+f__A(r))*(diff(f__A(r), r))+(-1+f__A(r))^2*(r^2+1))*g^2*cos(2*theta)-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)-8*g*r*(-1+f__A(r))^3*sin(theta+phi)+10*(diff(f__A(r), r))^2*g^2*r^2-20*g^2*r*(-1+f__A(r))*(diff(f__A(r), r))+14*((4/7)*f__A(r)^2-(8/7)*f__A(r)+4/7+(r^2+5/7)*g^2)*(-1+f__A(r))^2)/(g^4*r^4)

(16)

At this point, your question is about computing the functional derivative with respect to f__A. The help page for Fundiff says that you need to specify a different variable for the differentiation function, and then you get  the expected Dirac function, as in

(%Fundiff = Fundiff)(f(x), f(y))

%Fundiff(f(x), f(y)) = Dirac(x-y)

(17)

 

So not the same variable for the function - you would receive this kind of telling error message

(%Fundiff = Fundiff)(f(x), f(x))

Error, (in Physics:-Fundiff) all the arguments of the differentiation function f(x) must be different from those used for f inside f(x)

 


Also, you do not need to put the Lagrangian density within an integral in order to compute a functional derivative: Fundiff and Int commute, so you can compute, directly
Fundiff(L__FST, f__A(y))

-(1/16)*(-2*(-r*(D(f__A))(r)+(-1+f__A(r))*(r+1))*g^2*cos(2*phi-2*theta)*Dirac(r-y)*(r+1)-2*(r*(D(f__A))(r)+(-1+f__A(r))*(r-1))*g^2*cos(2*phi+2*theta)*Dirac(r-y)*(r-1)-24*(-1+f__A(r))^2*g*r*sin(-theta+phi)*Dirac(r-y)-2*(-2*Dirac(r-y)*r*(D(f__A))(r)+2*(-1+f__A(r))*(r^2+1)*Dirac(r-y))*g^2*cos(2*theta)-2*Dirac(r-y)*(r-1)*(-r*(D(f__A))(r)+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)-2*(r*(D(f__A))(r)+(-1+f__A(r))*(r-1))*Dirac(r-y)*(r+1)*g^2*cos(2*phi)-24*(-1+f__A(r))^2*g*r*sin(theta+phi)*Dirac(r-y)-20*Dirac(r-y)*g^2*r*(D(f__A))(r)+14*((8/7)*f__A(r)*Dirac(r-y)-(8/7)*Dirac(r-y))*(-1+f__A(r))^2+28*((4/7)*f__A(r)^2-(8/7)*f__A(r)+4/7+(r^2+5/7)*g^2)*(-1+f__A(r))*Dirac(r-y)+(2*(-r*(D(f__A))(r)+(-1+f__A(r))*(r+1))*g^2*cos(2*phi-2*theta)*r-2*(r*(D(f__A))(r)+(-1+f__A(r))*(r-1))*g^2*cos(2*phi+2*theta)*r-2*(2*r^2*(D(f__A))(r)-2*(-1+f__A(r))*r)*g^2*cos(2*theta)-2*r*(-r*(D(f__A))(r)+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)+2*(r*(D(f__A))(r)+(-1+f__A(r))*(r-1))*r*g^2*cos(2*phi)+20*(D(f__A))(r)*g^2*r^2-20*(-1+f__A(r))*g^2*r)*Dirac(1, -r+r*sin(theta)*sin(phi))*(sin(theta)*sin(phi)-1))/(g^4*r^4)

(18)

Rewrite the D derivatives using diff

convert(-(1/16)*(-2*(-r*(D(f__A))(r)+(-1+f__A(r))*(r+1))*g^2*cos(2*phi-2*theta)*Dirac(r-y)*(r+1)-2*(r*(D(f__A))(r)+(-1+f__A(r))*(r-1))*g^2*cos(2*phi+2*theta)*Dirac(r-y)*(r-1)-24*(-1+f__A(r))^2*g*r*sin(-theta+phi)*Dirac(r-y)-2*(-2*Dirac(r-y)*r*(D(f__A))(r)+2*(-1+f__A(r))*(r^2+1)*Dirac(r-y))*g^2*cos(2*theta)-2*Dirac(r-y)*(r-1)*(-r*(D(f__A))(r)+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)-2*(r*(D(f__A))(r)+(-1+f__A(r))*(r-1))*Dirac(r-y)*(r+1)*g^2*cos(2*phi)-24*(-1+f__A(r))^2*g*r*sin(theta+phi)*Dirac(r-y)-20*Dirac(r-y)*g^2*r*(D(f__A))(r)+14*((8/7)*f__A(r)*Dirac(r-y)-(8/7)*Dirac(r-y))*(-1+f__A(r))^2+28*((4/7)*f__A(r)^2-(8/7)*f__A(r)+4/7+(r^2+5/7)*g^2)*(-1+f__A(r))*Dirac(r-y)+(2*(-r*(D(f__A))(r)+(-1+f__A(r))*(r+1))*g^2*cos(2*phi-2*theta)*r-2*(r*(D(f__A))(r)+(-1+f__A(r))*(r-1))*g^2*cos(2*phi+2*theta)*r-2*(2*r^2*(D(f__A))(r)-2*(-1+f__A(r))*r)*g^2*cos(2*theta)-2*r*(-r*(D(f__A))(r)+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)+2*(r*(D(f__A))(r)+(-1+f__A(r))*(r-1))*r*g^2*cos(2*phi)+20*(D(f__A))(r)*g^2*r^2-20*(-1+f__A(r))*g^2*r)*Dirac(1, -r+r*sin(theta)*sin(phi))*(sin(theta)*sin(phi)-1))/(g^4*r^4), diff)

-(1/16)*(-2*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi-2*theta)*Dirac(r-y)*(r+1)-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*g^2*cos(2*phi+2*theta)*Dirac(r-y)*(r-1)-24*(-1+f__A(r))^2*g*r*sin(-theta+phi)*Dirac(r-y)-2*(-2*Dirac(r-y)*r*(diff(f__A(r), r))+2*(-1+f__A(r))*(r^2+1)*Dirac(r-y))*g^2*cos(2*theta)-2*Dirac(r-y)*(r-1)*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*Dirac(r-y)*(r+1)*g^2*cos(2*phi)-24*(-1+f__A(r))^2*g*r*sin(theta+phi)*Dirac(r-y)-20*Dirac(r-y)*g^2*r*(diff(f__A(r), r))+14*((8/7)*f__A(r)*Dirac(r-y)-(8/7)*Dirac(r-y))*(-1+f__A(r))^2+28*((4/7)*f__A(r)^2-(8/7)*f__A(r)+4/7+(r^2+5/7)*g^2)*(-1+f__A(r))*Dirac(r-y)+(2*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi-2*theta)*r-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*g^2*cos(2*phi+2*theta)*r-2*(2*r^2*(diff(f__A(r), r))-2*(-1+f__A(r))*r)*g^2*cos(2*theta)-2*r*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)+2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*r*g^2*cos(2*phi)+20*(diff(f__A(r), r))*g^2*r^2-20*(-1+f__A(r))*g^2*r)*Dirac(1, -r+r*sin(theta)*sin(phi))*(sin(theta)*sin(phi)-1))/(g^4*r^4)

(19)

Now you can now integrate this result with any limits of integration that you prefer. Note however that you have two Dirac functions

indets(-(1/16)*(-2*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi-2*theta)*Dirac(r-y)*(r+1)-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*g^2*cos(2*phi+2*theta)*Dirac(r-y)*(r-1)-24*(-1+f__A(r))^2*g*r*sin(-theta+phi)*Dirac(r-y)-2*(-2*Dirac(r-y)*r*(diff(f__A(r), r))+2*(-1+f__A(r))*(r^2+1)*Dirac(r-y))*g^2*cos(2*theta)-2*Dirac(r-y)*(r-1)*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*Dirac(r-y)*(r+1)*g^2*cos(2*phi)-24*(-1+f__A(r))^2*g*r*sin(theta+phi)*Dirac(r-y)-20*Dirac(r-y)*g^2*r*(diff(f__A(r), r))+14*((8/7)*f__A(r)*Dirac(r-y)-(8/7)*Dirac(r-y))*(-1+f__A(r))^2+28*((4/7)*f__A(r)^2-(8/7)*f__A(r)+4/7+(r^2+5/7)*g^2)*(-1+f__A(r))*Dirac(r-y)+(2*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi-2*theta)*r-2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*g^2*cos(2*phi+2*theta)*r-2*(2*r^2*(diff(f__A(r), r))-2*(-1+f__A(r))*r)*g^2*cos(2*theta)-2*r*(-r*(diff(f__A(r), r))+(-1+f__A(r))*(r+1))*g^2*cos(2*phi)+2*(r*(diff(f__A(r), r))+(-1+f__A(r))*(r-1))*r*g^2*cos(2*phi)+20*(diff(f__A(r), r))*g^2*r^2-20*(-1+f__A(r))*g^2*r)*Dirac(1, -r+r*sin(theta)*sin(phi))*(sin(theta)*sin(phi)-1))/(g^4*r^4), specfunc(Dirac))

{Dirac(r-y), Dirac(1, -r+r*sin(theta)*sin(phi))}

(20)

and no Dirac function for the other variables, so how do you intend to integrate in the other variables? Also, are these Dirac functions what you expect?  The computer can perform for you a computation that you know how to do it. That is important also to know whether the result is actually what you wanted to compute.

 

I suggest you to give a look for instance at at this link with brief information on "The Dirac Delta Function in Three Dimensions", or search the web for related material. Using Intc as you did will integrate over these coordinates as if they were Cartesian, from - to + infinity. If after formulating the problem in a way that you are sure you are computing what you want to compute you still have a doubt, feel free to post here again and we take if from there.
 

 

Download YANG-MILLS-Theorie_(reviewed).mw


Edgardo S. Cheb-Terrab

 

Physics, Differential Equations and Mathematical Functions, Maplesoft

As said in a previous comment, using the 'methods' option was not implemented when tackling ODE + IC/BC. It is implemented now, and with that the problem is resolved. To install the adjustment, as usual, input Physics:-Version(latest);

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

(Please remember to post a worksheet instead of text and screen shots.)

 

There is no bug. This is the answer to your question, and at the end two suggestions to avoid these subtleties.

 

with(Physics)

Setup(spacetimeindices = greek, spaceindices = lowercaselatin_ah, signature = `-++ +`, coordinates = spherical)

[coordinatesystems = {X}, signature = `- + + +`, spaceindices = lowercaselatin_ah, spacetimeindices = greek]

(1)

From your signature, you are choosing position 1 to be timelike, and 2, 3 and 4 to represent the three spacelike components. With that in mind, take a look at the components of sigma[mu]

TensorArray(Psigma[mu])

Array(%id = 36893488152415651468)

(2)

So the Pauli matrices are sigma[2], sigma[3] and sigma[4], as you can also see in this output

TensorArray(Psigma[mu], rewriteinmatrixform)

Array(%id = 36893488152391441452)

(3)

So what you do expect for the components of sigma[a] where Psigma is indexed with a space index a?

TensorArray(Psigma[a])

Array(%id = 36893488152391429764)

(4)

TensorArray(Psigma[a], rewriteinmatrixform)

Array(%id = 36893488152391420252)

(5)

The above turns on the lights regarding the shifted value of the space index a : the tensor you are indexing, sigma is a 4-dimensional tensor, and being that the 1st component is timelike (not Physics's default but your choice of signature), the space components are given by shifting the 4-dimensional index by one.

 

How about a true space tensor? Let's define one of them, another mixed, and one all spacetime for experimentation

Define(S[a], A[mu, a], B[mu, nu])

{A[mu, a], B[mu, nu], Physics:-Dgamma[mu], Physics:-Psigma[mu], S[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(6)

For S[a], a space tensor, the components are given by

TensorArray(S[a])

Array(%id = 36893488152391393996)

(7)

You see they are not shifted. The index a runs from 1 to 3, not from 1 to 4 such that you are only interested in the components from 2 to 4.

How about the mixed tensor A[mu, a]?

TensorArray(A[mu, a])

Matrix(%id = 36893488152391382188)

(8)

Again OK, and you see: there are 4 lines indexed from 1 to 4, and 3 colums indexed from 1 to 3, because a is a space index. How about B[mu, a], where in B[mu, nu] we want only the space part of the spactime index nu?

TensorArray(B[mu, a])

Matrix(%id = 36893488151936346220)

(9)

This is again correct, but the 3 columns are indexed from 2 to 4, not from 1 to 3 as in (8) for A[mu, a]. I hope it is clear now: when you set a signature with timelike component in position 1, the space part of a spacetime index is given by shifting the value by 1 to skip the timelike component in position 1.

 

With these things in mind lets give a closer look at your example where you define a covariant derivative operator as D[mu] = `∂`[mu]+(1/2)*ig*sigma[a]*A[mu, a]. The first problem is that you use the letter D, which is a Maple command representing differentiation. If you proceed as you did, you effectively not have the D command anymore, which is bad. Instead, I suggest you first input

_local(D)

D

(10)

Now you can use D without cancelling the Maple differentiation command D

Define(D[mu] = d_[mu]+(1/2)*ig*Psigma[a]*A[mu, a])

{A[mu, a], B[mu, nu], D[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], S[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(11)

Check

D[definition]

D[mu] = Physics:-d_[mu]+(1/2)*ig*A[mu, a]*Physics:-Psigma[a]

(12)

Let's sum over the repeated index a. In view of the comments lines above, what do we expect? In A[mu, a], the index a is a space index, running from 1 to 3. In sigma[a], the index a represents the space part of a spacetime index so it runs from 2 to 4. Then

SumOverRepeatedIndices(D[mu] = Physics[d_][mu]+(1/2)*ig*A[mu, a]*Physics[Psigma][a], a)

D[mu] = Physics:-d_[mu]+(1/2)*ig*A[mu, 1]*Physics:-Psigma[2]+(1/2)*ig*A[mu, 2]*Physics:-Psigma[3]+(1/2)*ig*A[mu, 3]*Physics:-Psigma[4]

(13)

That is the result you are getting when entering TensorArray(D[mu])and that motivated your question: the index a in A[mu, a] runs from 1 to 3 but the index a in sigma[a] runs from 2 to 4.

A[mu, a]

(14)

 

Of course you could have all this in mind, and the computations will run correctly, you don't need to worry. Or the details are not in your mind and get in doubt (your post). I have some suggestions to avoid falling in these subtleties

1. 

Do not use a signature with the timelike component in position 1. Instead, use either "+++-" or "- - -+"the latter is Physics's default.

2. 

Or, use the signature "-+++" but define your tensor A with two spacetime indices, as is the case of sigma[mu], then use A with a space index,as you are doing when entering sigma[a]

Compare. These are the current components for your A defined as a mixed components tensor

TensorArray(A[mu, a])

Matrix(%id = 36893488152415701820)

(15)

with these other ones after redefining A with two spacetime indices

Define(redo, A[mu, nu], quiet)

{A[mu, nu], B[mu, nu], D[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], S[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(16)

TensorArray(A[mu, a])

Matrix(%id = 36893488152415657244)

(17)

I believe the above is what you wanted. So now you have

D[definition]

D[mu] = Physics:-d_[mu]+(1/2)*ig*A[mu, a]*Physics:-Psigma[a]

(18)

 

SumOverRepeatedIndices(D[definition], a)

D[mu] = Physics:-d_[mu]+(1/2)*ig*A[mu, 2]*Physics:-Psigma[2]+(1/2)*ig*A[mu, 3]*Physics:-Psigma[3]+(1/2)*ig*A[mu, 4]*Physics:-Psigma[4]

(19)

and you get what you where expecting  for TensorArray(D[mu]).``


Download signatures_and_mixed_type_of_tensors.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Yes. See the help page?Physics,Tensors, section 2.b and 2.c; those pages also illustrate the Library:-RedefineTensorComponent, useful for changing the value of a component after you have defined the tensor's components using Define. You have as well more details in the help page of the command you are using, ?Physics,Define.

Regarding your question, "What exactly am I doing wrong?", you are not defining tensor components the way indicated in the help page. It is not correct to "assign" a component, e.g., via A[a, 1]:= 0; in Maple, that actually reassigns all of A, creating a table and undoing the tensor definition previously done using Define.

Overall, I suggest you invest more time in the related help pages. It pays off, the functionality available is enormous, and it saves you time despite the time invested.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

1 2 3 4 5 6 7 Last Page 3 of 59