ecterrab

14630 Reputation

24 Badges

20 years, 147 days

MaplePrimes Activity


These are answers submitted by ecterrab

@digerdiga 

Besides Pascal4QM worksheets, there is something new in Maple 2020 that you may want to take advantage: the SU(2) tensor space has dimension 3 and is Euclidean. So, in Maple 2020, instead of changing the dimension of spacetime using Setup(dimension = 3, metric = Euclidean, spacetimeindices = lowercaselatin) as you did, just use Setup(su2indices = lowercaselatin). Then set the algebra rule using KroneckerDelta, that in Maple 2020 works as a tensor for su2, su3, spinor and gauge indices (not for spacetime, space or tetrad indices for which you already have metric commands available, g_, gamma_ and Tetrads:-eta_).

Regarding your other question, on Why the sum of two terms that cancel each other are not cancelling when I called Simplify? The answer is: these expressions involve not just tensors but noncommutative objects subject to commutator rules, and in that case, when the two things are taken at the same time, up to what I know, there is no fully systematic algorithm to get all the cases. In those situations, the two commands that help are Library:-SortProducts and SubstituteTensor. You can see several examples of how that is done in the post The hidden SO(4) symmetry of the Hydrogen Atom.

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


In what follows I work with a fully arbitrary metric, in Maple 2020 (it is probably the same in previous Maples). You can adapt the lines below to any specific form of the metric - see Sec II, subsection "Setting the space time metric"  of the Physics,Tensors  help page. In case adapting the lines below looks complicated, you may want to post again with a more specific question about that.

 

with(Physics)

Setup(coordinates = cartesian, g_ = arbitrary)

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x, y, z, t)}

 

`Systems of spacetime coordinates are:`*{X = (x, y, z, t)}

 

_______________________________________________________

 

`Setting `*lowercaselatin_is*` letters to represent `*space*` indices`

 

`The arbitrary metric in coordinates `*[x, y, z, t]

 

`Signature: `(`- - - +`)

 

_______________________________________________________

 

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

 

_______________________________________________________

 

[coordinatesystems = {X}, metric = {(1, 1) = _F1(X), (1, 2) = _F2(X), (1, 3) = _F3(X), (1, 4) = _F4(X), (2, 2) = _F5(X), (2, 3) = _F6(X), (2, 4) = _F7(X), (3, 3) = _F8(X), (3, 4) = _F9(X), (4, 4) = _F10(X)}, spaceindices = lowercaselatin_is]

(1)

This next input line is not necessary, but to make the display more compact (see at the end) let's do it here:

CompactDisplay([coordinatesystems = {X}, metric = {(1, 1) = _F1(X), (1, 2) = _F2(X), (1, 3) = _F3(X), (1, 4) = _F4(X), (2, 2) = _F5(X), (2, 3) = _F6(X), (2, 4) = _F7(X), (3, 3) = _F8(X), (3, 4) = _F9(X), (4, 4) = _F10(X)}, spaceindices = lowercaselatin_is])

` _F1`(X)*`will now be displayed as`*_F1

 

` _F10`(X)*`will now be displayed as`*_F10

 

` _F2`(X)*`will now be displayed as`*_F2

 

` _F3`(X)*`will now be displayed as`*_F3

 

` _F4`(X)*`will now be displayed as`*_F4

 

` _F5`(X)*`will now be displayed as`*_F5

 

` _F6`(X)*`will now be displayed as`*_F6

 

` _F7`(X)*`will now be displayed as`*_F7

 

` _F8`(X)*`will now be displayed as`*_F8

 

` _F9`(X)*`will now be displayed as`*_F9

(2)

All the covariant components of the Riemann tensor:

Riemann[]

Riemann[alpha, beta, mu, nu] = _rtable[18446744078390560638]

(3)

As the message tells, above there is only a slice of the 4x4x4x4 Array. In Maple 2020 you may want to explore the Array using TensorArray(R[alpha, beta, mu, nu], explore).

 

Get all the nonzero at once

NonZero := ArrayElems(rhs(Riemann[alpha, beta, mu, nu] = _rtable[18446744078390560638]))

 

There are as many as:

nops(NonZero)

144

(4)

Show the values of the indices for which you have a nonzero component

map(proc (u) options operator, arrow; [lhs(u)] end proc, NonZero)

