LagrangeEquations - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Physics : LagrangeEquations

Physics[LagrangeEquations] - compute the Lagrange equations or the EnergyMomentum tensor corresponding to a given Lagrangian

Calling Sequence

LagrangeEquations(L, F)

Parameters

L

-

any algebraic expressions representing a Lagrangian; there are no restrictions to the differentiation order of the derivatives of the coordinates or fields

F

-

a name indicating the coordinate, without the coordinate's dependency, or a set or list of them in the case of a system with many degrees of freedom. NOTE : F can also be EnergyMomentum, with or without two spacetimeindices. If so, the output is the conserved energy-momentum tensor of the physical model represented by L

Description

• 

LagrangeEquations receives an expression representing a Lagrangian L and returns a sequence of Lagrange equations, of the form expression=0, with as many equations as coordinates are indicated in the list or set F. In the case of only one degree of freedom (one coordinate), F can also be the coordinate itself, and the output consists of a single Lagrange equation. While the coordinates in L are functions, the coordinates in F shall be passed as names, without their dependency. For example, in the case of one single parameter t and a coordinate qt, pass q. It is expected that these names appear in the Lagrangian consistently, always with the same functionality.

• 

In addition to handling Lagrangians with standard functions and their derivatives, LagrangeEquations handles Lagrangians involving tensors and vectors of the Physics package, as well as derivatives using vectorial and tensorial differential operators (see Nabla, d_ and D_).

• 

LagrangeEquations operates by constructing the action as the integral of L over a closed region Ω of the space spanned by the n parameters x,

S=ΩLⅆxn

  

and equating to 0 its functional derivative with respect to each qi

δ Sδ q=0

  

It is assumed that δ q=0 on the boundary of Ω. The functional derivative is computed using Fundiff, so LagrangeEquations automatically handles 1st and higher derivatives of the coordinates qi in the Lagrangian.

• 

The output of LagrangeEquations in the classical case where the Lagrangian depends on 1st order derivatives of qi and there is only one parameter t is thus the same as

LqiⅆⅆtLq.i=0

  

where Lq.i represents the derivative of L with respect to the ith velocity q.__i. Note that in more general cases the number of parameters can be many. For example, in electrodynamics, the "coordinate" is a tensor field Aμx,y,z,t, representing four coordinates, one for each of the values of the index μ, and there are four parameters x,y,z,t.

• 

In a realistic model, the action integral S is invariant under coordinate transformations. For that, L must be a scalar, and when there is more than one parameter, a scalar density. This condition on L is particularly relevant in general relativity, where the "coordinate" of the model is the metric field gμ,ν, the space and time coordinates are the parameters and the spacetime is curved. Hence, L has the factor g  involving the determinant of the metric g , represented in Maple using the inert metric command %g_[determinant]. Likewise, for any model, additional requirements concerning the invariance properties of the coordinates or fields involved restrict the classes of admissible Lagrangians. The LagrangeEquations command does not check these invariance conditions and the equations returned assume all those conditions are satisfied.

• 

In the case of general relativity, as discussed in Chapter 8 of ref.[3], the conditions on L mentioned in the previous paragraph restrict the dependence of the Lagrangian to derivatives of the metric of order not greater than two. When L depends only on 1st order derivatives of the metric (this can sometimes be achieved by adding a total derivative to a Lagrangian originally depending on 2nd order derivatives, see the Examples section), constructing the action integral and taking the functional derivative is equivalent to using the standard formula

ⅆLⅆgμ,ναⅆLⅆαgμ,ν=0

  

When L depends on 2nd order derivatives of the metric, the equivalent formula would be

ⅆLⅆgμ,ναⅆLⅆαgμ,ν+αβⅆLⅆβαgμ,ν=0

  

However, this formula does not discard total derivatives which would require additional assumptions to be eliminated, namely that on the corresponding boundary integrals of the action integral the variation of the metric vanishes. If that assumption is made, this formula can be rewritten (see ref[3] Chapter 8) in terms of the Riemann tensor and covariant derivatives as follows

gμ,νμ,νL2+23ⅆLⅆβσgα,μRνβ,α,σνβ,α,σ+σβⅆLⅆβσgμ,ν=0

  

As is standard, the LagrangeEquations command makes that assumption, and in the case of general relativity, for computationally efficiency, and taking into account that the Lagrangian cannot depend on derivatives of the metric of order higher than 2, the above are the formulas used instead of constructing the action integral and functionally differentiating.

