ecterrab

14702 Reputation

24 Badges

20 years, 274 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi

I don't know if you are familiar with the Physics package. GRTensor was for a long time the paradigm for general relativity and computer algebra around 20 years ago but I think Maple's Physics, the package that is developed by Maplesoft since 2006, that comes with Maple, really has more advanced functionality. It also appears to me simpler to use, and on top of that, the display and notation are as in textbooks.

Regarding your specific question, using Physics you do what you want via 

> Define(F[mu,nu] = Matrix(4, <the 16 components here>))

Alternatively, the right-hand side could be a tensorial equation with mu and nu as free indices (see the help page for Physics:-Define). After that, you can select a component entering F[1, 2], or say F[~1, 2] if the first index is contravariant, or F[nonzero] to see the nonzero components, or F[definition] to recover your definition, or F[] and F[~] to respectively see the all-covariant and all-contravariant components, or just work algebraically with F[mu,nu] using Simplify to simplify taking into account Einsten's sum rule for repeated indices, and a large etc. Among some other remarkable functionality in the Physics package, there is the TransformCoordinates and TensorArray commands, that act on generic tensorial expressions, not just on single tensors (see the corresponding help pages). Now in Maple 2017 there is the new Physics:-ThreePlusOne to work using the ADM formalism (3+1 decomposition of Einstein's equations, and related commands like the Lapse, Shift, etc.)

Physics has 70 commands, the Physics:-Tetrads has 14 commands, the Physics:-ThreePlusOne has 11 commands, the Physics:-StandardModel has 20 commands, and the Physics:-Library, with all the routines used to program the package available and with help sections explaining them, has other 153 commands; the Library:-PhysicsType package in turn has 87 types predefined that are relevant when working or programming for physics.

There is also the database of solutions to Einstein's equations. All the solutions collected in "Exact Solutions of Einstein's Field Equations" by Stephani, McCallum et al. are in this database that comes with Physics. This is about 1,000 metrics collected from among 4,000 papers in the literature. Every solution can be loaded, changed, worked on, etc.

I think there is nothing in computer algebra as thorough and comprehensive for general relativity, or quantum mechanics or field theory for the case, as it is the Maple Physics package.

Last but not least, Physics is updated every week taking into account the feedback of Maple users around, regarding fixes and new developments. The updates are available for download from the Maplesoft R&D Physics web page (for example, there have been 9 updates after the release of Maple 2017, and 167 updates during the Maple 2016 cycle). This constant update of the package is one of the nicest features of the Physics project at Maplesoft.

So I'd suggest you give it a try :)

If you have questions please post them here or you can also direct them to physics@maplesoft.com. 

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

Hi John

The expression you show is equal to a power series of f', therfore the differential order is equal to 1. Generally speaking, G(f') = 0 is just a differential equation of so-called "high degree" (even if not necessarily polynomial) in f', i.e. of differential order equal to 1. From you PS I can't tell exactly what is what you are trying to accomplish but it can mostly certainly be programmed using the commands of the PDEtools:-Library.

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

The Physics:-Fundiff performs functional differentiation, i.e. it is the command you can use to extremise a functional and in that way get the equations of movement (either discrete, mechanics, or in a field theory). The help page contains several examples of how to use it.

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

The Physics,TransformCoordinates does what you want, with several handy options.

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

Hi

Please give a look at the documentation. You can use the value 0 for the indices and, depending on the signature, it is the same as using the value 4 (if the sigmature is either (+ + + -) or (- - - +)) or it is the same as using the value 1 (if the signature is either (- + + +) or (+ - - -)). So indexing with 0 is the same as indexing with the position of the different sign in the signature. You can always query about the signature entering Setup(signature), and you can change the signature to any of the four possible ones, entering, for example, Setup(signature = `- + + +`); separating blank spaces help visualizing but for the Maple program behind this they are irrelevant, and you an enclose with `` or "". The default signature when you load Physics is "- - - +", as in Landau books, and in Maple 2017 there is a new command, Physics:-Redefine, to change the ordering or coordinates and the metric according to a change in signature.

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

