Physics for Maple 2018 - 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 : Updates : Physics for Maple 2018

Physics

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 2018 has been the consolidation of the functionality introduced in previous releases, together with significant enhancements, mainly in the handling of differential (quantum or not) tensorial operators, new ways to minimize the number of tensor components taking its symmetries into account, automatic handling of collision of indices in tensorial expressions, automatic setting of the EnergyMomentum tensor when loading solutions to Einstein's equations from the database of solutions, automatic setting of the algebras for the Dirac, Pauli and Gell-Mann matrices when Physics is loaded, simplification of Dirac matrices, a new package Physics:-Cactus related to Numerical Relativity and several other improvements.

Taking all together, there are more than 300 enhancements throughout the entire package, increasing robustness, versatility and functionality, extending once more the range of Physics-related algebraic computations that can be done using computer algebra software, and in a natural way.


As part of its commitment to providing the best possible environment for algebraic computations in Physics, Maplesoft launched a Maple Physics: Research and Development web site with Maple 18, which enabled users to download research versions, ask questions, and provide feedback. The results from this accelerated exchange with people around the world have been incorporated into the Physics package in Maple 2018.

Automatic handling of collision of tensor indices in products

User defined algebraic differential operators

The Physics:-Cactus package for Numerical Relativity

Automatic setting of the EnergyMomentumTensor for metrics of the database of solutions to Einstein's equations

Minimize the number of tensor components according to its symmetries, relabel, redefine or count the number of independent tensor components

New functionality and display for inert names and inert tensors

Automatic setting of Dirac, Pauli and Gell-Mann algebras

Simplification of products of Dirac matrices

New Library routines to perform matrix operations in expressions involving spinors with omitted indices

Miscellaneous improvements

Automatic handling of collision of tensor indices in products

 

The design of products of tensorial expressions that have contracted indices got enhanced. The idea: repeated indices in certain subexpressions are actually dummies. So suppose Ta,b and Bb are tensors, then in Ttrace=Taaaa, a is just dummy, therefore TaaaaBa=TbbbbBa is a well defined object. The new design automatically maps input like TaaaaBa into TbbbbBa.

restart;

withPhysics: Setupspacetimeindices=lowercaselatin, quiet

spacetimeindices=lowercaselatin

(1)

DefineTa,b, Bb

Defined objects with tensor properties

Bb,γa,σa,Ta,b,a,ga,b,δa,b,εa,b,c,d

(2)

This shows the automatic handling of collision of indices

Ta,a Ba

TbbbbBa

(3)

Ta,a2

TaaaaTbbbb

(4)

Consider now the case of three tensors

DefineAa,Ca

Defined objects with tensor properties

Aa,Bb,Ca,γa,σa,Ta,b,a,ga,b,δa,b,εa,b,c,d

(5)

Aa Ba Ca

AaBaCa

(6)

The product above has indeed the index a repeated more than once, therefore none of its occurrences got automatically transformed into contravariant in the output, and Check detects the problem interrupting with an error message

Check

Error, (in Physics:-Check) wrong use of the summation rule for repeated indices: `a repeated 3 times`, in A[a]*B[a]*C[a]

 

However, it is now also possible to indicate, using parenthesis, that the product of two of these tensors actually form a subexpression, so that the following two tensorial expressions are well defined, where the dummy is automatically replaced making that explicit

Aa  Ba Ca

AbBbbCa

(7)

AaBa  Ca

AaBbCbb

(8)

 

This change in design makes concretely simpler the use of indices in that it eliminates the need for manually replacing dummies. For example, consider the tensorial expression for the angular momentum in terms of the coordinates and momentum vectors, in 3 dimensions

Setupcoordinates = cartesian, dimension = 3,  metric = euclidean,quiet

coordinatesystems=X,dimension=3,metric=1,1=1,2,2=1,3,3=1

(9)

Define Lj,pk respectively representing angular and linear momentum

DefineLj,pk

Defined objects with tensor properties

γa,Lj,σa,Xa,a,ga,b,pk,δa,b,εa,b,c

(10)

Introduce the tensorial expression for La

