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

Online Help

All Products    Maple    MapleSim


Physics Updates for 2025

Maple provides a state-of-the-art environment for algebraic computations in Physics, with emphasis on ensuring that the computational experience is as natural as possible. The theme of the Physics project for Maple 2025 has been the consolidation of the functionality introduced in previous releases, speed-up of several key internal operations, and significant enhancements regarding functional differentiation, in flat and curved spacetimes. For that purpose a significant extension of the algorithms to simplify tensorial expressions in curved spaces was performed, specially for handling expressions involving non covariant derivatives of tensor fields as well as derivatives of Christoffel symbols.

 

As part of its commitment to providing the best possible computational environment in Physics, Maplesoft launched a Maple Physics: Research and Development website in 2014, which enabled users to download research versions of the package, ask questions, and provide feedback. The results from this accelerated exchange have been incorporated into the Physics package in Maple 2025. The presentation below illustrates both the novelties and the kind of mathematical formulations that can now be performed.

 

Lagrange Equations and simplification of tensorial expressions in curved spacetimes

Linearized Gravity

Relative Tensors

New Physics:-Library commands

See Also

Lagrange Equations and simplification of tensorial expressions in curved spacetimes

 

LagrangeEquations is a Physics command introduced in 2023 taking advantage of the functional differentiation capabilities of the Physics package . This command can handle tensors and vectors of the Physics package as well as derivatives using vectorial differential operators (see d_ and Nabla), works by performing functional differentiation (see Fundiff), and handles 1st, and higher order derivatives of the coordinates in the Lagrangian automatically. LagrangeEquations receives an expression representing a Lagrangian and returns a sequence of Lagrange equations with as many equations as coordinates are indicated. The number of parameters can also be many. For example, in electrodynamics, the "coordinate" is a tensor field Aμx,y,z,t, there are then four coordinates, one for each of the values of the index μ, and there are four parameters x,y,z,t.

 

New in Maple 2025, the "coordinates" can now also be the components of the metric tensor in a curved spacetime, in which case the equations returned are Einstein's equations. Also new, instead of a coordinate or set of them, you can pass the keyword EnergyMomentum, in which case the output is the conserved energy-momentum tensor of the physical model represented by the given Lagrangian L.

 

Examples

 

withPhysics:

Setupmathematicalnotation=true,coordinates=cartesian

coordinatesystems=X,mathematicalnotation=true

(1)

The λΦ4 model in classical field theory and corresponding field equations, as in previous releases

CompactDisplayΦX

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

(2)

L12d_μΦXd_μΦXm22ΦX2+λ4ΦX4

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

(3)

Lagrange's equations

LagrangeEquationsL,Φ

Φ3λΦm2Φ=0

(4)

New: 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 the variation of the action δ Sδ gμ,νμ,ν by 2 g  (in flat spacetimes g =1). For that purpose, you can use the EnergyMomentum keyword. You can optionally indicate the indices to be used in the output as well as their covariant or contravariant character

LagrangeEquationsL,EnergyMomentumμ,ν

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

(5)

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

Define

Defined objects with tensor properties

γμ,σμ,μ,gμ,ν,Τμ,ν,εα,β,μ,ν,Xμ

(6)

After which the system knows about the symmetry properties and the components of Tμ,ν

EnergyMomentumdefinition

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

(7)

Library:-IsTensorialSymmetricEnergyMomentummu,nu

true

(8)

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

(9)

New: LagrangeEquations takes advantage of the extension of Fundiff to compute functional derivatives in curved spacetimes introduced for Maple 2025, and so it also handles the case of a scalar field in a curved spacetime. 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

(10)

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

Lsqrt%g_determinantL

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

(11)

New: With the extension of the tensorial simplification algorithms for curved spacetimes, the Lagrange equations can be computed arriving directly to the compact form

LagrangeEquationsL,Φ

Φ3λΦm2κκκΦ=0