This is the same question asked in http://www.mapleprimes.com/questions/222078-How-To-Compute-Ricci-Tensor-Of-A-Metric?reply=reply. The Maple results are correct, and as said there it is simple using the Physics package, why using the old 'tensor' package, good 30 years ago, but cumbersome today? 

I'd even say more: using Physics it not just simple but trivial, straightforward, as in "just say it" (Christoffel, Ricci). I copy here the worksheet/computation.


 

restart

with(Physics)

Set the coordinates

Coordinates(spherical)

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

{X}

(1)

Input your metric

`#msup(mi("ds"),mn("2"))` := exp(2*v(r))*dt^2-exp(2*lambda(r))*dr^2-r^2*(dtheta^2+sin(theta)^2*dphi^2)

exp(2*v(r))*dt^2-exp(2*lambda(r))*dr^2-r^2*(dtheta^2+sin(theta)^2*dphi^2)

(2)

Setup(metric = exp(2*v(r))*dt^2-exp(2*lambda(r))*dr^2-r^2*(dtheta^2+sin(theta)^2*dphi^2))

[metric = {(1, 1) = -exp(2*lambda(r)), (2, 2) = -r^2, (3, 3) = -r^2*sin(theta)^2, (4, 4) = exp(2*v(r))}]

(3)

This is not necessary, but makes the display be as the one you show in your pdf 'right_christoffel_symbol.pdf

CompactDisplay(%)

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

 

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

(4)

CompactDisplay(prime = r)

`derivatives with respect to`*r*`of functions of one variable will now be displayed with '`

(5)

These are all the Christoffel symbols you show in the pdf, they are the same here and there:

"Christoffel[~1,alpha,beta,matrix]"

Physics:-Christoffel[`~1`, alpha, beta] = Matrix(%id = 18446744078302813470)

(6)

An these are the covariant components you show of the Ricci tensor

Ricci[]

Physics:-Ricci[mu, nu] = Matrix(%id = 18446744078389689390)

(7)

Finally, this is relationship you show in your pdf

Ricci[3, 3]-Ricci[2, 2]*sin(theta)^2

-sin(theta)^2*((diff(v(r), r))*exp(-2*lambda(r))*r-(diff(lambda(r), r))*exp(-2*lambda(r))*r+exp(-2*lambda(r))-1)-sin(theta)^2*(-(diff(v(r), r))*exp(-2*lambda(r))*r+(diff(lambda(r), r))*exp(-2*lambda(r))*r-exp(-2*lambda(r))+1)

(8)

simplify(%)

0

(9)

``


 

Download Maple_results_are_correct.mw

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

I see you use the old tensor package. It is simple using the Physics package. Attached is your worksheet, revised by showing how to do it.


 

with(tensor):

coord:=[t,r,theta,phi]:

g_compts:=array(symmetric,sparse,1..4,1..4);

array( 1 .. 4, 1 .. 4, [ ] )

(1)

g_compts[1,1] := exp(2*phi(r)); g_compts[2,2] := -exp(2*nu(r));g_compts[3,3] := -r^2;g_compts[4,4] := -r^2*sin(th)^2;

exp(2*phi(r))

 

-exp(2*nu(r))

 

-r^2

 

-r^2*sin(th)^2

(2)

 

g := create( [-1,-1], eval(g_compts));