La = LeviCivitaa,b,cXb pc

La=εa,b,cXbpc

(11)

The left-hand side has one free index, a, while the right-hand side has two dummy indices b and c

Check,all

The repeated indices per term are: ...,...,...; the free indices are: ...

,a=b,c,a

(12)

If we want to compute L2=La2 we can now take the square of (11) directly, and the dummy indices on the right-hand side are automatically handled, there is now no need to manually substitute the repeated indices to avoid their collision

2

La2=εa,b,cXbpcεa,d,eXdpe

(13)

The repeated indices on the right-hand side are now a,b,c,d,e

Check, all

The repeated indices per term are: ...,...,...; the free indices are: ...

a,=a,b,c,d,e,

(14)

User defined algebraic differential operators

 

A new keyword in Setup: differentialoperators, allows for defining differential operators (not necessarily linear) with respect to indicated differentiation variables, so that they are treated as noncommutative operands in products, as we do with paper and pencil. These user-defined differential operators can also be vectorial and/or tensorial or inert. When desired, one can use Library:-ApplyProductOfDifferentialOperators to transform the products in the function application of these operators. This new functionality is a generalization of the differential operators μ and μ, and can used beyond Physics.

A new routine Library:-GetDifferentiationVariables also acts on a differential operator and tells who are the corresponding differentiation variables

Example:

In Quantum Mechanics, in the coordinates representation, the component of the momentum operator along the x axis is given by the differential operator


 p__x=i ℏx  

 

The purpose of the exercises below is thus to derive the commutation rules, in the coordinates representation, between an arbitrary function of the coordinates and the related momentum, departing from the differential representation

 

pn=in

%Commutatorgx,y,z,p_= ℏ FX

restart:withPhysics:withPhysicsVectors:interfaceimaginaryunit = i:

 

Start setting the problem:

– 

 all ofx,y,z,p__x,p__y,p__z are Hermitian operators

– 

 all of x,y,z commute between each other

– 

 tell the system only that the operators x, y, z  are the differentiation variables of the corresponding (differential) operators p__x,p__y,p__z but do not tell what is the form of the operators

 

Setupmathematicalnotation = true,differentialoperators=p_,x,y,z,hermitianoperators=p,x,y,z,algebrarules=%Commutatorx,y=0,%Commutatorx,z=0,%Commutatory,z=0,quiet

algebrarules=%Commutatorx,y=0,%Commutatorx,z=0,%Commutatory,z=0,differentialoperators=p_,x,y,z,hermitianoperators=p,x,y,z,mathematicalnotation=true

(15)

Assuming FX is a smooth function, the idea is to apply the commutator %CommutatorFX,p_ to an arbitrary ket of the Hilbert space Ketψ,x,y,z, perform the operation explicitly after setting a differential operator representation for p, and from there get the commutation rule between FX and p.

 

Start introducing the commutator, to proceed with full control of the operations we use the inert form %Commutator

aliasX = x,y,z:

CompactDisplayFX

FXwill now be displayed asF

(16)

%CommutatorFX,p_Ketψ,X

`*`%CommutatorFX,p_,Ketψ,x,y,z

(17)

For illustration purposes only (not necessary), expand this commutator

=expand

`*`%CommutatorFX,p_,Ketψ,x,y,z=`*`FX,p_,Ketψ,x,y,z`*`p_,FX,Ketψ,x,y,z

(18)

Note that  p, FX and the ket Ketψ,x,y,z are operands in the products above and that they do not commute: we indicated that the coordinates x, y, z are the differentiation variables of p. This emulates what we do when computing with these operators with paper and pencil, where we represent the application of a differential operator as a product operation.

 

This representation can be transformed into the (traditional in computer algebra) application of the differential operator when desired, as follows:

=Library:-ApplyProductsOfDifferentialOperators

`*`%CommutatorFX,p_,Ketψ,x,y,z=`*`FX,p_Ketψ,x,y,zp_`*`FX,Ketψ,x,y,z

(19)