(12)

Comparing with the result (4) 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

LagrangeEquationsL,EnergyMomentumμ,ν

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

(13)

General Relativity

 

New: the most significant development in LagrangeEquations is regarding General Relativity. It can now compute Einstein's equations directly from the Lagrangian, not using tabulated cases, and properly handling several (traditional or not) alternative ways of presenting the Lagrangian.

 

Einstein's equations concern the case of a curved spacetime with metric gμ,ν as, for instance, the general case of an arbitrary metric set lines above. In the Lagrangian formulation, the coordinates of the problem are the components of the metric gμ,ν, and as in the case of electrodynamics the parameters are the spacetime coordinates X α. 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

Lsqrt%g_determinantRicciα,~alpha

L g Rαααα

(14)

Einstein's equations in vacuum:

LagrangeEquationsL,g_μ,ν

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

(15)

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

Einsteindefinition

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

(16)

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

L__CconvertL,Christoffel

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

(17)

Recalling the definition

Christoffeldefinition

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

(18)

in LC the two terms containing derivatives of Christoffel symbols contain second order derivatives of gμ,ν. Now, 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 this 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_αg_~mu,~nusqrt%g_determinantChristoffel~alpha,μ,ν+g_~alpha,μChristoffel~beta,ν,β

(19)

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

L__1L__C+TD

(20)

L__1   evalL__1,%d_=d_

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

(21)

L__1SimplifyL__1  

L__1Γα,β,κΓβ,α,κβ,α,κΓα,βαα,βαΓβκκβκκ g

(22)

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 (15)

LagrangeEquationsL__1,g_μ,ν

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

(23)

To illustrate the new Maple 2025 tensorial simplification capabilities note that L1 is no just LC ≡ (17) after discarding its two terms involving derivatives of Christoffel symbols. To verify this, split LC into the terms containing or not derivatives of Christoffel

L__22,L__11selectremovehas,expandL__C,d_

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

(24)

Comparing, the total derivative TDh (19) is not just L22, but

TD=L__222L__11

(25)

Things like these, TD=L__222L__11, can now be verified directly with the new tensorial simplification capabilities: take the left-hand side minus the right-hand side, evaluate the inert derivative  and simplify to see the equality is true

(26)

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

(27)

Simplify

0

(28)

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 of L__C involving derivatives of Christoffel symbols.

 

Also new in Maple 2025, due to the extension of Fundiff to compute in curved spacetimes, it is now also possible to compute Einstein's equations from first principles by constructing the action,

SIntcL,X

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

(29)

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__unsimplifiedFundiffS,g_α,β=0:

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

EECSimplifyEE__unsimplified

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

(30)

In this result, we see derivatives of Christoffel symbols, expressed using the D_ command for covariant differentiation. Although, such objects have not the geometrical meaning of a covariant derivative, computationally, they here represent what would be a covariant derivative if the Christoffel symbols were a tensor. For example,

χΓα,β,χα,β,χ :

% = expand%

χΓα,β,χα,β,χ=χΓα,β,χα,β,χ+Γαχ,μαχ,μΓμ,β,χμ,β,χ+Γβχ,μβχ,μΓα,χ,μα,χ,μ+Γχχ,μχχ,μΓα,β,μα,β,μ

(31)

With this computational meaning for the derivatives of Christoffel symbols appearing in (30), rewrite EEC(30) in terms of the Ricci and Riemann tensors. For that, consider the definition

Riccidefinition

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

(32)

Rewrite the noncovariant derivatives  in terms of derivatives using the computational representation (31), simplify and isolate one of them

convert,D_

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

(33)

Simplify

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

(34)

C_to_Ricciisolate,D_αChristoffel~alpha,μ,ν

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

(35)

Analogously, derive an expression to rewrite derivatives of Christoffel symbols using the Riemann tensor

Riemann~alpha,β,μ,ν,definition

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

(36)

