simplify expressions involving objects and operations related to the Physics package - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Physics : Physics/Simplify

Physics[Simplify] - simplify expressions involving objects and operations related to the Physics package

Calling Sequence

Simplify(A)

Simplify(A, kind1, kind2, ...)

Parameters

A

-

any mathematical expression

kind1, kind2, ...

-

(optional) any of algebrarules, indices, noncommutativeproducts, sum, int; the kind of simplification to perform

Description

• 

The Simplify command performs simplifications of expressions involving objects and operations related to the Physics package, including taking into account:

  

- The summation convention for repeated indices, regarding them as dummies, and including the (anti)symmetry properties of the indices of the tensorial objects involved (according to how these objects were defined by the Define command).

  

- Properties of noncommutative products.

  

- (Anti)Commutator algebra rules.

  

- Projectors and KroneckerDelta contracted indices inside sums.

• 

As with the general Maple simplifier, simplify, when you call the Physics[Simplify] command with no extra arguments, all of the simplifications are attempted. When you call it with extra arguments specifying different simplifications, any of algebrarules, bracketrules, indices, noncommutativeproducts, sum, and int, only the specified simplifications are attempted.

• 

You do not need to remember exactly all of the keywords; as with other Physics commands, Simplify will match wrong or partially spelled keywords to the first likely one, and perform the simplification. For example, Simplify(expr, alg) will invoke Simplify(expr, algebrarules).

Examples

withPhysics:

Setupmathematicalnotation=true

mathematicalnotation=true

(1)

Summation rule for repeated indices

  

By default, the dimension of the spacetime when you load the Physics package is 4 = 3 + 1, and the signature is `-`.

Setupdimension,signature

dimension=4,signature=- - - +

(2)
  

So the trace of the metric g_ is equal to 4.

g_ν,μ2

gμ,νgμ,νμ,ν

(3)

Simplify

4

(4)
  

The metric is used to 'raise and lower' indices in other tensors, as shown below.

g_ν,μg_ν,ρ

gμ,νg_νρνρ

(5)

Simplify

gμ,ρ

(6)
  

Define A as an object having tensorial properties; that is, the summation convention for repeated indices in products should be taken into account.

DefineA

Defined objects with tensor properties

A,γμ,σμ,μ,gμ,ν,εα,β,μ,ν

(7)
  

So the metric can now have indices contracted with A.

g_ν,μg_ρ,σAν,μ,ρ,σ

Aν,μ,ρ,σgμ,νμ,νgρ,σρ,σ

(8)

Simplify

Aννσσννσσ

(9)
  

The metric is totally symmetric with respect to interchange of positions of its indices, while the LeviCivita symbol, in the Maple worksheet displayed as epsilon, is totally antisymmetric. So the contraction of their respective indices is equal to zero.

g_ν,μLeviCivitaν,μ,σ,ρ

εμ,ν,ρ,σgμ,νμ,ν

(10)

Simplify

0

(11)
  

For the same reason, the contraction of any two of the indices of the LeviCivita symbol is also zero.

LeviCivitaν,ν,ρ,σ

0

(12)
  

As is the product of the LeviCivita symbol, where the same spacetime vector appears two times, contracting different indices of epsilon. To illustrate this case, first Define q to represent this generic tensor.

Defineq

Defined objects with tensor properties

q,Aν,μ,ρ,σ,γμ,σμ,μ,gμ,ν,εα,β,μ,ν

(13)

LeviCivitaν,μ,σ,ρqμqν

εμ,ν,ρ,σqμμqνν

(14)

Simplify

0

(15)
  

When defining an object to have tensorial properties, you can define the symmetry properties of the indices of the object as well. The following Defines B and C as totally symmetric and totally antisymmetric, respectively.

DefineB,symmetric

Defined objects with tensor properties

B,Aν,μ,ρ,σ,γμ,σμ,μ,gμ,ν,qμμ,εα,β,μ,ν

(16)

DefineC,antisymmetric

Defined objects with tensor properties

B,C,Aν,μ,ρ,σ,γμ,σμ,μ,gμ,ν,qμμ,εα,β,μ,ν

(17)

Bμ,νLeviCivitaν,μ,σ,ρ

εμ,ν,ρ,σBμ,νμ,ν

(18)

Simplify

0

(19)

DefineB,query

Totally symmetric tensor, structured as name,indices,variables :

B,2,0,0,0

(20)

Cμ,νg_ν,μ

gμ,νCμ,νμ,ν

(21)

Simplify

0

(22)

DefineC,query

Totally antisymmetric tensor, structured as name,indices,variables :

C,2,0,0,0

(23)

Bμ,νCμ,ν

Bμ,νCμ,νμ,ν

(24)

Simplify

0

(25)
  

The number of indices of the LeviCivita symbol depends on the dimension of spacetime. For any dimension and signature, the contracted product of two LeviCivita symbols can be expressed as a sum of products involving the metric g_. Note the use of Check to tell which indices are repeated (contracted) and which are free at any point.

LeviCivitaν,μ,α,βLeviCivitaμ,σ,ρ,τ

εα,β,μ,νεμρ,σ,τμρ,σ,τ

(26)

Check,indices,all

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

μ,α,β,ν,ρ,σ,τ

(27)

Simplify

gα,ρgβ,σgν,τ+gα,ρgβ,τgν,σ+gα,σgβ,ρgν,τgα,σgβ,τgν,ρgα,τgβ,ρgν,σ+gα,τgβ,σgν,ρ

(28)

LeviCivitaν,μ,σ,ρLeviCivitaν,μ,α,β

εα,β,μ,νεμ,νρ,σμ,νρ,σ

(29)

Check,indices,all

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

μ,ν,α,β,ρ,σ

(30)

Simplify

2gα,ρgβ,σ2gα,σgβ,ρ

(31)

LeviCivitaν,μ,α,σLeviCivitaν,μ,α,β

εα,μ,ν,σεαβμ,ναβμ,ν

(32)

Check,indices,all

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

α,μ,ν,β,σ

(33)

Simplify

6gβ,σ

(34)

LeviCivitaν,μ,α,β2

εα,β,μ,νεα,β,μ,να,β,μ,ν

(35)

Check,indices,all

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

α,β,μ,ν,

(36)

Simplify

−24

(37)
  

Note that the results above are different if the dimension or signature of spacetime are different from 4 and `-`, respectively.

  

During normal computations, a frequent occurrence is when two products have tensors with the same contracted indices, but in each product the contracted indices are represented by different letters, thus obscuring the fact that the two products are mathematically equal.

DefineF,'quiet'

F,Aν,μ,ρ,σ,Bμ,νμ,ν,Cμ,νμ,ν,γμ,σμ,μ,gμ,ν,qμμ,εα,β,μ,ν

(38)

Fμ,νCν,ρ+Fμ,αCα,ρ

Cα,ρFμαμα+Cν,ρFμνμν

(39)

Check,indices,all

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

α,ν,μ,ρ

(40)

Simplify

2Cα,ρFμαμα

(41)
  

The following example would be a little trickier to tell.

DefineAμ,Cμ,'redo','quiet'

Aμ,Bμ,νμ,ν,Cμ,γμ,Fμαμα,σμ,μ,gμ,ν,qμμ,εα,β,μ,ν

(42)

Definequery,A,C

Tensors structured as name,indices,variables:

A,1,0,0,0,C,1,0,0,0

(43)

LeviCivitaν,μ,α,σLeviCivitaν,μ,α,βAβCσAσCβ

AβCσAσCβεα,μ,νσα,μ,νσεα,β,μ,να,β,μ,ν

(44)