Note that, in pFXKetψ,x,y,z, the application of p is not expanded: at this point nothing is known about  p , it is not necessarily a linear operator. In the Quantum Mechanics problem at hands, however, it is. So give now the operator  p an explicit representation as a linear vectorial differential operator (we use the inert form %Nabla, , to be able to proceed with full control one step at a time)

p_f%Nablaf

pff

(20)

The expression (19) becomes

`*`%CommutatorFX,p_,Ketψ,x,y,z=`*`FX,%NablaKetψ,x,y,z+%Nabla`*`FX,Ketψ,x,y,z

(21)

Activate now the inert operator  and simplify taking into account the algebra rules for the coordinate operators %Commutatorx,y=0,%Commutatorx,z=0,%Commutatory,z=0

Simplifyvalue

`*`CommutatorFX,p_,Ketψ,x,y,z=_i`*`diffFX,x,Ketψ,x,y,z+_j`*`diffFX,y,Ketψ,x,y,z+_k`*`diffFX,z,Ketψ,x,y,z

(22)

To make explicit the gradient in disguise on the right-hand side, factor out the arbitrary ket Ketψ,x,y,z

Factor

`*`CommutatorFX,p_,Ketψ,x,y,z=`*`diffFX,x_i+diffFX,y_j+diffFX,z_k,Ketψ,x,y,z

(23)

Combine now the expanded gradient into its inert (not-expanded) form

subsGradient=%GradientFX,

`*`CommutatorFX,p_,Ketψ,x,y,z=`*`%GradientFX,Ketψ,x,y,z

(24)

Since (24) is true for allKetψ,x,y,z, this ket can be removed from both sides of the equation. One can do that either taking coefficients (see Coefficients) or multiplying by the "formal inverse" of this ket, arriving at the (expected) form of the commutation rule between FX and p

InverseKetψ,x,y,z

CommutatorFX,p_=%GradientFX

(25)

Tensor notation, X__m,Pn= gm,n

The computation rule for position and momentum, this time in tensor notation, is performed in the same way, just that, additionally, specify that the space indices to be used are lowercase Latin letters, and set the relationship between the differential operators and the coordinates directly using tensor notation.

You can also specify that the metric is Euclidean, but that is not necessary: the default metric of the Physics package, a Minkowski spacetime, includes a 3D subspace that is Euclidean, and the default signature, (- - - +), is not a problem regarding this computation.

 

restart; withPhysics:interfaceimaginaryunit = i:

Setupmathematicalnotation=true,coordinates = cartesian,spaceindices = lowercaselatin,algebrarules=%Commutatorx,y=0,%Commutatorx,z=0,%Commutatory,z=0,hermitianoperators = X,P,p,differentialoperators=Pm,x,y,z,quiet

algebrarules=%Commutatorx,y=0,%Commutatorx,z=0,%Commutatory,z=0,coordinatesystems=X,differentialoperators=Pm,x,y,z,hermitianoperators=P,p,t,x,y,z,mathematicalnotation=true,spaceindices=lowercaselatin

(26)

Define now the tensor Pm

DefinePm,quiet

γμ,Pm,σμ,Xμ,μ,gμ,ν,γa,b,δμ,ν,εα,β,μ,ν

(27)

Introduce now the Commutator, this time in active form, to show how to reobtain the non-expanded form at the end by resorting the operands in products

CommutatorXm,PnKetψ,x,y,z

`*`CommutatorSpaceTimeVectormX,Pn,Ketψ,x,y,z

(28)

Expand first (not necessary) to see how the operator Pn is going to be applied

=expand

`*`CommutatorSpaceTimeVectormX,Pn,Ketψ,x,y,z=`*`SpaceTimeVectormX,Pn,Ketψ,x,y,z`*`Pn,SpaceTimeVectormX,Ketψ,x,y,z

(29)

Now expand and directly apply in one ago the differential operator Pn

=Library:-ApplyProductsOfDifferentialOperators

`*`CommutatorSpaceTimeVectormX,Pn,Ketψ,x,y,z=`*`SpaceTimeVectormX,PnKetψ,x,y,zPn`*`SpaceTimeVectormX,Ketψ,x,y,z

(30)