• 

As shown at the end of the Examples section, the Einstein equations can as well be derived in steps, constructing the action integral S and equating to zero its functional derivative with respect to the metric gμ,ν. In doing so, total derivatives are automatically discarded by Fundiff, and the compact form in terms of the Ricci tensor is obtained after a few further tensor substitutions.

• 

In both flat and curved spacetimes, and for Lagrangians representing any physical model (scalar field, electromagnetic field, etc.), the energy-momentum tensor Tμ,ν, also called stress-energy tensor, can be computed taking the functional derivative of the action integral S according to

Tμ,ν=2 g δ Sδ gμ,νμ,ν

  

This energy-momentum tensor, represented in Maple by the EnergyMomentum command, can be computed by calling LagrangeEquations with the keyword EnergyMomentum or in indexed form EnergyMomentum[a, b] where a and b are expected to be spacetime indices. The formula above assumes the signature to have the timelike component positive, so either ---+ (default Physics signature) or +---. If the signature has a negative timelike component as in +++- or -+++, the right-hand side of this formula above is multiplied by -1. To use the output of LagrangeEquations as the definition of the EnergyMomentum tensor, you can use the Define command - see the Examples section.

Examples

with(Physics):

Setup(mathematicalnotation = true, coordinates = cartesian);

Systems of spacetime coordinates are:X=x,y,z,t

_______________________________________________________

coordinatesystems=X,mathematicalnotation=true

(1)

LagrangeEquations can be used in general in the context of variational principles; below are examples of its use in typical areas of Physics.

Classical Mechanics

The Lagrangian of a one-dimensional oscillator - small oscillations

L := 1/2*diff(x(t), t)^2 - 1/2*k*x(t)^2;

Lx.t22kxt22

(2)

The corresponding Lagrange equation gives Newton's second law, a 2nd order linear ODE for xt

LagrangeEquations(L, x);

xtk+x..t=0

(3)

The Lagrangian of a pendulum of mass m and length l where the suspension point moves uniformly over a vertical circumference centered at the origin, with a constant frequency ω

CompactDisplay(phi(t));

φtwill now be displayed asφ

(4)

L := 1/2*m*(-(2*diff(phi(t), t))*a*l*omega*sin(omega*t - phi(t)) + diff(phi(t), t)^2*l^2 + (2*cos(phi(t)))*g*l);

Lm2φ.alωsinωtφ+φ.2l2+2cosφgl2

(5)

The Lagrange equations

LagrangeEquations(L, phi);

aω2costωφsinφgφ..l=0

(6)

Relativistic Mechanics

In relativistic mechanics the Lagrangian of a free particle is proportional to the interval ds=dxμdxμ. Dividing dxμ by dτ, where τ is the proper time, the Lagrangian can be expressed in terms of the 4-velocity dxμdτ

L__rm := -m * diff(X[mu](tau), tau) * diff(X[~mu](tau), tau);

L__rmmXμτXμμτ

(7)

The corresponding Lagrange equation reflects the absence of acceleration

LagrangeEquations(L__rm, X[~mu]);

Xμμττ,τ=0

(8)

In steps, the action is

S__rm := Intc(L__rm, tau);

S__rmmXμτXμμτⅆτ

(9)

Equating to 0 its functional derivative with respect to the SpaceTimeVector,

Fundiff(S__rm, X[mu](sigma)) = 0;

mgμ,νμ,νXνσσ,σ+mδνμνμXννσσ,σ=0

(10)

Simplify((10));

2mXμμσσ,σ=0

(11)

This equation can also be computed directly from geometrical considerations as the geodesic for the current (Minkowski) metric

Geodesics(tensornotation);

Xμμττ,τ=0

(12)

Electrodynamics

Maxwell equations can be derived as the Lagrange equations for the corresponding Lagrangian. For this purpose, define the 4D electromagnetic potential and current Aμ and Jμ, and it is useful to define them directly as functions of the coordinates by indicating the functionality on the right-hand side of the defining equations:

Define(A[mu] = A[mu](X), J[mu] = J[mu](X));

Defined objects with tensor properties

Aμ,γμ,Jμ,σμ,μ,gμ,ν,εα,β,μ,ν,Xμ,SpaceTimeVectorμμτ

(13)

This form of definition tells the system that both Aμ and Jμ are functions of X so that you don't need to specify the dependency. Define the electromagnetic field tensor in terms of derivatives of Aμ