{[1, 2, 1, 2], [1, 2, 1, 3], [1, 2, 1, 4], [1, 2, 2, 1], [1, 2, 2, 3], [1, 2, 2, 4], [1, 2, 3, 1], [1, 2, 3, 2], [1, 2, 3, 4], [1, 2, 4, 1], [1, 2, 4, 2], [1, 2, 4, 3], [1, 3, 1, 2], [1, 3, 1, 3], [1, 3, 1, 4], [1, 3, 2, 1], [1, 3, 2, 3], [1, 3, 2, 4], [1, 3, 3, 1], [1, 3, 3, 2], [1, 3, 3, 4], [1, 3, 4, 1], [1, 3, 4, 2], [1, 3, 4, 3], [1, 4, 1, 2], [1, 4, 1, 3], [1, 4, 1, 4], [1, 4, 2, 1], [1, 4, 2, 3], [1, 4, 2, 4], [1, 4, 3, 1], [1, 4, 3, 2], [1, 4, 3, 4], [1, 4, 4, 1], [1, 4, 4, 2], [1, 4, 4, 3], [2, 1, 1, 2], [2, 1, 1, 3], [2, 1, 1, 4], [2, 1, 2, 1], [2, 1, 2, 3], [2, 1, 2, 4], [2, 1, 3, 1], [2, 1, 3, 2], [2, 1, 3, 4], [2, 1, 4, 1], [2, 1, 4, 2], [2, 1, 4, 3], [2, 3, 1, 2], [2, 3, 1, 3], [2, 3, 1, 4], [2, 3, 2, 1], [2, 3, 2, 3], [2, 3, 2, 4], [2, 3, 3, 1], [2, 3, 3, 2], [2, 3, 3, 4], [2, 3, 4, 1], [2, 3, 4, 2], [2, 3, 4, 3], [2, 4, 1, 2], [2, 4, 1, 3], [2, 4, 1, 4], [2, 4, 2, 1], [2, 4, 2, 3], [2, 4, 2, 4], [2, 4, 3, 1], [2, 4, 3, 2], [2, 4, 3, 4], [2, 4, 4, 1], [2, 4, 4, 2], [2, 4, 4, 3], [3, 1, 1, 2], [3, 1, 1, 3], [3, 1, 1, 4], [3, 1, 2, 1], [3, 1, 2, 3], [3, 1, 2, 4], [3, 1, 3, 1], [3, 1, 3, 2], [3, 1, 3, 4], [3, 1, 4, 1], [3, 1, 4, 2], [3, 1, 4, 3], [3, 2, 1, 2], [3, 2, 1, 3], [3, 2, 1, 4], [3, 2, 2, 1], [3, 2, 2, 3], [3, 2, 2, 4], [3, 2, 3, 1], [3, 2, 3, 2], [3, 2, 3, 4], [3, 2, 4, 1], [3, 2, 4, 2], [3, 2, 4, 3], [3, 4, 1, 2], [3, 4, 1, 3], [3, 4, 1, 4], [3, 4, 2, 1], [3, 4, 2, 3], [3, 4, 2, 4], [3, 4, 3, 1], [3, 4, 3, 2], [3, 4, 3, 4], [3, 4, 4, 1], [3, 4, 4, 2], [3, 4, 4, 3], [4, 1, 1, 2], [4, 1, 1, 3], [4, 1, 1, 4], [4, 1, 2, 1], [4, 1, 2, 3], [4, 1, 2, 4], [4, 1, 3, 1], [4, 1, 3, 2], [4, 1, 3, 4], [4, 1, 4, 1], [4, 1, 4, 2], [4, 1, 4, 3], [4, 2, 1, 2], [4, 2, 1, 3], [4, 2, 1, 4], [4, 2, 2, 1], [4, 2, 2, 3], [4, 2, 2, 4], [4, 2, 3, 1], [4, 2, 3, 2], [4, 2, 3, 4], [4, 2, 4, 1], [4, 2, 4, 2], [4, 2, 4, 3], [4, 3, 1, 2], [4, 3, 1, 3], [4, 3, 1, 4], [4, 3, 2, 1], [4, 3, 2, 3], [4, 3, 2, 4], [4, 3, 3, 1], [4, 3, 3, 2], [4, 3, 3, 4], [4, 3, 4, 1], [4, 3, 4, 2], [4, 3, 4, 3]}

(5)

Each of these nonzero component, for instance Riemann[1,2,1,2] is large in size

length(Riemann[1, 2, 1, 2])

58299

(6)

A simplification in size can reduce some of them by approx 1/2