Introducing the explicit differential operator representation for Pn, here again using the inert %d_n to keep control of the computations step by step

Pnfℏ%d_nf

Pnf%d_nf

(31)

The expanded and applied commutator (30) becomes

 

`*`CommutatorSpaceTimeVectormX,Pn,Ketψ,x,y,z=`*`SpaceTimeVectormX,%d_nKetψ,x,y,z+%d_n`*`SpaceTimeVectormX,Ketψ,x,y,z

(32)

Activate now the inert operators %d_n and simplify taking into account Einstein's rule for repeated indices

Simplifyvalue

`*`CommutatorSpaceTimeVectormX,Pn,Ketψ,x,y,z=g_m,nKetψ,x,y,z

(33)

Since the ket Ketψ,x,y,z is arbitrary, we can take coefficients (or multiply by the formal Inverse of this ket as done in the previous section). For illustration purposes, we use  Coefficients and note how it automatically expands the commutator

Coefficients,Ketψ,x,y,z

XmPnPnXm=gm,n

(34)

One can undo this (frequently undesired) expansion of the commutator by sorting the products on the left-hand side using the commutator between Xm and Pn

Library:-SortProducts,Pn,Xm,usecommutator

CommutatorSpaceTimeVectormX,Pn=g_m,n

(35)

And that is the result we wanted to compute.

 

Additionally, to see this rule in matrix form,

TensorArray

Commutatorx,P1=ICommutatorx,P2=0Commutatorx,P3=0Commutatory,P1=0Commutatory,P2=ICommutatory,P3=0Commutatorz,P1=0Commutatorz,P2=0Commutatorz,P3=I

(36)

In the above, we use equation (35) multiplied by -1 to avoid a minus sign in all the elements of (36), due to having worked with the default signature (- - - +); this minus sign is not necessary if in the Setup at the beginning one also sets  signature=`+ + + -`

 

For display purposes, to see this matrix expressed in terms of the geometrical components of the momentum p , redefine the tensor Pn explicitly indicating its Cartesian components

DefinePm=p__x,p__y,p__z,quiet

γμ,Pm,σμ,Xμ,μ,gμ,ν,γa,b,δμ,ν,εα,β,μ,ν

(37)

TensorArray

Commutatorx,p__x=ICommutatorx,p__y=0Commutatorx,p__z=0Commutatory,p__x=0Commutatory,p__y=ICommutatory,p__z=0Commutatorz,p__x=0Commutatorz,p__y=0Commutatorz,p__z=I

(38)

Finally, in a typical situation, these commutation rules are to be taken into account in further computations, and for that purpose they can be added to the setup via

Setup

algebrarules=%Commutatorx,p__x=,%Commutatorx,p__y=0,%Commutatorx,p__z=0,%Commutatorx,y=0,%Commutatorx,z=0,%Commutatory,p__x=0,%Commutatory,p__y=,%Commutatory,p__z=0,%Commutatory,z=0,%Commutatorz,p__x=0,%Commutatorz,p__y=0,%Commutatorz,p__z=

(39)

For example, from herein computations are performed taking into account that

%Commutator = Commutatorx, p__x

%Commutatorx,p__x=

(40)

The Physics:-Cactus package for Numerical Relativity

 

Automatic setting of the EnergyMomentumTensor for metrics of the database of solutions to Einstein's equations

 

There are 991 metrics in the database of solutions to Einstein's equations, based on the book "Exact solutions to Einstein's equations". One can check this number via

nopsDifferentialGeometry:-Library:-RetrieveStephani,1

991

(41)

For the majority of these solutions, the book also presents, explicit or implicitly, the form of the Energy-Momentum tensor. New in Maple 2018, we added to the database one more entry indicating the components of the corresponding EnergyMomentum tensor, covering, in Maple 2018.0, 686 out of these 991 solutions.

The design of the EnergyMomentum tensor got slightly adjusted to take these new database entries into account, so that when you load one of these solutions, if the corresponding entry for the EnergyMomentumTensor is already in the database, it is automatically loaded together with the solution.

In addition, it is now possible to define the tensor components using the Define command, or redefine any of its components using the new Library:-RedefineTensorComponent routine (see Physics,Library)

 