convert,D_

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

(37)

Simplify

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

(38)

C_to_Riemannisolate,D_μChristoffel~alpha,β,ν

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

(39)

Substitute these two equations, in sequence, into Einstein's equations EECh(30)

SubstituteC_to_Riemann,C_to_Ricci,EEC

ΓβψαβψαΓψωωψωω4+ΓβψωβψωΓψωαψωα4+Γαλ,μαλ,μΓλ,β,μλ,β,μ4ΓαλμαλμΓλμβλμβ4+Γβν,σβν,σΓσ,α,νσ,α,ν4ΓβσνβσνΓσνασνα4+Γο,ζβο,ζβΓζ,α,οζ,α,ο2Γο,ζοο,ζοΓζ,α,βζ,α,β2Rα,βα,βΓτ,α,βτ,α,βΓυτ,υυτ,υ2Γχ,ιαχ,ιαΓι,β,χι,β,χ2+Γαχβαχβ+ΓβχαβχαΓχιιχιι4+ΓυτβυτβΓτυατυα2Γβχ,ιβχ,ιΓχ,α,ιχ,α,ι4+Γχα,βχα,βΓιχ,ιιχ,ι2Γαχ,ιαχ,ιΓχ,β,ιχ,β,ι4ρ1ρ1Γαρ1βαρ1β4+μμΓαμβαμβ4+ννΓβναβνα4ββΓυυαυυα2ωωΓβωαβωα4+ββΓα9α,α9α9α,α92ΓαρβαρβΓρρ1ρ1ρρ1ρ14+Γαρρ1αρρ1Γρρ1βρρ1β4+Γα10α,βα10α,βΓα9α10,α9α9α10,α92Γα9,α10αα9,α10αΓα10,α9,βα10,α9,β2+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α,βα,β4=0

(40)

Simplify to arrive at the traditional compact form of Einstein's equations

Simplify

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

(41)

 

Linearized Gravity

 

Generally speaking, linearizing gravity is about discarding in Einstein's field equations the terms that are quadratic in the metric and its derivatives, an approximation valid when the gravitational field is weak (the deviation from a flat Minkowski spacetime is small). Linearizing gravity is used, e.g. in the study of gravitational waves. In the context of Maple's Physics, the formulation of linearized gravity can be done using the general relativity tensors that come predefined in Physics plus a new in Maple 2025 Physics:-Library:-Linearize command.

 

In what follows it is shown how to linearize the Ricci tensor and through it Einstein's equations. To compare results, see for instance the Wikipedia page for Linearized gravity. Start setting coordinates, you could use Cartesian, spherical, cylindrical, or define your own.

restart;withPhysics:  Setupcoordinates = cartesian  

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

_______________________________________________________

coordinatesystems=X

(42)

The default metric when Physics is loaded is the Minkowski metric, representing a flat (no curvature) spacetime

g_

gμ,ν=−10000−10000−100001

(43)

The weakly perturbed metric


Suppose you want to define a small perturbation around this metric. For that purpose, define a perturbation tensor hμ,ν, that in the general case depends on the coordinates and is not diagonal, the only requirement is that it is symmetric (to have it diagonal, change symmetric by diagonal; to have it constant, change δi,jX by δi,j)

hmu,nu = Matrix4,i,j  deltai,jX ,shape=symmetric

hμ,ν=δ1,1Xδ1,2Xδ1,3Xδ1,4Xδ1,2Xδ2,2Xδ2,3Xδ2,4Xδ1,3Xδ2,3Xδ3,3Xδ3,4Xδ1,4Xδ2,4Xδ3,4Xδ4,4X

(44)

In the above it is understood that δ__i,j1, so that quadratic or higher powers of it or its derivatives can be approximated to 0 (discarded). Define the components of h__μ,ν accordingly

Define

Defined objects with tensor properties

γμ,σμ,μ,gμ,ν,hμ,ν,εα,β,μ,ν,Xμ