length(simplify(Riemann[1, 2, 1, 2], size))

31007

(7)

Simplify all of them by size and sort them by length

sorted_NonZero := sort([op(map(proc (u) options operator, arrow; %Riemann[lhs(u)] = simplify(rhs(u), size) end proc, NonZero))], length)

 

Show the first one, i.e. the smallest one

length(sorted_NonZero[1])

28044

(8)

sorted_NonZero[1]

%Riemann[2, 4, 2, 4] = ((((-_F8(X)*_F4(X)+_F3(X)*_F9(X))*_F2(X)+(_F8(X)*_F1(X)-_F3(X)^2)*_F7(X)-(_F9(X)*_F1(X)-_F4(X)*_F3(X))*_F6(X))*(diff(_F5(X), t))+((2*_F3(X)*_F6(X)-2*_F8(X)*_F2(X))*_F7(X)+2*_F9(X)*_F6(X)*_F2(X)+(-2*_F6(X)^2+2*_F8(X)*_F5(X))*_F4(X)-2*_F5(X)*_F9(X)*_F3(X))*(diff(_F2(X), t))+((2*_F3(X)*_F6(X)-2*_F8(X)*_F2(X))*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*_F6(X)*_F10(X)-_F5(X)*(_F9(X)*_F4(X)-_F10(X)*_F3(X)))*(diff(_F9(X), t)))*(diff(_F2(X), y))+((-2*_F7(X)^2*_F3(X)+(2*_F6(X)*_F4(X)+2*_F9(X)*_F2(X))*_F7(X)-2*_F2(X)*_F6(X)*_F10(X)-2*_F5(X)*(_F9(X)*_F4(X)-_F10(X)*_F3(X)))*(diff(_F2(X), y))+(_F7(X)^2*_F3(X)+(-_F6(X)*_F4(X)-_F9(X)*_F2(X))*_F7(X)+_F2(X)*_F6(X)*_F10(X)+_F5(X)*(_F9(X)*_F4(X)-_F10(X)*_F3(X)))*(diff(_F5(X), x))+((_F9(X)*_F4(X)-_F10(X)*_F3(X))*_F2(X)+(-_F9(X)*_F1(X)+_F4(X)*_F3(X))*_F7(X)+(_F10(X)*_F1(X)-_F4(X)^2)*_F6(X))*(diff(_F5(X), y))-(_F2(X)^2*_F10(X)-2*_F7(X)*_F2(X)*_F4(X)+_F7(X)^2*_F1(X)-_F5(X)*(_F10(X)*_F1(X)-_F4(X)^2))*(diff(_F5(X), z)-2*(diff(_F6(X), y))))*(diff(_F10(X), z))+((2*_F10(X)*_F6(X)^2-4*_F9(X)*_F6(X)*_F7(X)+2*_F8(X)*_F7(X)^2-2*_F5(X)*(_F8(X)*_F10(X)-_F9(X)^2))*(diff(_F5(X), x))+((-2*_F8(X)*_F10(X)+2*_F9(X)^2)*_F2(X)+(2*_F8(X)*_F4(X)-2*_F3(X)*_F9(X))*_F7(X)-2*(_F9(X)*_F4(X)-_F10(X)*_F3(X))*_F6(X))*(diff(_F5(X), y))+2*(-_F7(X)^2*_F3(X)+(_F6(X)*_F4(X)+_F9(X)*_F2(X))*_F7(X)-_F2(X)*_F6(X)*_F10(X)-_F5(X)*(_F9(X)*_F4(X)-_F10(X)*_F3(X)))*(diff(_F5(X), z)-2*(diff(_F6(X), y))))*(diff(_F4(X), t))+((2*_F10(X)*_F6(X)^2-4*_F9(X)*_F6(X)*_F7(X)+2*_F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X)^2-8*_F5(X)*_F9(X)*_F3(X)*_F4(X)+4*_F10(X)*_F6(X)^2*_F1(X)-4*_F5(X)*(-_F1(X)*_F9(X)^2+_F10(X)*(_F8(X)*_F1(X)-_F3(X)^2)))

(9)

``

 Note in the above: the functionality of the arbitrary functions is not shown because of that call to CompactDisplay; and for the same reason, derivatives are displayed using indexation (with the differentiation variables as indices).


 

Download The_Riemann_tensor_for_an_arbitrary_metric.mw

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

I can't tell why it hangs; I'd guess it has to do with some operations that moved into kernel extensions for performance ... but I am not sure in this case. What I can tell is that this is a problem in the handling of trig expressions that should not be happening. I am not working in the simplifier these days but will forward the example to the appropriate people.

Meantime, the place where the computational flow hits this problem is when trying to solve an intermediate ODE of the characteristic strip related to your PDE. I added some 'look closer' before jumping into a generic combination of trig functions (where the problem is currently hanging, in the presence of non-constant powers of trig functions). The change is distributed for everybody as usual within the Maplesoft Physics Updates (for Maple 2020), v.627 and higher, and with that, the flow doesn't hit the problem anymore. Your timelimit then works as expected.

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

Hi nm,
The first version of the Physics Updates for Maple 2020, with number 620, is there. It includes some improvements in assumingunapply (using intats when unapplying integrals) and improvements in Physics (displaying metric and signature now by default), things requested by Beta testers during the testing of the version of Maple released today. The Maplesoft R&D Physics webpage, however, still needs to be updated telling this version is for Maple 2020, not Maple 2019. 

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

Right before your equation (4.3), instead of subs(Maxwell_2, %) use subs(diff(Maxwell_2, t), %), where `%` represents equation (4.2). That results in what you are asking, ie "replace Curl of H with an expression in D."

Alternatively, you can formulate the same using noncommutative products of differential operators (using * as multiplication, representing application) but that is a more advanced (unnecesary, I'd say) use of the package. For details on how to do that, see the help page ?Physics,Tensors, Sec I.6.

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

 This is your worksheet, reviewed, and with comments intercalated in italics.

with(Physics)

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 619 and is the same as the version installed in this computer, created 2020, March 8, 13:8 hours, found in the directory /Users/ecterrab/maple/toolbox/2019/Physics Updates/lib/`

(1)

Setup(mathematicalnotation = true, coordinates = cartesian)

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x, y, z, t)}

 

`Systems of spacetime coordinates are:`*{X = (x, y, z, t)}

 

_______________________________________________________

 

[coordinatesystems = {X}, mathematicalnotation = true]

(2)

Redefine(setall, tosignature = "-+++")

[X], Matrix(%id = 18446744078324226758)

(3)

Coordinates()

`Systems of spacetime coordinates are:`*{X = (t, x, y, z)}

 

{X}

(4)

ds2 := -dt^2+(1-K*(y^2+z^2))*dx^2/(1-K*(x^2+y^2+z^2))+(1-K*(x^2+z^2))*dy^2/(1-K*(x^2+y^2+z^2))+(1-K*(x^2+y^2))*dz^2/(1-K*(x^2+y^2+z^2))+2*K*x*y*dx*dy/(1-K*(x^2+y^2+z^2))+2*K*x*z*dx*dz/(1-K*(x^2+y^2+z^2))+2*K*y*z*dy*dz/(1-K*(x^2+y^2+z^2))

-dt^2+(1-K*(y^2+z^2))*dx^2/(1-K*(x^2+y^2+z^2))+(1-K*(x^2+z^2))*dy^2/(1-K*(x^2+y^2+z^2))+(1-K*(x^2+y^2))*dz^2/(1-K*(x^2+y^2+z^2))+2*K*x*y*dx*dy/(1-K*(x^2+y^2+z^2))+2*K*x*z*dx*dz/(1-K*(x^2+y^2+z^2))+2*K*y*z*dy*dz/(1-K*(x^2+y^2+z^2))

(5)

Setup(metric = ds2, signature)

[metric = {(1, 1) = -1, (2, 2) = (1-K*(y^2+z^2))/(1-K*(x^2+y^2+z^2)), (2, 3) = K*x*y/(1-K*(x^2+y^2+z^2)), (2, 4) = K*x*z/(1-K*(x^2+y^2+z^2)), (3, 3) = (1-K*(x^2+z^2))/(1-K*(x^2+y^2+z^2)), (3, 4) = K*y*z/(1-K*(x^2+y^2+z^2)), (4, 4) = (1-K*(x^2+y^2))/(1-K*(x^2+y^2+z^2))}, signature = `- + + +`]

(6)

According to your last reply, what you are intending is to define the vierbein. First note that the vierbein has one spacetime index and one tetrad index, not two spaceindices as you did. Then note please that in the Physics package there is already a subpackage, called Tetrads, that includes the vierbein, so it is already programmed, you do not need to compute it yourself:

with(Tetrads)

_______________________________________________________

 

`Setting `*lowercaselatin_ah*` letters to represent `*tetrad*` indices`

 

((`Defined as tetrad tensors `(`see ?Physics,tetrads`)*`, `*`𝔢`[a, mu]*`, `)*eta[a, b]*`, `*gamma[a, b, c]*`, `)*lambda[a, b, c]

 

((`Defined as spacetime tensors representing the NP null vectors of the tetrad formalism `(`see ?Physics,tetrads`)*`, `*l[mu]*`, `)*n[mu]*`, `*m[mu]*`, `)*conjugate(m[mu])

 

_______________________________________________________

 

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

(7)

So `𝔢`[a, mu] is the tetrad, note the first index is not a spacetime index but a tetrad index. These are the components with the second index contravariant

e_[a, `~mu`, matrix]

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

(8)

The inverse of the tetrad is the same tetrad with different character (covariant, contravariant) of its indices, since, by definition,

e_[definition]

Physics:-Tetrads:-e_[a, mu]*Physics:-Tetrads:-e_[b, `~mu`] = Physics:-Tetrads:-eta_[a, b]

(9)

where

eta_[]

Physics:-Tetrads:-eta_[a, b] = Matrix(%id = 18446744078189447878)

(10)

So the (physics) inverse of (8) is given by

e_[]

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

(11)

But if you want to compute the inverse as in matrix inverse then

"A := rhs(?)"

Matrix(%id = 18446744078189495830)

(12)

B := 1/A

Matrix(%id = 18446744078198753990)

(13)

simplify(A.B)

Matrix(%id = 18446744078198905902)

(14)

If you want to define some f with this matrix B, use

f[`~a`, nu] = B

f[`~a`, nu] = Matrix(%id = 18446744078198753990)

(15)

"Define(?)"

`Defined objects with tensor properties`

 

{Physics:-D_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], Physics:-Tetrads:-e_[a, mu], Physics:-Tetrads:-eta_[a, b], f[`~a`, nu], Physics:-g_[mu, nu], Physics:-Tetrads:-gamma_[a, b, c], Physics:-Tetrads:-l_[mu], Physics:-Tetrads:-lambda_[a, b, c], Physics:-Tetrads:-m_[mu], Physics:-Tetrads:-mb_[mu], Physics:-Tetrads:-n_[mu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(16)

Summary:

1. 

The vierbein is already there in the Physics:-Tetrads package. Note also the command Tetrads:-TransformTetrad  to rotate it.

2. 

The vierbein has one tetrad index, the other is a spacetime index (not two spacetime indices).

3. 

The vierbein satisfies "`𝔢`[a,mu] `𝔢`[b]^(mu)=eta[a,b]" where the right-hand side is not the identity matrix,but as you see in (10)

4. 

If you are going to define some f as "the inverse of the vierbein" (in some sense which is not (10)), you need to think carefully what kind of indices you use for f, and what character (covariant, contravariant) for each of them.

 

I suggest you to revise these points.

``


 

Download Christoffel_symbols_of_de_Sitter_metric_research_(reviewed).mw

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

Executing your worksheet, the error says something different: "Error, (in Physics:-Define) received a definition where the number of free indices on the left-hand side (2) is not equal to the number of dimensions of the array on the right-hand side (1)"

Indeed, if I now enter

ArrayDims(rhs(%));
                                  1 .. 1, 1 .. 4

So the right-hand-side of your defining equation is not a 4x4 matrix (that is what the error message is saying).

On the other hand, your e[~mu,nu] is a 4x4 matrix so a plan would be 1) Define your e[~mu,nu] as a tensor then 2) enter f[~mu,nu] = rhs(e[definition])^(-1), then 3) Define that (say as in Define(%);) in order  to have f be the inverse tensor of e. While computing the inverse of the matrix defining e you may need to use some tricks since it is a 4x4 matrix involving huge expressions. For example, try taking the inverse of an arbitrary matrix with components thare are simple names, that is fast:

M := Matrix(4, symbol=m)^(-1)

Then substitute each of the m[i,j] in this arbitary inverse matrix by the components of your tensor e.

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

Hi

It shouldn't be necessary, but for now use Dgamma[5] instead of Dgamma[~5]. I will fix this latter today and upload a new Physics Updates with the fix for everybody.

Note also that the sign in the expected result you mention, "-4*i*epsilon[~mu,~nu,~rho,~sigma]", depends on the convention for Dgamma[5], explained in the help page, which by the way shows this result you mention with the sign you mention: during an overhaul of Dgamma that happened for Maple 2018 the help page missed an update of that sign. In summary, with the convention for Dgamma[5] used in Maple following the literature mentioned in ?Dgamma, expect + 4 i ..., not - 4 i ...

The output of Physics:-Trace comes in terms of a sum of products of metric factors g_[mu, n] with n an integer. That output is equal to the one using LeviCivita. That is something that could be improved: the output with LeviCivita is naturally simpler.

To verify the sign (is it + or -) for correctness, or for the case everything else, you can proceed as follows:

  1. Substitute some values for the indices, e.g. eval(formula, [~mu = 1, ~nu = 2, ~rho = 3, ~sigma = 4]). You will get Dgamma[1]*Dgamma[2]*Dgamma[3]*Dgamma[4]*Dgamma[5] = 4*I.
  2. use Library:-RewriteInMatrixForm(%) to see the actual matricial form of this equation.
  3. Input % to produce the evaluation of the product of matrices and give a look: you see the expected sign (as said, for the convention used for Dgamma[5], it is +, not - ).

I will add a note to this answer later today when the correction to this ~5 issue is uploaded in the next Physics Updates.

NOTE: this issue of not handling ~5 in equal footing as 5 when this is the index of a Dirac matrix is resolved and the solution uploaded within the Physics Updates v.603 or higher.

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


Hi umbli,

I intercalated some comments italized below, and in general, regarding questions on how to do something, you can give a look at the Mapleprimes post "A Complete Guide for peforming Tensor Computations using Physics". In Maple 2019, that guide is also a help page, ? Physics,Tensors

restart

with(Physics)

Setup(signature = `-+++`, coordinates = (X = [t, r, theta, phi]))

(`Defined Pauli sigma matrices (Psigma): `*sigma[0]*`, `*sigma[1]*`, `)*sigma[2]*`, `*sigma[3]

 

__________________________________________________

 

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

 

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

 

_______________________________________________________

 

[coordinatesystems = {X}, signature = `- + + +`]

(1)

Setup(g_ = -exp(2*alpha(r))*dt^2+dr^2/(1-2*m(r)/r)+r^2*dtheta^2+r^2*sin(theta)^2*dphi^2)

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

(2)

Setup(spacetimeindices = lowercaselatin)

[spacetimeindices = lowercaselatin]

(3)

g_[]

Physics:-g_[a, b] = Matrix(%id = 18446744078322510054)

(4)

"Christoffel[~1,a,b]"

Physics:-Christoffel[`~1`, a, b]

(5)

"Christoffel[~0,a,b,matrix]"

Physics:-Christoffel[`~1`, a, b] = Matrix(%id = 18446744078397546358)

(6)

Ricci[0, 1]

-(2*m(r)*(diff(alpha(r), r))^2*r-(diff(alpha(r), r))^2*r^2+2*(diff(diff(alpha(r), r), r))*r*m(r)-(diff(diff(alpha(r), r), r))*r^2+(diff(alpha(r), r))*r*(diff(m(r), r))+3*(diff(alpha(r), r))*m(r)-2*(diff(alpha(r), r))*r)*exp(2*alpha(r))/r^2

(7)

Ricci[a, b, matrix]

Physics:-Ricci[a, b] = Matrix(%id = 18446744078397521182)

(8)

Ricci[1, 2]

0

(9)

Einstein[a, b, matrix]

Physics:-Einstein[a, b] = Matrix(%id = 18446744078352837318)

(10)

Define(u[a] = [exp(alpha(r)), 0, 0, 0])

`Defined objects with tensor properties`

 

{Physics:-D_[a], Physics:-Dgamma[a], Physics:-Psigma[a], Physics:-Ricci[a, b], Physics:-Riemann[a, b, c, d], Physics:-Weyl[a, b, c, d], Physics:-d_[a], Physics:-g_[a, b], u[a], Physics:-Christoffel[a, b, c], Physics:-Einstein[a, b], Physics:-LeviCivita[a, b, c, d], Physics:-SpaceTimeVector[a](X)}

(11)

u[definition]

u[a] = [exp(alpha(r)), 0, 0, 0]

(12)

u[a]^2

u[a]*u[`~a`]

(13)

Regarding your question 1) Look closer to the next input line: you forgot placing parenthesis around (13) :

SumOverRepeatedIndices*u[a]*u[`~a`]

Physics:-SumOverRepeatedIndices*u[a]*u[`~a`]

(14)

Withoug the parenthesis, the above is "the product" of the word SumOverRepeatedIndices with u[a]*u[`~a`].

 

With the parenthesis you get what you wanted

SumOverRepeatedIndices(u[a]*u[`~a`])

-1

(15)

Regarding 2)

B[a, b] = D_[a](u[b])

B[a, b] = Physics:-D_[a](u[b], [X])

(16)

Define(B[a, b] = D_[a](u[b], [X]))

`Defined objects with tensor properties`

 

{B[a, b], Physics:-D_[a], Physics:-Dgamma[a], Physics:-Psigma[a], Physics:-Ricci[a, b], Physics:-Riemann[a, b, c, d], Physics:-Weyl[a, b, c, d], Physics:-d_[a], Physics:-g_[a, b], u[a], Physics:-Christoffel[a, b, c], Physics:-Einstein[a, b], Physics:-LeviCivita[a, b, c, d], Physics:-SpaceTimeVector[a](X)}

(17)

B[definition]

B[a, b] = Physics:-D_[a](u[b], [X])

(18)

B[]

B[a, b] = Matrix(%id = 18446744078477034670)

(19)

"B[~]"

B[`~a`, `~b`] = Matrix(%id = 18446744078471457718)

(20)

Regarding 3), check the help page ? Physics , it has an alphabetical listing ofcommands with one line descriptions, there you see Symmetrize and Antisymmetrize

Symmetrize(B[a, b])

(1/2)*B[a, b]+(1/2)*B[b, a]

(21)

TensorArray((1/2)*B[a, b]+(1/2)*B[b, a])

Matrix(%id = 18446744078365857422)

(22)

Antisymmetrize(B[a, b])

(1/2)*B[a, b]-(1/2)*B[b, a]

(23)

TensorArray((1/2)*B[a, b]-(1/2)*B[b, a])

Matrix(%id = 18446744078365866574)

(24)

NULL


 

Download tov_(reviewed).mw

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

Hi

The page ?Physics,Tensors, sec. II, has a subsection about Tetrads and the local system of references. That section, combined with the help pages for the commands illustrated there, give answers to everything about tetrads. Denitsa's answer is also accordingly. I gave a look at your worksheet too, everything looks correct, the only thing I'd point out is to recall that the signature used in Physics by default always has the time-like component in position 4, not 1 (so that, e.g. in Cartesian, X[1] = x, instead of X[1] = t and X[2] = x). So, when displaying the null tetrad as you do in your worksheet, you see the number 1 takes the diagonal from right to left (the opposite of the one of the identity matrix).

In your worksheet, however, I see t in position 1, so I suppose you are using Maple 2019.0? There were two upgrades (for free). The current version is 2019.2. I'd recommend you to install it, it contains several fixes and improvements.

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

You can set the coordinates in any way you prefer, for instance, Coordinates(X = [x1, x2, x3, t]). See section 1.a in the help page ?Physics,Tensors.

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

with(Physics)

Setup(mathematicalnotation = true)

[mathematicalnotation = true]

(1)

Setup(coordinatesystems = 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)}

(2)

ds2 := -dt^2+a(t)^2*dr^2/(-k*r^2+1)+a(t)^2*r^2*dtheta^2+a(t)^2*r^2*sin(theta)^2*dphi^2

-dt^2+a(t)^2*dr^2/(-k*r^2+1)+a(t)^2*r^2*dtheta^2+a(t)^2*r^2*sin(theta)^2*dphi^2

(3)

Setup(coordinates = spherical, metric = ds2)

`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) = a(t)^2/(-k*r^2+1), (2, 2) = a(t)^2*r^2, (3, 3) = a(t)^2*r^2*sin(theta)^2, (4, 4) = -1}]