Examples

restart; withPhysics:

Consider the metric of Chapter 12, equation number 16.1

g_12,18,1

Systems of spacetime Coordinates are: X=τ,r,θ,φ

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

The Bertotti (1959), Kramer (1978), Levi-Civita (1917), Robinson (1959) metric in coordinates τ,r,θ,φ

Parameters: k,κ0,β

Resetting the signature of spacetime from "- - - +" to `- + + +` in order to match the signature in the database of metrics:

Physics:-g_μ,ν=k2r20000k2r20000k20000k2sinθ2

(42)

New, the covariant components of the EnergyMomentum tensor got automatically loaded, given by

EnergyMomentum

EnergyMomentumμ,ν=1r2κ000001r2κ000001κ00000sinθ2κ0

(43)

One can verify this checking for the tensor's definition

EnergyMomentumdefinition

Τμ,ν=Gμ,ν8π,Τμ,νμ,ν=r2k4κ00000r2k4κ000001k4κ000001k4sinθ2κ0

(44)

Take now the tensor components of the first defining equation of (44)

TensorArray1,simplifier=simplify

1r2κ0=18r2π0=00=00=00=01r2κ0=18r2π0=00=00=00=01κ0=18π0=00=00=00=0sinθ2κ0=18sinθ2π

(45)

where κ0=8 π is related to Newton's constant.

 

To see the continuity equations for the components of Τμ,ν, use for instance the inert version of the covariant derivative operator D_ and the TensorArray command

%D_mu=D_muEnergyMomentummu,nu

%D_μEnergyMomentum~mu,ν=0

(46)

TensorArray

%d_11k2κ0,τ,r,θ,φ+%d_20,τ,r,θ,φ+%d_30,τ,r,θ,φ+%d_40,τ,r,θ,φ=0%d_11k2κ0,τ,r,θ,φ+%d_20,τ,r,θ,φ+%d_30,τ,r,θ,φ+%d_40,τ,r,θ,φ=0%d_11k2κ0,τ,r,θ,φ+%d_20,τ,r,θ,φ+%d_30,τ,r,θ,φ+%d_40,τ,r,θ,φ=0%d_11k2κ0,τ,r,θ,φ+%d_20,τ,r,θ,φ+%d_30,τ,r,θ,φ+%d_40,τ,r,θ,φ=0

(47)

value

0=00=00=00=0

(48)

The EnergyMomentum tensor can also be (re)defined in any particular way (a correct definition must satisfy μΤμνμν=0).

Example:

Define the EnergyMomentum tensor indicating the functionality in the definition in terms of W to be constant energy (i.e. no functionality) and the flux density Sμ and stress σμ,ν tensors depending on X. For this purpose, use the new option minimizetensorcomponents to make explicit the symmetry of the stress tensor σμ,ν

DefineSmu, sigmamu,nu,symmetric, minimizetensorcomponents

Defined objects with tensor properties

μ,γμ,σμ,Rμ,ν,Rμ,ν,α,β,Sμ,Cμ,ν,α,β,Xμ,μ,gμ,ν,σμ,ν,Γμ,ν,α,Gμ,ν,Τμ,ν,δμ,ν,εα,β,μ,ν

(49)

The symmetry of σμ,ν is now explicit in that its matrix form is symmetric

sigma

σμ,ν=σ1,1σ1,2σ1,3σ1,4σ1,2σ2,2σ2,3σ2,4σ1,3σ2,3σ3,3σ3,4σ1,4σ2,4σ3,4σ4,4

(50)

The new routines for testing tensor symmetries

Library:-IsTensorialSymmetricsigmamu,nu

true

(51)

The symmetry is regarding interchanging positions of the 1st and 2nd indices

Library:-GetTensorSymmetryPropertiessigma

1,2,

(52)

So this is the form of the EnergyMomentum with all its components - but for the total energy - depending on the coordinates

EnergyMomentumμ,ν=Matrix4,μ,ν→ifμ=4thenifν=4thenWelseSνXfielifν=4thenSμXelseσμ,νXfi