g := create([-1, -1], Matrix(4, 4, {(1, 1) = exp(2*phi(r)), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -exp(2*nu(r)), (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -r^2, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = -r^2*sin(th)^2}))

(3)

with(Physics)

Setup(coordinates = spherical, g_ = (Matrix(4, 4, {(1, 1) = exp(2*u(r)), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -exp(2*v(r)), (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -r^2, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = -r^2*sin(theta)^2})))

`* Partial match of  'coordinates' against keyword 'coordinatesystems'`

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

[coordinatesystems = {X}, metric = {(1, 1) = exp(2*u(r)), (2, 2) = -exp(2*v(r)), (3, 3) = -r^2, (4, 4) = -r^2*sin(theta)^2}]

(4)

Use a compact display to avoid redundant display of the functionality of u(r) and v(r)

CompactDisplay(%)

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

 

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

(5)

Check the metric

g_[]

Physics:-g_[mu, nu] = Matrix(%id = 18446744078192267622)

(6)

The covariant and contravariant components of the Ricci tensor

Ricci[]

Physics:-Ricci[mu, nu] = Matrix(%id = 18446744078202130054)

(7)

"Ricci[~]"

Physics:-Ricci[`~mu`, `~nu`] = Matrix(%id = 18446744078202091870)

(8)

``


 

Download metric_(reviewed).mw

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

In ?dchange, you read

  • The dchange command has two different criteria for changing variables. The first one, applied by default to "known" functions (functions with a differentiation rule known to Maple), changes the functional dependence using the explicit relation between the old and new variables. For example, if the transformation is given by  {x = xi+eta, y = xi-eta},  then dchange will transform known functions as follows:

           cos(x*y) -> cos( (xi+eta)*(xi-eta) )

  • The second criterion, applied by default to "unknown" functions (functions whose differentiation rule is unknown to Maple), changes the functional dependence taking into account only the implicit relation between the old and new variables. For example, with the transformation above, the dchange command will transform any "unknown" function (say f) as in:  f(x, y) -> f(xi, eta)
  • It is possible to change these defaults and force dchange to apply a different criterion to a given function, by specifying it using the 'known' or 'unknown' options.
  • When a function depends on more variables than those which are being changed, the variables not entering the process are all put to the right. For example, the transformation above would take f(x, y, z, t) -> f(xi, eta, z, t).


So these three different input achieve the two other possible intepretations of this change of variables:

dchange(tr, x*(diff(f(x, y), y))+y*(diff(g(x, y), x)), [u, v], known = {f, g});  # (2)
dchange(tr, x*(diff(f(x, y), y))+y*(diff(g(x, y), x)), [u, v], known = all)        # same as (2)

tr := tr union {f(x, y) = F(u, v), g(x, y) = G(u, v)}:
dchange(tr, x*(diff(f(x, y), y))+y*(diff(g(x, y), x)), [u, v, F, G]);  # this is the one I find more correct for what I think you wanted

In summary: there is no bug here, the design permits you to work in one way or the other one. I would agree with a debate on what should be the default behaviour ('known = all', for instance, would avoid these surprises) but the current default is in the Maple library since 1997 and changing it today would have some potential backwards compatibility issues very difficult to predict (how many worksheets in the world would stop working as when they were written).

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

Hi
I'm not sure I understand your question precisely, but here is an answer: 

  • To see the list of metrics in the databse of solutions to Einstein's equations (I mean the indices that identify them, and also count how many are there) you use DifferentialGeometry:-Library:-Retrieve("Stephani", 1)
  • To see a list on the screen of the metrics where the description - when scanned for text recognition - presents a match to some combination of letters that you presente (e.g. kerr), you useSetup(metric = kerr) as you did. You can try for instance with 'pa' or 'dya' instead of 'kerr'

I recall as well that you can enter any metric you prefer in order to work with it, not just use the ones in the database of solutions - there are not restrictions to the form of the metric you enter but for the requirement that it is symmetric.

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

Hi
After you Setup(dimension = 3) you can use Coordinates(X = [r, theta, phi]) or Setup(coordinates = (X = [r, theta, phi])). You can also set both things in one go via Setup(dimension = 3, coordinates = (X = [r, theta, phi])).

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

 

Hi
The parameters used are the global letters E, B, A, Omega and they are entered by TransformTetrdas. You can replace them by any other symbol or number in the output of TransformTetrads. Also, if before calling TransformTetrads these letters happen to be assigned to something, or have some attribute, or have been used in the left-hand-side of a macro or alias, in all these cases the code will search for E__1, if it is not available for that same reason then E__2 ... and so on, and ditto for B, A, Omega.

 

(I always recommend to use the latest version of Physics distributed in the Maplesoft R&D Physics webpage.)

Example:

restart

with(Physics); -1; with(Tetrads)

`Setting lowercaselatin letters to represent tetrad indices `

 

0, "%1 is not a command in the %2 package", Tetrads, Physics

 

0, "%1 is not a command in the %2 package", Tetrads, Physics

 

[IsTetrad, NullTetrad, OrthonormalTetrad, PetrovType, SimplifyTetrad, TransformTetrad, e_, eta_, gamma_, l_, lambda_, m_, mb_, n_]

(1)

Load the Schwarzschild metric

g_[sc]

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`The Schwarzschild metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[m]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 4) = (r-2*m)/r}, storage = triangular[upper], shape = [symmetric]))

(2)

An orthonormal tetrad (this is the one used by default) is

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078467505318)

(3)

You can always check whether this is or not a tetrad and the corresponding type (orthonormal or null) using

Physics:-Tetrads:-IsTetrad(Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078467505318))

`Type of tetrad: orthonormal `

 

true

(4)

A related null tetrad can be obtained via

NullTetrad()

Matrix(%id = 18446744078459221646)

(5)

Physics:-Tetrads:-IsTetrad(%)

`Type of tetrad: null `

 

true

(6)

Once you have the tetrad you want, you can set it to be the tetrad e_[a,b] to be used by the system using Setup(e_ = ...) or Setup(tetrad = ...):

Physics:-Setup(Physics:-Tetrads:-e_ = Matrix(%id = 18446744078459221646))

[tetrad = {(1, 1) = ((1/2)*I)*2^(1/2)*r^(1/2)/(-r+2*m)^(1/2), (1, 4) = -((1/2)*I)*2^(1/2)*(-r+2*m)^(1/2)/r^(1/2), (2, 2) = (1/2)*2^(1/2)*r, (2, 3) = ((1/2)*I)*2^(1/2)*r*sin(theta), (3, 2) = (1/2)*2^(1/2)*r, (3, 3) = -((1/2)*I)*2^(1/2)*r*sin(theta), (4, 1) = -((1/2)*I)*2^(1/2)*r^(1/2)/(-r+2*m)^(1/2), (4, 4) = -((1/2)*I)*2^(1/2)*(-r+2*m)^(1/2)/r^(1/2)}]

(7)

Check it out

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078459440774)

(8)

Transform this tetrad using a null rotation with fixed l_, where l_ is given by

Physics:-Tetrads:-l_[definition]

Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-l_[`~mu`] = 0, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[`~mu`] = 1, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-m_[`~mu`] = 0, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-mb_[`~mu`] = 0, Physics:-g_[mu, nu] = Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[nu]+Physics:-Tetrads:-l_[nu]*Physics:-Tetrads:-n_[mu]-Physics:-Tetrads:-m_[mu]*Physics:-Tetrads:-mb_[nu]-Physics:-Tetrads:-m_[nu]*Physics:-Tetrads:-mb_[mu]

(9)

l_[]

Physics:-Tetrads:-l_[mu] = Vector[row](%id = 18446744078467506038)

(10)

TransformTetrad(nullrotationwithfixedl_)

Matrix(%id = 18446744078467470270)

(11)

You see the letter E introduced by TransformTetrad. You can replace it or assign if if you prefer. Now is this a tetrad? Of what type?

Physics:-Tetrads:-IsTetrad(Matrix(%id = 18446744078467470270))

`Type of tetrad: null `

 

true

(12)

A related orthonormal tetrad

OrthonormalTetrad()

Matrix(%id = 18446744078555815798)

(13)

Physics:-Tetrads:-IsTetrad(Matrix(%id = 18446744078555815798))

`Type of tetrad: orthonormal `

 

true

(14)

An example where the letter E is already in use, so it cannot be used by TransformTetrad: the Tolman metric

g_[tol]

`The Tolman metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[R(t, r), E(r)]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = -(diff(R(t, r), r))^2/(1+2*E(r)), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -R(t, r)^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -R(t, r)^2*sin(theta)^2, (3, 4) = 0, (4, 4) = 1}, storage = triangular[upper], shape = [symmetric]))