(4)

e[mu, `~nu`] = Matrix(4, {(1, 1) = a(t)/sqrt(-k*r^2+1), (2, 2) = a(t)*r, (3, 3) = a(t)*r*sin(theta), (4, 4) = 1}, fill = 0)

e[mu, `~nu`] = Matrix(%id = 18446744078374980414)

(5)

"Define(?)"

`Defined objects with tensor properties`

 

{Physics:-D_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], e[mu, `~nu`], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(6)

f[`~mu`, nu] = Matrix(4, {(1, 1) = sqrt(-k*r^2+1)/a(t), (2, 2) = 1/(a(t)*r), (3, 3) = 1/(a(t)*r*sin(theta)), (4, 4) = 1}, fill = 0)

f[`~mu`, nu] = Matrix(%id = 18446744078480903094)

(7)

"Define(?)"

`Defined objects with tensor properties`

 

{Physics:-D_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], e[mu, `~nu`], f[`~mu`, nu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(8)

e[nu, `~alpha`].f[`~sigma`, beta].Christoffel[`~nu`, sigma, mu]

e[nu, `~alpha`]*f[beta, sigma]*Physics:-Christoffel[`~nu`, mu, `~sigma`]

(9)

The output above tells you there is nothing to simplify there. If what you want is the array of components of this tensorial expression, try instead

TensorArray(e[nu, `~alpha`]*f[beta, sigma]*Physics[Christoffel][`~nu`, mu, `~sigma`])

Array(%id = 18446744078480950566)

(10)

If you have Maple 2019.2 and are working with one of the latest versions of the Physics Updates, then you can use the (still undocumented but already working) explore keyword

TensorArray(e[nu, `~alpha`]*f[beta, sigma]*Physics[Christoffel][`~nu`, mu, `~sigma`], explore)


``


 

Download Maple_inner_tensor_product.mw

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

Take a look at the help page of PDEtools, the table of symmetry commands. You can attempt the computation of symmetries of any sort.

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

I just received the following from Katherina von Bulow.

 

Again, the problem:

pde := convert(diff(T(x, y, t), x, x)+diff(T(x, y, t), y, y) = (diff(T(x, y, t), t))/(0.44e-2), rational, exact); conds := T(0, y, t) = 1, T(1, y, t) = 1, T(x, 0, t) = 1, T(x, 1, t) = 1, T(x, y, 0) = 0

diff(diff(T(x, y, t), x), x)+diff(diff(T(x, y, t), y), y) = (2272727273/10000000)*(diff(T(x, y, t), t))

 

T(0, y, t) = 1, T(1, y, t) = 1, T(x, 0, t) = 1, T(x, 1, t) = 1, T(x, y, 0) = 0

(1)

The following change of variables (rather easy ..) suffices to solve the problem as an infinite series, with no composed differential operators around

tr := T(x, y, t) = U(x, y, t)+1

T(x, y, t) = U(x, y, t)+1

(2)

itr := isolate(tr, U(x, y, t))

U(x, y, t) = T(x, y, t)-1

(3)

PDEtools:-dchange(tr, [pde, conds], [U(x, y, t)])

[diff(diff(U(x, y, t), x), x)+diff(diff(U(x, y, t), y), y) = (2272727273/10000000)*(diff(U(x, y, t), t)), U(0, y, t)+1 = 1, U(1, y, t)+1 = 1, U(x, 0, t)+1 = 1, U(x, 1, t)+1 = 1, U(x, y, 0)+1 = 0]

(4)

Call now,

pdsolve([diff(diff(U(x, y, t), x), x)+diff(diff(U(x, y, t), y), y) = (2272727273/10000000)*(diff(U(x, y, t), t)), U(0, y, t)+1 = 1, U(1, y, t)+1 = 1, U(x, 0, t)+1 = 1, U(x, 1, t)+1 = 1, U(x, y, 0)+1 = 0])

U(x, y, t) = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity)

(5)

Change variables back and isolate T(x, y, t)

PDEtools:-dchange(itr, U(x, y, t) = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity), [T(x, y, t)])

T(x, y, t)-1 = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity)

(6)

isolate(T(x, y, t)-1 = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity), T(x, y, t))

T(x, y, t) = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity)+1

(7)

Besides that this approach solves the problem in a more useful way, the lines above also mean there is something else to adjust in the internal series routines. Although sometimes completely non-obvious, the internal routines are supposed to unveil the need of a transformation of this kind for examples like this one.

``


 

Download PDE_solution_via_change_of_variables.mw

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

Hi Larry
Good catch. The problem is fixed for everybody within the Physics Updates v.453 and higher.

Details: the problem was not related to  Library:-PerformMatrixOperations - you could reproduce it just entering mt . Dgamma[2] . m . Maple's implementation of Matrix is such that - e.g. - evalb(Matrix(2,[a,b]) = Matrix(2,[a,b])) returns false. The composition of three of these objects put an internal subroutine in trouble. Anyway, it is fixed now. Thanks for posting the problem.

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

First 22 23 24 25 26 27 28 Last Page 24 of 60