EnergyMomentumμ,ν=σ1,1τ,r,θ,φσ1,2τ,r,θ,φσ1,3τ,r,θ,φS1τ,r,θ,φσ2,1τ,r,θ,φσ2,2τ,r,θ,φσ2,3τ,r,θ,φS2τ,r,θ,φσ3,1τ,r,θ,φσ3,2τ,r,θ,φσ3,3τ,r,θ,φS3τ,r,θ,φS1τ,r,θ,φS2τ,r,θ,φS3τ,r,θ,φW

(53)

CompactDisplay

SXwill now be displayed asS

sigmaXwill now be displayed asσ

(54)

Define now Τμ,ν with these components

Define

Defined objects with tensor properties

μ,γμ,σμ,Rμ,ν,Rμ,ν,α,β,Sμ,Cμ,ν,α,β,Xμ,μ,gμ,ν,σμ,ν,Γμ,ν,α,Gμ,ν,Τμ,ν,δμ,ν,εα,β,μ,ν

(55)

EnergyMomentum

EnergyMomentumμ,ν=σ1,1τ,r,θ,φσ1,2τ,r,θ,φσ1,3τ,r,θ,φS1τ,r,θ,φσ1,2τ,r,θ,φσ2,2τ,r,θ,φσ2,3τ,r,θ,φS2τ,r,θ,φσ1,3τ,r,θ,φσ2,3τ,r,θ,φσ3,3τ,r,θ,φS3τ,r,θ,φS1τ,r,θ,φS2τ,r,θ,φS3τ,r,θ,φW

(56)

To see the continuity equations for the components of Τμ,ν, use again the inert version of the covariant derivative operator D_ and the TensorArray command

%D_μ=D_μEnergyMomentumμ,ν

%D_μEnergyMomentum~mu,ν=0

(57)

For a more convenient reading, present the result as a vector column

VectorcolumnTensorArray

%d_1r2σ1,1τ,r,θ,φk2,τ,r,θ,φ+%d_2r2σ1,2τ,r,θ,φk2,τ,r,θ,φ+%d_3σ1,3τ,r,θ,φk2,τ,r,θ,φ+%d_4S1τ,r,θ,φk2sinθ2,τ,r,θ,φ2rσ1,2τ,r,θ,φk2+cosθσ1,3τ,r,θ,φsinθk2=0%d_1r2σ1,2τ,r,θ,φk2,τ,r,θ,φ+%d_2r2σ2,2τ,r,θ,φk2,τ,r,θ,φ+%d_3σ2,3τ,r,θ,φk2,τ,r,θ,φ+%d_4S2τ,r,θ,φk2sinθ2,τ,r,θ,φrσ1,1τ,r,θ,φk2rσ2,2τ,r,θ,φk2+cosθσ2,3τ,r,θ,φsinθk2=0%d_1r2σ1,3τ,r,θ,φk2,τ,r,θ,φ+%d_2r2σ2,3τ,r,θ,φk2,τ,r,θ,φ+%d_3σ3,3τ,r,θ,φk2,τ,r,θ,φ+%d_4S3τ,r,θ,φk2sinθ2,τ,r,θ,φcosθWsinθ3k22rσ2,3τ,r,θ,φk2+cosθσ3,3τ,r,θ,φsinθk2=0%d_1r2S1τ,r,θ,φk2,τ,r,θ,φ+%d_2r2S2τ,r,θ,φk2,τ,r,θ,φ+%d_3S3τ,r,θ,φk2,τ,r,θ,φ+%d_4Wk2sinθ2,τ,r,θ,φ+cosθS3τ,r,θ,φsinθk22rS2τ,r,θ,φk2=0

(58)

Comparing the specific form (43) for the EnergyMomentum loaded from the database of solutions to Einstein's equations with the general form (56), one can ask the formal question of whether there are other forms for the EnergyMomentum satisfying  the continuity equations (58).

To answer that question, rewrite this system of equations for the flux density Sμ and stress σμ,ν tensors as a set, and solve it for them

convertvalue,setofequations