(15)

Physics:-CompactDisplay(Physics:-g_[mu, nu] = Matrix(%id = 18446744078555784486))

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

 

R(t, r)*`will now be displayed as`*R

(16)

The tetrad and the transformed tetrad

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078467501942)

(17)

TransformTetrad(nullrotationwithfixedl_)

Matrix(%id = 18446744078467460262)

(18)

You see TransformTetrad now used E__1, and as usual it assumes that these parameters are complex. Suppose you want to work with a real E__1:

Physics:-Assume(E__1::real)

{E__1::real}

(19)

Try now invoking (18), or performing the same transformation

"?"

Matrix(%id = 18446744078467460262)

(20)

TransformTetrad(nullrotationwithfixedl_)

Matrix(%id = 18446744078459450782)

(21)

You can now set this to be the tetrad as explained above

Physics:-Setup(tetrad = Matrix(%id = 18446744078459450782))

[tetrad = {(1, 1) = ((1/2)*I)*E__1*2^(1/2)*(diff(R(t, r), r))/(1+2*E(r))^(1/2), (1, 2) = ((1/2)*I)*2^(1/2)*R(t, r), (1, 3) = (1/2)*2^(1/2)*sin(theta)*R(t, r), (1, 4) = ((1/2)*I)*E__1*2^(1/2), (2, 1) = ((1/2)*I)*2^(1/2)*(diff(R(t, r), r))/(1+2*E(r))^(1/2), (2, 4) = ((1/2)*I)*2^(1/2), (3, 1) = ((1/2)*I)*2^(1/2)*(diff(R(t, r), r))*(E__1^2-1)/(1+2*E(r))^(1/2), (3, 2) = I*E__1*2^(1/2)*R(t, r), (3, 4) = ((1/2)*I)*2^(1/2)*(E__1^2+1), (4, 1) = ((1/2)*I)*E__1*2^(1/2)*(diff(R(t, r), r))/(1+2*E(r))^(1/2), (4, 2) = ((1/2)*I)*2^(1/2)*R(t, r), (4, 3) = -(1/2)*2^(1/2)*sin(theta)*R(t, r), (4, 4) = ((1/2)*I)*E__1*2^(1/2)}]