(45)

Define also a tensor η__μ,ν representing the unperturbed Minkowski metric

etamu,nu = rhs

ημ,ν=−10000−10000−100001

(46)

Define

Defined objects with tensor properties

γμ,σμ,μ,ημ,ν,gμ,ν,hμ,ν,εα,β,μ,ν,Xμ

(47)

The weakly perturbed metric is given by

g_mu,nu = etamu,nu + hmu,nu

gμ,ν=ημ,ν+hμ,ν

(48)

Make this be the definition of the metric

Define

_______________________________________________________

Coordinates: x,y,z,t. Signature: - - - +

_______________________________________________________

gμ,ν=1+δ1,1Xδ1,2Xδ1,3Xδ1,4Xδ1,2X1+δ2,2Xδ2,3Xδ2,4Xδ1,3Xδ2,3X1+δ3,3Xδ3,4Xδ1,4Xδ2,4Xδ3,4X1+δ4,4X

_______________________________________________________

Setting lowercaselatin_is letters to represent space indices

Defined objects with tensor properties

μ,γμ,σμ,Rμ,ν,Rμ,ν,α,β,Cμ,ν,α,β,μ,ημ,ν,gμ,ν,γi,j,hμ,ν,Γμ,ν,α,Gμ,ν,εα,β,μ,ν,Xμ

(49)

 

Linearizing the Ricci tensor


The linearized form of the Ricci tensor is computed by introducing this weakly perturbed metric (48) in the expression of the Ricci tensor as a function of the metric. This can be accomplished in different ways, the simpler being to use the conversion network between tensors, but for illustration purposes, showing steps one at time, a substitution of definitions one into the other one is used

Riccidefinition 

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

(50)

Christoffel~alpha,mu,nu,definition

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

(51)

Substitute, 

Rμ,ν=αgα,κα,κνgκ,μ+μgκ,νκgμ,ν2νgα,τα,τμgτ,α+αgτ,μτgα,μ2+gβ,ιβ,ινgι,μ+μgι,νιgμ,νgα,λα,λβgλ,α+αgλ,βλgα,β4gβ,ωβ,ωμgω,α+αgω,μωgα,μgα,χα,χνgχ,β+βgχ,νχgβ,ν4

(52)

Introducing (48)gμ,ν=ημ,ν+hμ,ν, and also the inert form of the Ricci tensor to facilitate simplification some steps below,

Substitute,Ricci = %Ricci, 

Rμ,ν=αηα,κα,κ+hα,κα,κνηκ,μ+hκ,μ+μηκ,ν+hκ,νκημ,ν+hμ,ν2+ηα,κα,κ+hα,κα,κανηκ,μ+hκ,μ+αμηκ,ν+hκ,νακημ,ν+hμ,ν2νηα,τα,τ+hα,τα,τμηα,τ+hα,τ+αημ,τ+hμ,ττηα,μ+hα,μ2ηα,τα,τ+hα,τα,τμνηα,τ+hα,τ+ανημ,τ+hμ,τντηα,μ+hα,μ2+ηβ,ιβ,ι+hβ,ιβ,ινηι,μ+hι,μ+μηι,ν+hι,νιημ,ν+hμ,νηα,λα,λ+hα,λα,λβηα,λ+hα,λ+αηβ,λ+hβ,λληα,β+hα,β4ηβ,ωβ,ω+hβ,ωβ,ωμηα,ω+hα,ω+αημ,ω+hμ,ωωηα,μ+hα,μηα,χα,χ+hα,χα,χνηβ,χ+hβ,χ+βηχ,ν+hχ,νχηβ,ν+hβ,ν4

(53)

This expression contains several terms quadratic in the small perturbation h__μ,ν and its derivatives. The new in Maple 2025 routine to filter out those terms is Physics:-Library:-Linearize, which requires specifying the symbol representing the small quantities