r2diffS1X,τk2+2rS2X+r2diffS2X,rk2+diffS3X,θk2+cosθS3Xsinθk22rS2Xk2=0,r2diffσ1,1X,τk2+2rσ1,2X+r2diffσ1,2X,rk2+diffσ1,3X,θk2+diffS1X,φk2sinθ22rσ1,2Xk2+cosθσ1,3Xsinθk2=0,r2diffσ1,2X,τk2+2rσ2,2X+r2diffσ2,2X,rk2+diffσ2,3X,θk2+diffS2X,φk2sinθ2rσ1,1Xk2rσ2,2Xk2+cosθσ2,3Xsinθk2=0,r2diffσ1,3X,τk2+2rσ2,3X+r2diffσ2,3X,rk2+diffσ3,3X,θk2+diffS3X,φk2sinθ2cosθWsinθ3k22rσ2,3Xk2+cosθσ3,3Xsinθk2=0

(59)

This system in fact admits much more general solutions than (43):

pdsolve

S1X=S1X,S2X=S2X,S3X=Intr2diffS1X,τsinθsinθdiffS2X,rr2,θ+_F1τ,r,φsinθ,σ1,1X=σ1,1X,σ1,2X=Intdiffσ1,1X,τcosθ2r2r2diffσ1,1X,τ+cosθσ1,3Xsinθdiffσ1,3X,θcosθ2+diffσ1,3X,θ+diffS1X,φr2sinθ2,r+_F2τ,θ,φ,σ1,3X=σ1,3X,σ2,2X=Intr2diff_F2τ,θ,φ,τcos4θ+4Int12r2diffdiffσ1,1X,τ,τcos2θr2diffdiffσ1,1X,τ,τdiffdiffσ1,3X,τ,θcos2θ+diffσ1,3X,τsin2θ+diffdiffσ1,3X,τ,θ+2diffdiffS1X,φ,τr2,rr2cos2θ4r2diff_F2τ,θ,φ,τcos2θ+rσ1,1Xcos4θ4rσ1,1Xcos2θ4Int12r2diffdiffσ1,1X,τ,τcos2θr2diffdiffσ1,1X,τ,τdiffdiffσ1,3X,τ,θcos2θ+diffσ1,3X,τsin2θ+diffdiffσ1,3X,τ,θ+2diffdiffS1X,φ,τr2,rr2+3r2diff_F2τ,θ,φ,τ+4diffS2X,φcos2θdiff_F3τ,θ,φ,θcos4θ+_F3τ,θ,φsin4θ8cosθInt143r2diffσ1,3X,τsinθdiffσ1,3X,τr2sin3θ+4r2IntsinθdiffdiffS2X,φ,rsinθdiffdiffS1X,φ,τ,θ3diffσ3,3X,θsinθcosθσ3,3X+σ3,3Xcos3θ+diffσ3,3X,θsin3θ+4cosθW4diff_F1τ,r,φ,φr2,r+4diff_F3τ,θ,φ,θcos2θ2_F3τ,θ,φsin2θ+3rσ1,1X4diffS2X,φ8Int18diffdiffσ1,3X,τ,θr2cos4θ4diffdiffσ1,3X,τ,θr2cos2θ4diffdiffS2X,φ,rr2cos2θ+4diffdiffS1X,φ,τr2cos2θ24r2IntsinθdiffdiffS2X,φ,rsinθdiffdiffS1X,φ,τ,θcosθ+3diffdiffσ1,3X,τ,θr2+4diffdiffS2X,φ,rr24diffdiffS1X,φ,τr2diffdiffσ3,3X,θ,θcos4θ+4diffdiffσ3,3X,θ,θcos2θ+diffσ3,3X,θsin4θ4σ3,3Xcos2θ2diffσ3,3X,θsin2θ+24diff_F1τ,r,φ,φcosθ8Wcos2θ3diffdiffσ3,3X,θ,θ+4σ3,3X16Wr2,r3diff_F3τ,θ,φ,θr4cos2θ+3+cos4θ,r+_F4τ,θ,φr,σ2,3X=Intdiffσ1,3X,τsinθcosθ2r2+r2diffσ1,3X,τsinθ+diffσ3,3X,θsinθcosθ2+σ3,3Xcosθ3+r2IntsinθdiffdiffS2X,φ,rdiffdiffS1X,φ,τ,θdiffσ3,3X,θsinθcosθσ3,3X+cosθWdiff_F1τ,r,φ,φr2sinθ3,r+_F3τ,θ,φ,σ3,3X=σ3,3X