(22)

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078449801326)

(23)

A related orthonormal tetrad

OrthonormalTetrad()

Matrix(%id = 18446744078449920590)

(24)

Physics:-Tetrads:-IsTetrad(Matrix(%id = 18446744078449920590))

`Type of tetrad: orthonormal `

 

true

(25)

NULL


 

Download TransformTetrad.mw

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

Hi
There is a command, DEtools[MatrixDE] that I imagine that does what you are looking for.
Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi
First of all: I recommend you to update your Physics library with the one distributed in the Maplesoft R&D Physics webpage. With the update, that exists for Maple 2016 and the two previous releases, Dagger(d_[mu]) returns d_[mu].

Next, before answering your question, some comments on the input you show.

You set spaceindices to be uppercaselatin, then by default spacetimeindices are represented by greek lowercase letters (you can always check all settings rapidly by entering > Setup(); so without arguments), and then you define mu, mu5 and Pi as tensors. But mu and mu5 are indices ... you can but it is better not to use them also as tensor names. Also Pi is the constant 3.14.... it is not a good idea to use it as a tensor name.

Then you defined M but you use M_ These two things are not the same.

You also seem to have a problem in the keyboard: I imagine that in the input you show you intended multiplication but you used "power *", that displays like a product operator but as a superscript (exponent) thus triggering "Hermitian conjugation" instead of multiplication. Concretely, nowwhere in your input I see the 'Dagger' command being used but for these multiplication operators appearing as exponents.

There must also be something wrong in that the output of the two input lines you show look the same, while the input liens are not the same.

To avoid this kind of confusion it is better if you post a worksheet instead of copy and paste expressions.

Now on your question: to indicate that some objects are real (and therefore, if A is real, Dagger(A) = A), you can use Setup, as in Setup(realobjects = A), or Setup(realobjects = {A, B, C}) and so on. To set more specific assumptions, you can use the Physics:-Assume command, for example as in Assume(A > 0).

Finally, it is helpful if you tag your questions with 'physics' - somehow I was unable to fix this myself (I was in previous versions of Mapleprimes).

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

First set the algebra for Dirac matrices (this is automatic in the version under development, but not in Maple 2016)

with(Physics)

Setup(%AntiCommutator(Dgamma[mu], Dgamma[nu]) = 2*g_[mu, nu])

[algebrarules = {%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]) = 2*Physics:-g_[mu, nu]}]

(1)

Define your tensor

Define(a)

`Defined objects with tensor properties`

 

{a, Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu]}

(2)

This is the expression you want to simplify