Library:-Linearize,h 

Rμ,ν=ηα,τα,τντhα,μ2ηα,τα,τμνhα,τ2ηα,κα,κακhμ,ν2+ηα,κα,κανhκ,μ2+ηα,κα,καμhκ,ν2ηα,τα,τανhμ,τ2

(54)

Important: in this result, η__μ,ν is the flat Minkowski metric, not the perturbed metric gμ,ν. However, in the context of a linearized formulation, η__μ,ν raises and lowers tensor indices the same way as gμ,ν. Hence, to further simplify contracted products of ημ,ν in (54) , it is practical to reintroduce g__μ,νrepresenting that Minkowski metric and simplify using the internal algorithms for a flat metric

g_min

_______________________________________________________

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

Signature: - - - +

_______________________________________________________

gμ,ν=−10000−10000−100001

(55)

To proceed simplifying, replace in the expression (54) for the Ricci tensor the intermediate Minkowski η__μ,νby g__μ,ν

subseta = g_,

Rμ,ν=gα,τα,τντhα,μ2gα,τα,τμνhα,τ2gα,κα,κακhμ,ν2+gα,κα,κανhκ,μ2+gα,κα,καμhκ,ν2gα,τα,τανhμ,τ2

(56)

Simplifying, results in the linearized form of the Ricci tensor shown in the Wikipedia page for Linearized gravity.

Simplify 

Rμ,ν=μνhττττ2hμ,ν2+ντhμτμτ2+μτhντντ2

(57)

Linearizing Einstein's equations

Einstein's equations are the components of Einstein's tensor, whose definition in terms of the Ricci tensor is

Einsteindefinition

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

(58)

Compute the trace Rαααα directly from the linearized form (57) of the Ricci tensor,

g_mu,nu  

Rμ,νgμ,νμ,ν=μνhττττ2hμ,ν2+ντhμτμτ2+μτhντντ2gμ,νμ,ν

(59)

Simplify

Rνννν=hαααα+ατhα,τα,τ

(60)

The linearized Einstein equations are constructed reproducing the definition (58) using (57) and (60)

  12g_mu,nu

Rμ,νgμ,νRαααα2=μνhττττ2hμ,ν2+ντhμτμτ2+μτhντντ2gμ,νhαααα+ατhα,τα,τ2

(61)

which is the same formula shown in the Wikipedia page for Linearized gravity.


You can now redefine the general hμ,ν introduced in (44) in different ways (see discussion in the Wikipedia page), or, depending on the case, just substitute your preferred gauge in this formula (61) for the general case. For example, the condition for the Harmonic gauge also known as Lorentz gauge reduces the linearized field equations to their simplest form

d_muh~mu,nu=12d_nuhalpha,alpha

μhμνμν=νhαααα2

(62)

Substitute,

Rμ,νgμ,νRαααα2=μνhττττ2hμ,ν2+νμhλλλλ22+μνhκκκκ22gμ,νhαααα+αααhββββ22

(63)

Simplify  

Rμ,νgμ,νRαααα2=hμ,ν2+hααααgμ,ν4

(64)

Relative Tensors

 

In General Relativity, the context of a curved spacetime, it is sometimes necessary to work with relative tensors, for which the transformation rule under a transformation of coordinates involves powers of the determinant of the transformation - see Chapter 4 of  "Lovelock, D., and Rund, H. Tensors, Differential Forms and Variational Principles, Dover, 1989." Physics in Maple 2025 includes a complete, new implementation of relative tensors.

 

To indicate that a tensor being defined is relative pass its relative weight. For example, set a curved spacetime,

restart;withPhysics:g_sc;

_______________________________________________________

Systems of spacetime coordinates are:X=r,θ,φ,t

Default differentiation variables for d_, D_ and dAlembertian are:X=r,θ,φ,t

Setting lowercaselatin_is letters to represent space indices

The Schwarzschild metric in coordinates r,θ,φ,t