(60)

This solution can be verified in different ways, for instance using pdetest showing it cancels the PDE system (59) for Sμ and stress σμ,ν

pdetest,

0

(61)

Minimize the number of tensor components according to its symmetries, and relabel, redefine or count the number of independent tensor components

 A new keyword in Define and Setup: minimizetensorcomponents, allows for automatically minimizing the number of tensor components taking into account the tensor symmetries. For example, if a 2-tensor in a 4D spacetime is defined a antisymmetric, the number of different tensor components is 6, and the elements of the diagonal are automatically set equal to 0. After setting this keyword to true with Setup, all subsequent definitions of tensors automatically minimize the number of components while using this keyword with Define makes this minimization only happen with the tensors being defined in the call to Define.

Related to this new functionality, 4 new Library routines were added: MinimizeTensorComponents, NumberOfIndependentTensorComponents, RelabelTensorComponents and RedefineTensorComponents

 

Example:

restart;  withPhysics:

Define an antisymmetric tensor with two indices

DefineFmu,nu,antisymmetric

Defined objects with tensor properties

γμ,Fμ,ν,σμ,μ,gμ,ν,δμ,ν,εα,β,μ,ν

(62)

Although the system knows that Fμ,ν is antisymmetric,

Fmu,nu + Fnu,mu

Fμ,ν+Fν,μ

(63)

Simplify

0

(64)

by default the components of Fμ,ν do not automatically reflect that, it is necessary to use the simplifier of the Physics package, Simplify

F1,2 + F2,1

F1,2+F2,1

(65)

Simplify

0

(66)

Likewise, computing the array form of Fμ,ν we do not see the elements of the diagonal equal to 0, nor the lower-left triangle equal to the upper-right triangle but with a different sign:

TensorArrayFmu,nu

F1,1F1,2F1,3F1,4F2,1F2,2F2,3F2,4F3,1F3,2F3,3F3,4F4,1F4,2F4,3F4,4

(67)

This new functionality, here called minimizetensorcomponents, makes the symmetries of the tensor explicitly reflected in its components. There are three ways to use it. First, one can minimize the number of tensor components of a tensor previously defined. For example

Library:-MinimizeTensorComponentsF

0F1,2F1,3F1,4F1,20F2,3F2,4F1,3F2,30F3,4F1,4F2,4F3,40

(68)

After this, both (63) and (64) are automatically equal to 0 without having to use Simplify

0

(69)

0

(70)

And the output of TensorArray in (67) becomes equal to (68).

NOTE: after using minimizetensorcomponents in the definition of a tensor, say F, all the keywords implemented for Physics tensors are available for the F:

F

Fμ,ν=0F1,2F1,3F1,4F1,20F2,3F2,4F1,3F2,30F3,4F1,4F2,4F3,40

(71)

Ftrace

0

(72)

Fnonzero

Fμ,ν=1,2=F1,2,1,3=F1,3,1,4=F1,4,2,1=F1,2,2,3=F2,3,2,4=F2,4,3,1=F1,3,3,2=F2,3,3,4=F3,4,4,1=F1,4,4,2=F2,4,4,3=F3,4

(73)

F~1,mu,matrix

F~1,μ=0F1,2F1,3F1,4

(74)

Alternatively, one can define a tensor, specifying that the symmetries should be taken into account to minimize the number of its components passing the keyword minimizetensorcomponents to Define.

Example:

Define a tensor with the symmetries of the Riemann tensor, that is, a tensor of 4 indices that is symmetric with respect to interchanging the positions of the 1st and 2nd pair of indices and antisymmetric with respect to interchanging the position of its 1st and 2nd indices, or 3rd and 4th indices, and minimizing the number of tensor components

DefineRalpha,beta,mu