ee := Dgamma[mu]*a[mu]*Dgamma[nu]*a[nu]

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`]

(3)

Although the simplification of products of Dirac matrices is not there by default, you can accomplish this type of simplification by turning explicit the anticommutator rule that defines the algebra of Dirac matrices. The simplest way to accomplish that is to symmetrize the product of Dirac matrices (thus bringing the anticommutator to the expression) in view of the symmetric character of the product a[`~mu`]*a[`~nu`]

Symmetrize(Dgamma[mu]*Dgamma[nu])

(1/2)*Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])+(1/2)*Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu])

(4)

As said, in view of the symmetry of a[`~mu`]*a[`~nu`] under interchange of mu and nu, substitute now gamma[mu]*gamma[nu] by their symmetrized product

ee = SubstituteTensor(Dgamma[mu]*Dgamma[nu] = (1/2)*Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])+(1/2)*Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu]), ee)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`] = ((1/2)*Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])+(1/2)*Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu]))*a[`~mu`]*a[`~nu`]

(5)

Simplify(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])*a[`~mu`]*a[`~nu`] = ((1/2)*Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])+(1/2)*Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu]))*a[`~mu`]*a[`~nu`])

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`] = a[nu]*a[`~nu`]

(6)

 

Alternatively you can achieve the same the other way around.

 

1) Resort the ordering of the two Dirac matrices using the anticommutator that defines their algebra

ee = Library:-SortProducts(ee, [Dgamma[nu], Dgamma[mu]], useanticommutator)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`] = (-Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu])+2*Physics:-g_[mu, nu])*a[`~mu`]*a[`~nu`]

(7)

2) Simplify contracted indices

Simplify(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])*a[`~mu`]*a[`~nu`] = (-Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu])+2*Physics[g_][mu, nu])*a[`~mu`]*a[`~nu`])

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`] = -Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu])*a[`~mu`]*a[`~nu`]+2*a[mu]*a[`~mu`]

(8)

3) Isolate a^2

factor(isolate(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])*a[`~mu`]*a[`~nu`] = -Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu])*a[`~mu`]*a[`~nu`]+2*a[mu]*a[`~mu`], a[mu]*a[`~mu`]))

a[mu]*a[`~mu`] = (1/2)*a[`~mu`]*a[`~nu`]*(Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])+Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu]))

(9)

By inspection, you see that the rhs is the symmetrized version of gamma[mu]*gamma[nu]  and in view of the symmetry of a[`~mu`]*a[`~nu`] under exchange of mu and nu you can replace it by the non-symmetrized product

subs(gamma[mu]*gamma[nu] = gamma[mu]*gamma[nu], a[mu]*a[`~mu`] = (1/2)*a[`~mu`]*a[`~nu`]*(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])+Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu])))

a[mu]*a[`~mu`] = Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu])*a[`~mu`]*a[`~nu`]

(10)


 

Download SimplificationOfDgamma.mw

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

Hi
Just do it as with paper and pencil:

  1. You specify in your mind what indices you will use for spacetime and for space, e.g. respectively A and a, so uppercaselatin and lowercaselatin; tell the computer about that: Setup(spacetimeindices=uppercaselatin, spaceindices=lowercaselatin);

And that is all. You can now work using these two different kind of indices at the same time with exactly the meaning you attribute to them when computing with paper and pencil. Simplify, TensorArray, Library:-TensorComponents; all will perform the operations distinguising between 4 and 3 dimensions.

Two CAVEATS.

  1. If you work with a Minkowski spacetime, the default signature is ---+; in this case the 3D metric is Euclidean while the 3D components of the 4D spacetime metric, g_[a,b] all have a `-` sign in front. In this case, for 3D tensor operations, instead of g_[a,b] you can use the Physics:-gamma_[a,b] command, which is the true 3D metric. Alternatively, you can change the signature (Setup(signature = `-+++`)) and now the components of g_[a,b] and gamma_[a,b] are the same. And of course if you work with an Euclidean 4D spacetime, g_[a,b] = gamma_[a,b].
  2. If you work with an arbitrary curved spacetime, you need to use gamma_[a,b] as the 3D metric because the 3D components of g_, that is g_[a,b] are not a metric, ie. A[a] * A[~a] is different from g_[a,b] A[~a] A[~b].

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

First 36 37 38 39 40 41 42 Last Page 38 of 60