Parameters: m

Signature: - - - +

_______________________________________________________

gμ,ν=r2mr0000r20000r2sinθ20000r2mr

(65)

Define now two tensors of one index, one of them being relative

DefineTμ

Defined objects with tensor properties

μ,γμ,σμ,Rμ,ν,Rμ,ν,α,β,Tμ,Cμ,ν,α,β,μ,gμ,ν,γi,j,Γμ,ν,α,Gμ,ν,εα,β,μ,ν,Xμ

(66)

DefineRμ,relativeweight=1

Defined objects with tensor properties

μ,γμ,σμ,Rμ,Rμ,ν,Rμ,ν,α,β,Tμ,Cμ,ν,α,β,μ,gμ,ν,γi,j,Γμ,ν,α,Gμ,ν,εα,β,μ,ν,Xμ

(67)

Transformation of Coordinates

 

Consider a transformation of coordinates, from spherical r,θ,φ,t to  ρ,θ,φ,t where

TRr=1+m2ρ2ρ

TRr=1+m2ρ2ρ

(68)

The transformed components of Tμ and Rμ are, respectively,

TransformCoordinatesTR,Tμ,ρ,θ,φ,t

m24ρ2T14ρ2T2T3T4

(69)

TransformCoordinatesTR,Rμ,ρ,θ,φ,t

m24ρ22R116ρ4m24ρ2R24ρ2m24ρ2R34ρ2m24ρ2R44ρ2

(70)

where, when comparing both results, we see that the transformed components for Rμ are all multiplied by J n with n=1 and J is the determinant of the transformation:

J__matrixsimplifyVectorCalculus:-JacobianrhsTR,θ,φ,t,ρ,θ,φ,t

J__matrixm2+4ρ24ρ2000010000100001

(71)

J=LinearAlgebra:-DeterminantJ__matrix

J=m2+4ρ24ρ2

(72)

Relative weight

 

The relative weight of a scalar, tensor or tensorial expression can be computed using the Physics:-Library:-GetRelativeWeight command. For the two tensors Tμ and Rμ used above,

Library:-GetRelativeWeightTmu

0

(73)

Library:-GetRelativeWeightRmu 

1

(74)

The relative weight of a tensor does not depend on the covariant or contravariant character of its indices

Library:-GetRelativeWeightR~mu  

1

(75)

The LeviCivita tensor is a special case, has its relative weight defined when Physics is loaded, and because in a curved spacetime it is not a tensor its relative weight depends on the covariant or contravariant character of its indices

Library:-GetRelativeWeightLeviCivitaalpha, beta, mu,nu  

−1

(76)

Library:-GetRelativeWeightLeviCivita~alpha, ~beta, ~mu,~nu   

1

(77)

The relative weight w of a product is equal to the sum of relative weights of each factor

Rmu2

RμRμμ

(78)

Library:-GetRelativeWeight

2

(79)

The relative weight w of a power is equal to the relative weight of the base multiplied by the power

 1Rmu2

1RμRμμ

(80)

Library:-GetRelativeWeight

−2

(81)

The relative weight w of a sum is equal to the relative weight of one of its terms and exists if all the terms have the same w.

R~mu + LeviCivita~alpha, ~beta, ~mu,~nuTalpha Tbeta Tnu

εα,β,μ,να,β,μ,νTαTβTν+Rμμ

(82)

Library:-GetRelativeWeight

1

(83)

The relative weight of any determinant is always equal to 2

%g_determinant

g

(84)

Library:-GetRelativeWeight 

2

(85)

Relative Term in covariant derivatives

 

When computing the covariant derivative of a relative scalar, tensor or tensorial expression that has non-zero relative weight w, a relative term is added, that can be computed using the Physics:-Library:-GetRelativeWeight command.

g__det  %g_:-determinant;

g__det g

(86)

Library:-GetRelativeTermg__det, mu;