F[mu, nu] = d_[mu](A[nu]) - d_[nu](A[mu]);

Fμ,ν=μAννAμ

(14)

Define((14), quiet):

The Lagrangian (see ref.1, section 28):

L__EM := - F[mu, nu]^2/(16*Pi) - A[mu]*J[mu];

L__EMFμ,νFμ,νμ,ν16πAμJμμ

(15)

The two terms above have the same sign, the one of the timelike component of the signature in use (+++-).

The corresponding Lagrange equations

LagrangeEquations(L__EM, A);

4πJαα+AααμααAμμ=0

(16)

These equations can be rewritten in the usual form, in terms of the 4-divergence of the electromagnetic field tensor Fμ,ν:

F[definition];

Fμ,ν=μAννAμ

(17)

d_[nu](F[definition]);

νFμνμν=μνAννAμ

(18)

Isolate the second derivative of Aμ from the output (10) of LagrangeEquations and substitute into this expression (12) for the 4-divergence of Fμ,ν

isolate((16), d_[mu](d_[~alpha](A[~mu])));

μααAμμ=4πJαα+Aαα

(19)

Substitute((19), (18));

νFμνμν=4πJμ

(20)

The energy-momentum tensor can be computed as the Lagrange equations taking the metric as the coordinate, not equating to 0 the result, but multiplying δ Sδ gμ,νμ,ν by 2g. For that purpose, pass EnergyMomentum, with or without spacetime indices as an extra argument. Note however that the sector of the Lagrangian to be passed when computing the energy-momentum tensor may depend on physical considerations. For example, in electrodynamics, the action for the whole system has three terms, one for the free particles, another for their interaction with the electromagnetic field (2nd term in LEM, assuming Aμ and Jμ don't depend on the positions or velocities of the particles even if they are charged) and the one that determines the electromagnetic field itself (1st term in LEM).

The energy-momentum tensor Τμ,νμ,ν is then computed variating the action as a function of the coordinates of the particles but without variating Aμ or the trajectories of the particles which satisfy the equations of motion. Hence only the part of the Lagrangian that involves the electromagnetic tensor field Fμ,ν is considered for computing Tμ,ν (see ref.[1], sections 28 and 32)

L__F := select(has, L__EM, F);

L__FFμ,νFμ,νμ,ν16π

(21)

LagrangeEquations(L__F, EnergyMomentum[mu, nu]);

Τμ,ν=Fβ,αFβ,αβ,αgμ,ν16π+Fκ,μFνκνκ4π

(22)

To compute using the above as the definition for Tμ,ν, you can use the Define command

Define((22));

Defined objects with tensor properties

Aμ,γμ,Fμ,ν,Jμ,σμ,μ,gμ,ν,Τμ,ν,εα,β,μ,ν,Xμ,SpaceTimeVectorμμτ

(23)

After that, the system will know about the symmetry properties and components of Tμ,ν

EnergyMomentum[definition];

Τμ,ν=Fα,βFα,βα,βgμ,ν16π+Fκ,μFνκνκ4π

(24)

Quantum Mechanics

Schrodinger's equation, can also be derived from a Lagrangian, expressed in terms of a complex field ψX and an external potential VX. To use vectorial operators like the Gradient and Laplacian load the Physics:-Vectors package

with(Vectors);

&x,`+`,`.`,Assume,ChangeBasis,ChangeCoordinates,CompactDisplay,Component,Curl,DirectionalDiff,Divergence,Gradient,Identify,Laplacian,,Norm,ParametrizeCurve,ParametrizeSurface,ParametrizeVolume,Setup,Simplify,`^`,diff,int

(25)

interface(imaginaryunit = i);

I

(26)

macro(h = `ℏ`):

Set the real objects of the problem

CompactDisplay((psi, V)(X));

ψx,y,z,twill now be displayed asψ

Vx,y,z,twill now be displayed asV

(27)

Setup(realobjects = {h, m, V(X)});

realobjects=,m,φ,r,ρ,t,θ,x,y,z,V

(28)

The Lagrangian

L := 1/(2*m) * h^2 * Norm(%Gradient(psi(X)))^2 + 1/2*i*h*(diff(conjugate(psi(X)), t) * psi(X) - diff(psi(X), t) * conjugate(psi(X))) + V(X)*abs(psi(X))^2;

L2ψ22m+ψ&conjugate0;tψψ.ψ&conjugate0;2+Vψ2

(29)

Taking ψ as the coordinate,

LagrangeEquations(L, psi);

2mψ.+2Vψm2ψz,zψx,x2ψy,y2=0

(30)

Make the Laplacian explicit

(Laplacian = %Laplacian)(psi(X));

ψx,x+ψy,y+ψz,z=2ψ

(31)

simplify((30), {(31)});

2mψ.22ψ+2Vψm=0

(32)

Schrodinger's equation as usually presented in textbooks, with the time derivative isolated

i * h * isolate((32), diff(psi(X), t));

ψ.=22ψ2Vψm2m

(33)

The Lagrangian of a quantum system including a term G12ψ4 representing the atom-atom interaction between identical particles results in Gross-Pitaevskii equation

Setup(realobjects = G);

realobjects=,G,m,φ,r,ρ,t,θ,x,y,z,V

(34)

L__GP := L + G*abs(psi(X))^4/2;

L__GP2ψ22m+ψ&conjugate0;tψψ.ψ&conjugate0;2+Vψ2+Gψ42

(35)

The Gross-Pitaevskii equation

LagrangeEquations(L__GP, psi);

ψx,x2ψy,y22ψz,z+2mψ.+Vψ+Gψ2ψ&conjugate0;=0

(36)

As for Schrodinger's equation, make the Laplacian explicit

simplify((36), {(31)});

2mψ.22ψ+2mψGψ&conjugate0;ψ+V=0

(37)

The standard form of the Gross-Pitaevskii equation with the time derivative of ψ isolated

i*h*isolate((37), diff(psi(X), t));

ψ.=22ψ2mψGψ&conjugate0;ψ+V2m

(38)

Classical Field Theory

The λΦ4 model in classical field theory and corresponding field equations

CompactDisplay(Phi(X));

Φx,y,z,twill now be displayed asΦ

(39)

L := 1/2*d_[mu](Phi(X))*d_[mu](Phi(X)) - m^2/2*Phi(X)^2 + lambda/4*Phi(X)^4;

LμΦμμΦ2m2Φ22+λΦ44

(40)

Lagrange's equations

LagrangeEquations(L, Phi);

Φ3λΦm2Φ=0

(41)

The energy-momentum tensor can be computed as the Lagrange equations taking the metric as the coordinate, not equating to 0 the result, but multiplying δ Sδ gμ,νμ,ν by 2g. For that purpose, you can use the energymomentum keyword

LagrangeEquations(L, EnergyMomentum[mu, nu]);

Τμ,ν=λΦ44+m2Φ22ββΦβΦ2gμ,ν+μΦνΦ

(42)

To compute using the above as the definition for Tμ,ν, you can use the Define command

Define((42));

Defined objects with tensor properties

Aμ,γμ,Fμ,ν,Jμ,σμ,μ,gμ,ν,Τμ,ν,εα,β,μ,ν,Xμ,SpaceTimeVectorμμτ

(43)

After that, the system will know about the symmetry properties and components of Tμ,ν

EnergyMomentum[definition];

Τμ,ν=λΦ44+m2Φ22ββΦβΦ2gμ,ν+μΦνΦ

(44)

EnergyMomentum[];

Τμ,ν=λΦ44m2Φ22+Φx22Φy22Φz22+Φ.22ΦxΦyΦxΦzΦxΦ.ΦxΦyλΦ44m2Φ22Φx22+Φy22Φz22+Φ.22ΦyΦzΦyΦ.ΦxΦzΦyΦzλΦ44m2Φ22Φx22Φy22+Φz22+Φ.22ΦzΦ.ΦxΦ.ΦyΦ.ΦzΦ.λΦ44+m2Φ22+Φx22+Φy22+Φz22+Φ.22

(45)

The case of a scalar field in a curved spacetime is treated the same way. Set for instance an arbitrary metric

g_[arb];

_______________________________________________________

Setting lowercaselatin_is letters to represent space indices

The arbitrary metric in coordinates x,y,z,t

Signature: - - - +

_______________________________________________________

gμ,ν=f__1Xf__2Xf__3Xf__4Xf__2Xf__5Xf__6Xf__7Xf__3Xf__6Xf__8Xf__9Xf__4Xf__7Xf__9Xf__10X

(46)

For the action to be a scalar, the Lagrangian density now needs to be multiplied by the square root of the determinant of the metric

L := sqrt(-%g_[determinant]) * L;

L g μΦμμΦ2m2Φ22+λΦ44

(47)

The Lagrange equations

LagrangeEquations(L, Phi);

Φ3λΦm2κκκΦ=0

(48)

Comparing with the result for the same Lagrangian in a flat spacetime, we see the only difference is that the dAlembertian is now expressed in terms of covariant derivatives D_.

The EnergyMomentum tensor is computed in the same way as when the spacetime is flat

LagrangeEquations(L, EnergyMomentum[mu, nu]);

Τμ,ν=λΦ44+m2Φ22ββΦβΦ2gμ,ν+μΦνΦ

(49)

General Relativity

Einstein's equations too can be derived from a variational principle, and the problem concerns the case of a non-flat spacetime with metric gμ,ν, as for instance the arbitrary metric set lines above. In the Lagrangian formulation, the coordinates of the problem are the components of the metric gμ,ν, and the parameters are the spacetime coordinates. The simplest case is that of Einstein's equation in vacuum, for which the Lagrangian density is expressed in terms of the trace of the Ricci tensor by

L := sqrt(-%g_[determinant]) * Ricci[alpha, ~alpha];

L g Rαααα

(50)

Einstein's equations in vacuum:

LagrangeEquations(L, g_[~mu, ~nu]);

gμ,νμ,νRαααα2+Rμ,νμ,ν=0

(51)

where in the above instead of passing g as second argument, we passed gμ,ν to get the equations using those free indices. The tensorial equation computed is also the definition of the Einstein tensor

Einstein[~mu, ~nu, definition];

Gμ,νμ,ν=gμ,νμ,νRαααα2+Rμ,νμ,ν

(52)

The Lagrangian L used above to compute Einstein's equations contains first and second derivatives of the metric. To see that, rewrite it in terms of Christoffel symbols

L__C := convert(L, Christoffel);

L__C g gα,λα,λνΓνα,λνα,λλΓνα,ννα,ν+Γβα,λβα,λΓνβ,ννβ,νΓβα,νβα,νΓνβ,λνβ,λ

(53)

Recalling the definition

Christoffel[definition];

Γα,μ,ν=νgα,μ2+μgα,ν2αgμ,ν2

(54)

in LC the two terms containing derivatives of Christoffel symbols contain second order derivatives of gμ,ν. Nonetheless, it is always possible to add a total spacetime derivative to LC without changing Einstein's equations (assuming the variation of the metric in the corresponding boundary integrals vanishes), and in that way, in the particular case of LC, obtain a Lagrangian involving only 1st order derivatives. The total derivative, expressed using the inert  command to see it before the differentiation operation is performed, is

TD := %d_[alpha](g_[~mu, ~nu]*sqrt(-%g_[determinant])*(-Christoffel[~alpha, mu, nu] + g_[~alpha, mu]*Christoffel[~beta, nu, beta]));

(55)

Adding this term to LC, performing the  differentiation operation and simplifying we get

L__CTD := Simplify(L__C) + TD;

(56)

eval(L__CTD, %d_ = d_);

g Γα,βαα,βαΓχβ,χχβ,χΓα,β,χΓβ,α,χβ,α,χ+αΓβα,ββα,ββΓβααβαα+αgμ,νμ,ν g δμαμαΓββ,νββ,νΓαμ,ναμ,νgμ,νμ,νδμαμαΓββ,νββ,νΓαμ,ναμ,ν g gκ,λκ,λαgκ,λ2 g +gμ,νμ,ν g δμαμααΓββ,νββ,ναΓαμ,ναμ,ν

(57)

L__1 := Simplify((57));

L__1 g Γα,β,χΓβ,α,χβ,α,χΓα,βαα,βαΓβχχβχχ

(58)

which is a Lagrangian depending only on 1st order derivatives of the metric through Christoffel symbols. As expected, the equations of motion resulting from this Lagrangian are the same Einstein equations computed in (45)

LagrangeEquations(L__1, g_[~mu, ~nu]);

Rιιιιgμ,νμ,ν2+Rμ,νμ,ν=0

(59)

Note that L1 is no just LC after discarding the terms involving derivatives of Christoffel symbols. To see that, split LC into the two terms containing or not derivatives of Christoffel

L__22, L__11 := selectremove(has, expand(L__C), d_);

L__22,L__11 g gα,λα,λνΓνα,λνα,λ g gα,λα,λλΓνα,ννα,ν, g gα,λα,λΓβα,λβα,λΓνβ,ννβ,ν g gα,λα,λΓβα,νβα,νΓνβ,λνβ,λ

(60)

The total derivative TD is not just L22 but

TD = - L__22 - 2*L__11;

(61)

To verify this, take the left-hand side minus the right-hand side, evaluate the inert derivative  and simplify

(lhs - rhs)((61));

(62)

eval((62), %d_ = d_);

αgμ,νμ,ν g δμαμαΓββ,νββ,νΓαμ,ναμ,νgμ,νμ,νδμαμαΓββ,νββ,νΓαμ,ναμ,ν g gκ,λκ,λαgκ,λ2 g +gμ,νμ,ν g δμαμααΓββ,νββ,ναΓαμ,ναμ,ν+ g gα,λα,λνΓνα,λνα,λ g gα,λα,λλΓνα,ννα,ν+2 g gα,λα,λΓβα,λβα,λΓνβ,ννβ,ν2 g gα,λα,λΓβα,νβα,νΓνβ,λνβ,λ

(63)

Simplify((63));

0

(64)

That said, it is also true that TD=L222L11 results in the Lagrangian L1=L11, and since the equations of movement don't depend on the sign of the Lagrangian, for this Lagrangian LC adding the term TD happens to be equivalent to just discarding the terms involving derivatives of Christoffel symbols.

Finally, it is also possible to compute Einstein's equations from first principles, constructing the action,

S := Intc(L, X);

S g Rααααⅆxⅆyⅆzⅆt

(65)

and equating to zero the functional derivative with respect to the metric. To avoid displaying the resulting large expression, end the input line with ":"

EE__unsimplified := Fundiff(S, g_[alpha, beta]) = 0:

Simplifying this result, we get an expression in terms of Christoffel symbols and its derivatives

EEC := Simplify(EE__unsimplified);

EEC2Γχ,ι,κΓι,χ,κι,χ,κ2Γχ,ιχχ,ιχΓικκικκ2ιΓχχ,ιχχ,ι+2χΓχιιχιιgα,βα,β4+Γαχβαχβ+ΓβχαβχαΓχιιχιι4Γβχ,ιβχ,ιΓχ,α,ιχ,α,ι4Γχ,ιαχ,ιαΓι,β,χι,β,χ2+Γχα,βχα,βΓιχ,ιιχ,ι2Γαχ,ιαχ,ιΓχ,β,ιχ,β,ι4χΓχ,α,βχ,α,β2ααΓβχχβχχ4+ββΓχα,χχα,χ2ββΓαχχαχχ4+χΓα,β,χα,β,χ4+χΓβ,α,χβ,α,χ4=0

(66)

To rewrite this expression in terms of the Ricci tensor, consider its definition

Ricci[definition];

Rμ,ν=αΓαμ,ναμ,ννΓαμ,ααμ,α+Γβμ,νβμ,νΓαβ,ααβ,αΓβμ,αβμ,αΓαν,βαν,β

(67)

Rewrite this definition in terms of covariant derivatives D_, simplify and isolate one of them

convert((67), D_);

Rμ,ν=αΓαμ,ναμ,νΓαα,καα,κΓκμ,νκμ,ν+Γκα,μκα,μΓακ,νακ,ν+Γκα,νκα,νΓαμ,καμ,κνΓαα,μαα,μΓλμ,νλμ,νΓαα,λαα,λ+Γβμ,νβμ,νΓαα,βαα,βΓβα,μβα,μΓαβ,ναβ,ν

(68)

Simplify((68));

Rμ,ν=Γα,β,μΓβναβναΓβ,μ,νΓαα,βαα,β+αΓαμ,ναμ,ννΓα,μαα,μα

(69)

C_to_Ricci := isolate((69), D_[alpha](Christoffel[~alpha, mu, nu]));

C_to_RicciαΓαμ,ναμ,ν=Γα,β,μΓβναβνα+Γβ,μ,νΓαα,βαα,β+Rμ,ν+νΓα,μαα,μα

(70)

Analogously, derive an expression to rewrite covariant derivatives using the Riemann tensor

Riemann[~alpha, beta, mu, nu, definition];

Rαβ,μ,ναβ,μ,ν=μΓαβ,ναβ,ννΓαβ,μαβ,μ+Γαυ,μαυ,μΓυβ,νυβ,νΓαυ,ναυ,νΓυβ,μυβ,μ

(71)

convert((71), D_);

Rαβ,μ,ναβ,μ,ν=μΓαβ,ναβ,ν+Γκμ,νκμ,νΓαβ,καβ,κΓακ,μακ,μΓκβ,νκβ,ν+Γκβ,μκβ,μΓακ,νακ,ννΓαβ,μαβ,μΓλμ,νλμ,νΓαβ,λαβ,λΓλβ,νλβ,νΓαλ,μαλ,μ+Γαλ,ναλ,νΓλβ,μλβ,μ+Γαμ,υαμ,υΓυβ,νυβ,νΓαν,υαν,υΓυβ,μυβ,μ

(72)

Simplify((72));

Rαβ,μ,ναβ,μ,ν=Γακ,μακ,μΓκβ,νκβ,ν+Γκβ,μκβ,μΓακ,νακ,ν+μΓαβ,ναβ,ννΓαβ,μαβ,μ

(73)

C_to_Riemann := isolate((73), D_[mu](Christoffel[~alpha, beta, nu]));

C_to_RiemannμΓαβ,ναβ,ν=Γακ,μακ,μΓκβ,νκβ,νΓκβ,μκβ,μΓακ,νακ,ν+Rαβ,μ,ναβ,μ,ν+νΓαβ,μαβ,μ

(74)

Substitute these two equations, in sequence, into Einstein's equations expressed in terms of Christoffel symbols derived lines above

Substitute(C_to_Riemann, C_to_Ricci, EEC);

2Γχ,ι,κΓι,χ,κι,χ,κ2Γχ,ιχχ,ιχΓικκικκ2Γα4,α5,α6Γα6,α4,α5α6,α4,α5+2Γα4,α6α5α4,α6α5Γα6α5α4α6α5α42α5α5Γα4,α5α4α4,α5α4+2Γα1α1,α3α1α1,α3Γα3α2α2α3α2α22Γα1α3α2α1α3α2Γα3α1,α2α3α1,α2+2Rα2α2α2α2+2α2α2Γα1α1,α2α1α1,α2gα,βα,β4Rα,βα,β+Γα10α,βα10α,βΓα9α10,α9α9α10,α92Γα9,α10αα9,α10αΓα10,α9,βα10,α9,β2+Γβν,σβν,σΓσ,α,νσ,α,ν4ΓβσνβσνΓσνασνα4ΓαρβαρβΓρρ1ρ1ρρ1ρ14+Γαρρ1αρρ1Γρρ1βρρ1β4ΓβψαβψαΓψωωψωω4+ΓβψωβψωΓψωαψωα4+ΓτυατυαΓυτβυτβ2Γτ,α,βτ,α,βΓυτ,υυτ,υ2ΓαλμαλμΓλμβλμβ4+Γαλ,μαλ,μΓλ,β,μλ,β,μ4Γο,ζοο,ζοΓζ,α,βζ,α,β2+Γο,ζβο,ζβΓζ,α,οζ,α,ο2Γχ,ιαχ,ιαΓι,β,χι,β,χ2+Γαχβαχβ+ΓβχαβχαΓχιιχιι4ρ1ρ1Γαρ1βαρ1β4ωωΓβωαβωα4+ββΓα9α,α9α9α,α92+ννΓβναβνα4+μμΓαμβαμβ4ββΓυυαυυα2Γβχ,ιβχ,ιΓχ,α,ιχ,α,ι4+Γχα,βχα,βΓιχ,ιιχ,ι2Γαχ,ιαχ,ιΓχ,β,ιχ,β,ι4=0

(75)

Simplify to arrive at the traditional compact form

Simplify((75));

Rα,βα,β+Rχχχχgα,βα,β2=0

(76)

 

See Also

CompactDisplay, conjugate, d_, D_, dAlembertian, Fundiff, Geodesics, Gradient, isolate, Laplacian, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Physics[*], Ricci, Riemann, Setup, Simplify, simplify/siderels, Substitute, VariationalCalculus:-EulerLagrange, Vectors

References

  

[1] Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2, fourth revised English edition. Elsevier, 1975.

  

[2] Ohanian, H.C., and Ruffini, R. Gravitation and Spacetime, third edition. Cambridge, 2013

  

[3] Lovelock, D., and Rund, H. Tensors, Differential Forms and Variational Principles, Dover, 1989.