2Γνμ,ννμ,ν g

(87)
  

Consequently,

%D_mu = D_mug__det;

μ g =0

(88)
  

To understand this zero value on the right-hand side, express the left-hand side in terms of d_

convert,d_ 

μ g 2Γαα,μαα,μ g =0

(89)
  

evaluate the inert %d_

factoreval,%d_=d_ 

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

(90)
  

The factor in parentheses is equal to gα,να,νμgα,ν, where the covariant derivative of the metric is equal to zero, so

Simplify 

0=0

(91)
  

Consider the covariant derivative of Tμ and Rμ defined in (66) and (67)

Library:-GetRelativeWeightTmu

0

(92)

Library:-GetRelativeWeightRmu 

1

(93)

The corresponding covariant derivatives

%D_mu = D_muTmuX; 

μTμμX=μTμμX

(94)

expand

μTμμX=2TμμXμrr+μθcosθTμμXsinθ+μTμμX

(95)

%D_mu = D_muRmuX; 

μRμμX=μRμμX

(96)

expand

μRμμX=2RμμXμrr+μθcosθRμμXsinθ+μRμμXΓνμ,ννμ,νRμμX

(97)

where in the above we see the additional (relative) term

Library:-GetRelativeTermR~muX,mu

Γνμ,ννμ,νRμμX

(98)

 

New Physics:-Library commands

 

ConvertToF, Linearize, GetRelativeTerm, GetRelativeWeight.

 

Examples

 

• 

ConvertToF receives an algebraic expression involving tensors and/or tensor functions and rewrites them in terms of the tensor of name F when that is possible. This routine is similar, however more general than the standard convert which only handles the existing conversion network for the tensors of General Relativity in that ConvertToF also uses any tensor definition you introduce using Define, expressing a tensor in terms of others.

Load any curved spacetime metric automatically setting the coordinates

 

restart;withPhysics:g_sc;

gμ,ν=r2mr0000r20000r2sinθ20000r2mr

(99)

 

For example, rewrite the Christoffel symbols in terms of the metric g_; this works as in previous releases

Christoffelμ, α, β = Library:-ConvertToFChristoffelμ, α, β, g_;

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

(100)

Define a Aμ representing the 4D electromagnetic potential as a function of the coordinates X and Fμ,ν representing the electromagnetic field tensors

DefineAμ = AμX, quiet;

Aμ,μ,γμ,σμ,Rμ,ν,Rμ,ν,α,β,Cμ,ν,α,β,μ,gμ,ν,γi,j,Γμ,ν,α,Gμ,ν,εα,β,μ,ν,Xμ

(101)

DefineFμ, ν = d_μAν  d_νAμ;

Defined objects with tensor properties

Aμ,μ,γμ,Fμ,ν,σμ,Rμ,ν,Rμ,ν,α,β,Cμ,ν,α,β,μ,gμ,ν,γi,j,Γμ,ν,α,Gμ,ν,εα,β,μ,ν,Xμ

(102)

Rewrite the following expression in terms of the electromagnetic potential Aμ

Fμ, ν = Library:-ConvertToFFμ, ν, A;

Fμ,ν=μAννAμ

(103)

In the example above, the output is similar to this other one

Fdefinition;

Fμ,ν=μAννAμ

(104)

The rewriting, however, works also with tensorial expressions

Fmu, nu*Amu*Anu

Fμ,νAμμAνν

(105)

Library:-ConvertToF, A;

μAννAμAμμAνν

(106)
• 

Linearize receives a tensorial expression T and an indication of the small quantities h in T , and discards terms quadratic or of higher order in h. For an example of this new routine in action, see the section Linearized Gravity above.

• 

GetRelativeTerm and GetRelativeWeight are illustrated in the section Relative Tensors above.

 

See Also

Index of New Maple 2025 Features, Physics , Computer Algebra for Theoretical Physics, The Physics project, The Physics Updates