ecterrab

14605 Reputation

24 Badges

20 years, 98 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi

You know, to compute that exponential exactly and in finite form, you need, mainly, to know whether A and B commute with their commutator. Say this is the easy case, otherwise you have an infinite product. For the easy case you can use the Maple Physics package right away, as shown in this image:

Generally speaking to compute, in a more complicated situation, either a truncated expansion or a finite form when it exists, can also be done using Physics and its Physics:-Library tools.

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


 

Hi Bland3,

Below I intercalated a few comments, all italized - the text found in the worksheet you posted is not italized, and I didn't add input (all you see below is yours).

 

restart

with(Physics): with(combinat): with(LinearAlgebra): with(ArrayTools): with(ListTools): Setup(mathematicalnotation=true):

Setup(mathematicalnotation=true):

Setup(quantumop={cre,ann}, algebrarules={%AntiCommutator(cre[j],ann[k])=I*KroneckerDelta[j,k]})

`* Partial match of  'quantumop' against keyword 'quantumoperators'`

 

[algebrarules = {%AntiCommutator(cre[j], ann[k]) = I*Physics:-KroneckerDelta[j, k]}, quantumoperators = {ann, cre}]

(1)

 Algebra handles the anti-cummutations fine of the creation and annihilations, but not annihilation-annihilation or creation-creation.

 

You didn't tell the system about the algebra rules between annihilation - annihilation, nor creation - creation, and those rules are not implicit in %AntiCommutator(cre[j], ann[k]) = I*delta[j, k].

 

It also doesn't simplify products of these (such that terms like annihilation[j] ^2 should evaluate to 0).

 

That is true if and only if the ann[j] operator is fermionic, but you didn't indicate that to the system.

 

So here it doesn't know what to do with the annihilation-annihilation Anti-Commutator, so it assumes it commutes.

AntiCommutator(cre[1],ann[1]);
AntiCommutator(cre[1],ann[2]);

I

 

0

(2)

The two results above, actually, use the algebra rule you indicated, they are correct.

 

Simplify(ann[1]*ann[1]);

Physics:-`^`(ann[1], 2)

(3)

AntiCommutator(ann[1],ann[1]);

Physics:-AntiCommutator(ann[1], ann[1])

(4)

The two results above are also correct: neither ann[1] is anticommutative nor you told the system about the Anticommutator of the ann[j]. To indicate that your ann is anticommutative you can set ann to be an anticommutative prefix, as in "Setup(anticommutativeprefix=ann)."

 

Also relevant: why not using the Annihilation Creation commands that come with the Physics package? All these algebra rules and conventions, products, etc. are understood by the system without you having to defining everything from scratch.

 

I suggest you to try these two, and see if that is sufficient for you to formulate your problem. If not, please post again, now with using proper fermionic operators (as is implicit in your expected result for ann[1]^2)  and using the full-featured Annihilation / Creation operators that already come with the Physics package.


 

Download LatticeCalcsAlgebraIssues_(reviewed).mw

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

This one is fixed in the Physics Updates version 43, available from the Maplesoft R&D Physics webpage.

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

This is fixed in the latest Physics Updates available from the Maplesoft R&D Physics webpage.

restart

with(Physics)

g_[]

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

(1)

Coordinates(X)

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x1, x2, x3, x4)}

 

`Systems of spacetime Coordinates are:`*{X = (x1, x2, x3, x4)}

 

{X}

(2)

"d_[~4](C(X))"

Physics:-diff(C(X), x4)

(3)

Setup(metric = `+++-`)

_______________________________________________________

 

`The Minkowski metric, with signature + + + -, in coordinates `*[x1, x2, x3, x4]

 

_______________________________________________________

(4)

g_[]

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

(5)

So, for this metric, the covariant components differ from the contravariant ones in the sign of the component number 4.

 

Now your definitions

{A[`~mu`] = [0, 0, 0, n(X)], U[`~mu`] = [u(X), 0, 0, 1]}

Define(op(%), quiet)

Checking things ...

A[definition]

A[`~mu`] = [0, 0, 0, n(X)]

(6)

"A[~]"

A[`~mu`] = Array(%id = 18446744078375541566)

(7)

A[]

A[mu] = Array(%id = 18446744078375544702)

(8)

U[definition]

U[`~mu`] = [u(X), 0, 0, 1]

(9)

"U[~]"

U[`~mu`] = Array(%id = 18446744078375550974)

(10)

U[]

U[mu] = Array(%id = 18446744078375554214)

(11)

On the signs of the operator `∂`[mu] = d/dx^mu, take for instance A^4

"A[~4]"

n(X)

(12)

"d_[mu](A[~4])"

Physics:-d_[mu](n(X), [X])

(13)

TensorArray(%)

Array(%id = 18446744078375639750)

(14)

Now if you make the index contravariant, we expect a change in the sign of the component number 4

"d_[~mu](A[~4])"

Physics:-d_[`~mu`](n(X), [X])

(15)

TensorArray(%)

Array(%id = 18446744078375654934)

(16)

All OK. Resuming with the formulas of your question:

F[mu, nu] = d_[mu](A[nu])-d_[nu](A[mu])

F[mu, nu] = Physics:-d_[mu](A[nu], [X])-Physics:-d_[nu](A[mu], [X])

(17)

Define(%, quiet)

{A[`~mu`], Physics:-Dgamma[mu], F[mu, nu], Physics:-Psigma[mu], U[`~mu`], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(18)

F[definition]

F[mu, nu] = Physics:-d_[mu](A[nu], [X])-Physics:-d_[nu](A[mu], [X])

(19)

F[]

F[mu, nu] = Matrix(%id = 18446744078375529398)

(20)

"F[~]"

F[`~mu`, `~nu`] = Matrix(%id = 18446744078278073750)

(21)

The above looks OK to me. Then

"F[~0,~mu].U[mu]"

-F[mu, `~4`]*U[`~mu`]

(22)

This now returns the expected result.

TensorArray(-F[mu, `~4`]*U[`~mu`])

-(diff(n(X), x1))*u(X)

(23)

 

``


 

Download changing_signs_in_metric.mw

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

Hi nm,

Physics:-Version was written having for context the updates distributed with zips, before Maple 2018: nobody remembered the number (e.g., for Maple 2017 there were 300 updates uploaded), so looking at the date was simpler. The date of the last update was (and still is) posted at the Maplesoft R&D Physics webpage; comparing that date with the one shown by Physics:-Version(); you'd know whether you have the last version.

New in Maple 2018, the updates of physics, differential equations and mathematical functions code (that is the "Physics Updates" package) are now distributed through the MapleCloud, making the installation of the update really simpler. And the related MapleCloud version number is just the same version number you always saw in the Maplesoft R&D Physics webpage. Also new: this number can now be retrieved programmatically.

I just uploaded version 39, with several adjustments into the DE code, in connection with the use of the new (fantastic) DifferentialThomas package for performing differential elimination. In this update, I also modified Physics:-Version()so that it returns the version number as well.

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

Hi John

This problem is fixed in the Physics Updates version 37, available from the Maplesoft R&D Physics webpage. Attached is your worksheet revised, with some further comments: you do not need two LeviCivita (galilean and nongalilean) to perform this computation, because your tetrad system is already galilean (orthonormal) so that LeviCivita[a,b,c,d], with tetrad indices, is already galilean in that system of references.

 

Download MixedTypeLeviCivitas_(reviewed).mw

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

Hi Edahl,

The computation you show can be done in a simpler manner using the Physics package - check its help page (?Physics) and the help pages for Setup, g_, Christoffel, Ricci and LieDerivative. Important: if you dump things in text format, in order to help you people need to start copy & paste, prone to mistakes and more work. Instead of that, could you please upload the worksheet? For that purpose, you can use the green arrow you see when you write a question.

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

There is a bug in the MapleCloud regarding reporting the "Physics Updates" as installed, and therefore it also does not tell you there is an update available. For instance, there have been 22 updates already. The fix to this MapleCloud mechanism is scheduled for the end of the Sprint or the Summer. We are also looking for ways to fix this without having to wait for that much, but I am not sure about success.

Regarding how to uninstall a package, since there is this problem with the Cloud, the simplest way is to delete the directory, or depending on how many packages you have, the following suffices:

> PackageTools:-Uninstall(the_package_filename_complete);


If you delete the directory, on a Mac, it is below ~/Maple/toolbox. If you don't figure out where is the package installed, you can reinstall the package, the installer shows a message that includes the path.

Regarding updates, until this problem regarding reporting the "Physics Updates" is resolved,  you can enter 

>  PackageTools : -GetProperty("Physics Updates.maple", version);


and compare with the one shown in the Cloud. Hopefully next week the Maplesoft R&D Physics webpage will start showing the date and version of the latest update too.

Anyway if you reinstall an already installed version, there is no harm, and the simplest instruction to install the "Physics Updates", skipping all the MapleCloud details/steps, is to open Maple and enter this:

> PackageTools:-Install("5137472255164416", overwrite);


I realize all this is suboptimal. Distributing these updates through the MapleCloud is, however, the way to go (please no more prehistoric zips). Sometimes innovation comes flawlessly since day one. Other times, it requires adjustments. These problems are expected to be resolved rather soon anyway.

UPDATE Apr/30:

1) How does one uninstall a package listed in the "installed" list? I see no option to do this.

At this point, use PackageTools:-Uninstall("name_of_the_installed_package");

2) How does one know if the "installed" package needs to be updated or not? And if so, how does one updated it? 

That got fixed: click the upper-right corner MapleCloud and, in the toolbar that opens, on top of Updates, you will see a red icon indicating there are updates to one or more packages. Click Updates, and you will be taken to the MapleCloud window, section on Installed packages, where you will see a different color for the installation icon of those for which there are updates.

3) In the "packages" list, I see "physics Updates".  Now,  I did install this earlier (1-2 weeks ago). Then why is it not listed also under the "installed" list? 

That was a bug; it is fixed now. To have the fix working, however, you need to install the "Physics Updates" version 32 or higher, since to speed up matters the fix itself for this MapleCloud mechanism s distributed within the Physics Updates package.

3.b) And how does one know if they have installed a package that shows in the "packages" list?

Click Installed, and you will see a list of the installed packages. Alternatively, use PackageTools:-ListInstalledPackages(); that now works fine (provided you have "Physics Updates" version 32 or higher)

3.c) There is no marker or anything there to tell one they have installed it or not.  Is one supposed to go look in the "installed" list to manually check if they installed it or not?

Yes.

4) What happens if one install a package/app they have installed before. Will the new package overwrite the older version automatically?

Yes.

5) It seems packages installed go to some temporary folder. Is there a way to configure it, so that all packages installed go to some other user defined folder. This way, if one moves to a new PC or such, they do not lose all the packages they have installed? 

Packages are not installed into a temporary folder. They are installed under toolbox, and when the package only works with a specific Maple version - say 2018 - then it is installed under toolbox/2018. If you move to a new machine, it suffices to copy the entire toolbox directory, in the same parent directory you see it in the old machine (assuming the OS is the same, of course). Otherwise, take a screenshot of the Installed packages and reinstall them directly from the MapleCloud window (it is only one click per package).

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

Hi

I gave a look at the problem you posted. Firstly, there is a typo when you enter the integral, in the integration ranges:

[`p__3x ` = -infinity .. infinity, `p__3y ` = -infinity .. infinity, `p__3y ` = -infinity .. infinity]

You see you p__3y is repeated, that cannot be what you intended (makes no sense, this is a definite integral). I guess you intended the third one to be an integration range for  p__3z.

After fixing that, you receive a result that presents a piecewise function times infinity, basically this integral is undefined, each of the integrals is of the form

> Int(1/(a-b), b = -infinity .. infinity);

                        /infinity         
                       |            1     
                       |          ----- db
                       |          a - b   
                      /-infinity          

> value(%);
                           undefined

where a is a component of p__1 and b is the corresponding component of p__3. (Note that the exponential does not depend on p__3 therefore is taken outside of the integral, as a factor multiplying the result). So could you please clarify what is what you were expecting here (as you say, symbolically and/or numerically).

 

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

 


 

In your worksheet you use blocks of input with several input lines. That can, sometimes, make difficult to understand what is not working as desired. Below, where appropriate, I am splitting these blocks in pieces.

 

So, you first compute the metric matrix, then load Physics, then define the metric. Let's split that; first compute the matrix form of the metric you want to work with

restart

with(VectorCalculus); x := Vector([VectorCalculus:-`*`(VectorCalculus:-`+`(R, VectorCalculus:-`*`(r, cos(p))), cos(t)), VectorCalculus:-`*`(VectorCalculus:-`+`(R, VectorCalculus:-`*`(r, cos(p))), sin(t)), VectorCalculus:-`*`(r, sin(p))]); s := [p, t]; g := Matrix(nops(s), nops(s)); for i to nops(s) do for j to nops(s) do g[i, j] := simplify(DotProduct(diff(x, s[i]), diff(x, s[j]))) end do end do; g

Vector(3, {(1) = (R+r*cos(p))*cos(t), (2) = (R+r*cos(p))*sin(t), (3) = r*sin(p)})

 

s := [p, t]

 

Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0})

 

Matrix(%id = 18446744078323134206)

(1)

Now load Physics, and I also see you are not using mathematical notation so that contravariant indices are not being displayed as superscripts. To improve readability, let's the load Physics and set mathematical notation right away

with(Physics); Setup(mathematicalnotation = true)

[mathematicalnotation = true]

(2)

Now set your problem (indeed you do not need Dirac matrices for this so keep that line in comments, or remove it entirely)

Setup(dimension = 2); Coordinates(X = s); Setup(metric = g); g_[]

[dimension = 2]

 

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

 

{X}

 

[metric = {(1, 1) = r^2, (2, 2) = (R+r*cos(p))^2}]

 

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

(3)

To the side of the problem: I see that, below, you write text on input lines. You don't need to do that. Instead, place the cursor on an input line and press F5 so that it transforms into a text region where you can write text. You can also embed formulas within.

 

Now to the problem: to compute the Ricci scalar, of course you can substitute indices in the Riemann tensor or compute it directly, or contract with the metric. Let's see these three manners.

 

1. To substitute indices in the Riemann tensor you do not need to compute its Array form because the Array form has no indices. So instead of

NULL

try this

SubstituteTensorIndices({rho = mu, sigma = nu}, Riemann[mu, nu, rho, sigma])

Physics:-Ricci[nu, `~nu`]

(4)

To compute the value, sum over the repeated indices

SumOverRepeatedIndices(Physics[Ricci][nu, `~nu`])

2*cos(p)/((R+r*cos(p))*r)

(5)

I see you do not use equation labels: you can refer to the contents of an equation label by pressing Ctrl + L (or Command + L on a Macintosh).

 

2. Contracting with the metric

g_[mu, nu].Ricci[mu, nu]

Physics:-Ricci[`~nu`, nu]

(6)

SumOverRepeatedIndices(Physics[Ricci][`~nu`, nu])

2*cos(p)/((R+r*cos(p))*r)

(7)

3. Use the keyword scalar

Ricci[scalar]

2*cos(p)/((R+r*cos(p))*r)

(8)

You wrote your first question within an input line. I will split the block of input so that we can revise each of them

# This is the question about the contravariant Form of A[mu] ;

Define(A[mu], F, res)

`Defined objects with tensor properties`

 

{F, res, A[mu], 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:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[mu, nu], Physics:-SpaceTimeVector[mu](X)}

(9)

Next you attempt indicating the components of F using an assignment, via (here I am commenting the line)

NULL

 

I understand this seemed natural to you but it is not the way you do this. You indicate the components of F directly when you define it. Instead of the above, use the Define  command (in two lines, as I do here for readability, or all in one line):

F[mu, nu] = D_[mu](A[nu](X))

F[mu, nu] = Physics:-D_[mu](A[nu](X), [X])

(10)

Define(F[mu, nu] = Physics[D_][mu](A[nu](X), [X]))

`Defined objects with tensor properties`

 

{res, A[mu], Physics:-D_[mu], Physics:-Dgamma[mu], F[mu, nu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[mu, nu], Physics:-SpaceTimeVector[mu](X)}

(11)

Now you have F[mu, nu] defined as you wanted: check the definition, covariant and contravariant components

F[definition]

F[mu, nu] = Physics:-D_[mu](A[nu](X), [X])

(12)

F[]

F[mu, nu] = Matrix(%id = 18446744078411472758)

(13)

"F[~]"

F[`~mu`, `~nu`] = Matrix(%id = 18446744078421879974)

(14)

"F[mu,~nu,matrix]"

F[mu, `~nu`] = Matrix(%id = 18446744078421819870)

(15)

Note that the three above are different.

 

Next you attempt computing the trace of F. You can do that as you did

g_[mu, nu].F[`~mu`, `~nu`]; SumOverRepeatedIndices(%)

F[`~nu`, nu]

 

(diff(A[1](X), p))/r^2+(diff(A[2](X), t)-(R+r*cos(p))*sin(p)*A[1](X)/r)/(R+r*cos(p))^2

(16)

And also the other way you tried

SubstituteTensorIndices(nu = mu, F[mu, nu]); SumOverRepeatedIndices(%)

F[mu, `~mu`]

 

(diff(A[1](X), p))/r^2+(diff(A[2](X), t)-(R+r*cos(p))*sin(p)*A[1](X)/r)/(R+r*cos(p))^2

(17)

but it is simpler using the keyword trace

F[trace]

(-A[1](X)*sin(p)*cos(p)*r^2+cos(p)^2*(diff(A[1](X), p))*r^2-A[1](X)*sin(p)*R*r+2*cos(p)*(diff(A[1](X), p))*R*r+(diff(A[2](X), t))*r^2+(diff(A[1](X), p))*R^2)/(r^2*(R+r*cos(p))^2)

(18)

The result above is expanded, but it is the same as (16) or (17)

simplify((-A[1](X)*sin(p)*cos(p)*r^2+cos(p)^2*(diff(A[1](X), p))*r^2-A[1](X)*sin(p)*R*r+2*cos(p)*(diff(A[1](X), p))*R*r+(diff(A[2](X), t))*r^2+(diff(A[1](X), p))*R^2)/(r^2*(R+r*cos(p))^2)-(diff(A[1](X), p))/r^2-(diff(A[2](X), t)-(R+r*cos(p))*sin(p)*A[1](X)/r)/(R+r*cos(p))^2)

0

(19)

and if you want it simplified in size use

simplify((-A[1](X)*sin(p)*cos(p)*r^2+cos(p)^2*(diff(A[1](X), p))*r^2-A[1](X)*sin(p)*R*r+2*cos(p)*(diff(A[1](X), p))*R*r+(diff(A[2](X), t))*r^2+(diff(A[1](X), p))*R^2)/(r^2*(R+r*cos(p))^2), size)

((diff(A[1](X), p))*(R+r*cos(p))^2-(-(diff(A[2](X), t))*r+sin(p)*A[1](X)*(R+r*cos(p)))*r)/(r^2*(R+r*cos(p))^2)

(20)

 

In the following block, the problem is the same as before: you do not define tensors via assignment; you do that using the Define  command. I am commenting this  block and showing how to do it right after

# Above I defined the Tensor "res". I'm wondering if this is necessary for later assignments or not, because the following works for neither!;


# I want res when I select an index to show the concent...

Physics:-Christoffel[mu, 1, `~1`]+Physics:-Christoffel[mu, 2, `~2`]

 

res[1]

(21)

Try this instead

res[mu] = Christoffel[mu, nu, nu]

res[mu] = Physics:-Christoffel[mu, nu, `~nu`]

(22)

Define(res[mu] = Physics[Christoffel][mu, nu, `~nu`])

`Defined objects with tensor properties`

 

{A[mu], Physics:-D_[mu], Physics:-Dgamma[mu], F[mu, nu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], Physics:-g_[mu, nu], res[mu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[mu, nu], Physics:-SpaceTimeVector[mu](X)}

(23)

res[definition]

res[mu] = Physics:-Christoffel[mu, nu, `~nu`]

(24)

res[]

res[mu] = Array(%id = 18446744078323139398)

(25)

"res[~]"

res[`~mu`] = Array(%id = 18446744078323127230)

(26)

res[1]

r*sin(p)/(R+r*cos(p))

(27)

"res[~1]"

sin(p)/(r*(R+r*cos(p)))

(28)

Next there is this other block of text and comments, here I don't understand what you are trying to say. I keep the block and add some comments after it.

# This was the question about the two-fold application of SumOverRepeatedIndices... Actually I'm also a bit confused about the sign issue. Christoffel[mu,nu,nu] should give the correct contracted result or? However comparing this with the Christoffel Term from the covariant Derivative above it has a minus sign... If I do Christoffel[nu,nu,mu] I get the correct sign... ;
Christoffel[mu, 1, `~1`, Matrix]+Christoffel[mu, 2, `~2`, Matrix]; Christoffel[nu, nu, mu].A[mu]; SumOverRepeatedIndices(%); SumOverRepeatedIndices(%)

Christoffel[mu, 1, `~1`]+Christoffel[mu, 2, `~2`] = (Vector(2, {(1) = r*sin(p)/(R+r*cos(p)), (2) = 0}))

 

Physics:-Christoffel[nu, mu, `~nu`]*A[mu]

 

(Physics:-Christoffel[1, mu, `~1`]+Physics:-Christoffel[2, mu, `~2`])*A[`~mu`]

 

-sin(p)*r*A[`~1`]/(R+r*cos(p))

(29)

This is what you have

Christoffel[mu, 1, `~1`, Matrix]+Christoffel[mu, 2, `~2`, Matrix]

Physics:-Christoffel[mu, 1, `~1`]+Physics:-Christoffel[mu, 2, `~2`] = Vector[column](%id = 18446744078411455774)

(30)

"Christoffel[nu,nu,~mu].A[mu];  SumOverRepeatedIndices(`%`); "

Physics:-Christoffel[`~nu`, nu, `~mu`]*A[mu]

 

-sin(p)*A[1]/(r*(R+r*cos(p)))

(31)

Note that (30) and (31) are not using the same components of Christoffel, since, as you see, in (31), the first index is contravariant; the corresponding matrix for Christoffel is

"Christoffel[~nu,nu,~mu] = TensorArray(Christoffel[~nu,nu,~mu])"

Physics:-Christoffel[`~nu`, nu, `~mu`] = Array(%id = 18446744078323108790)

(32)

Summarizing:

 

• 

You can write text within text regions

• 

You can refer to the contents of equation labels using Ctrl + L

• 

To define the compotes of a tensor, use the Define  command, not the assignment operator :=

• 

To compute the Ricci scalar the simplest way, use Ricci[scalar]

• 

To compute the trace of a tensor whose components were defined using Define - say F - use F[trace]

• 

There is nothing wrong with the value of the components of the Christoffel symbols.

 

Regarding the last item, I believe you did not notice that in (29) you were comparing different components of Christoffel because you are not using mathematical notation (that is, extended typesetting), that shows contravariant indices as superscripts. So for that purpose:

• 

Use mathematical notation, via Setup( mathematicalnotation = true );

 

To the side of all this, in the PS you added a comment on the convention for the signature. Physics has a default value, that you can query via

Setup(signature)

[signature = `- +`]

(33)

But you can choose the reverse value (with more than 2 dimensions, there are actually four possible values for the signature). To change the signature use

Setup(signature = `+ -`)

[signature = `+ -`]

(34)

Check the metric

g_[]

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

(35)

Compare with (3)

"?"

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

(36)

So if you want the metric to be redefined according to this change in signature, see the Redefine  command. First check if this is what you want:

Redefine(metric, fromsignature = `-+`)

Matrix(%id = 18446744078421877214)

(37)

If this is what you want, then you can set it via Setup(metric = (37)) or directly copying the line above and adding the keyword setmetric

Redefine(metric, fromsignature = `-+`, setmetric)

Matrix(%id = 18446744078421866006)

(38)

Try it

g_[]

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

(39)

"Christoffel[~1,mu,nu,matrix]"

Physics:-Christoffel[`~1`, mu, nu] = Matrix(%id = 18446744078323150846)

(40)

``


 

Download Riemann-Scalar_for_Torus_MaplePrimes_(reviewed).mw


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

Hi Rahinui,

This one is also fixed, the fix works only in Maple 2018 and is available to everybody within the Maple 2018: Updates to Physics Differential Equations and Mathematical Functions, now distributed through the MapleCloud.

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

Hi Rahinui,

This one was a typo (too stringent restriction) to the arguments allowed as solving variables. It would have worked if you had entered A instead of A(). Anyway, it's fixed; the fix works only in Maple 2018 and is available to everybody within the Maple 2018: Updates to Physics Differential Equations and Mathematical Functions, now distributed through the MapleCloud.

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

 

Hi Rahinui

There is clearly an issue here. Anyway, a workaround is 

> PDEtools:-Solve(eq);
                                       {a = 0, c = c, r = 0}

and

 > PDEtools:-Solve(eq, {{c, r}});
                                 {c = 0, r = a}, {c = Pi, r = -a}

 

Now, indicating the unknowns as a double set or double list should not be necessary in this case. I will fix this in the next update for Maple 2018 distributed from the MapleCloud.

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

Here is a grey issue: in the Physics package, d_ is, more often than otherwise, used indexed as in d_[mu](A(x)), and as such it is a partial differential operator. At some point, this functionality got extended so that d_(A(x)) represents the total differential  of A(x), and summing over the repeated indices you see d_(x) popping around, displayed as `∂`(x)

 

with(Physics); Coordinates(cartesian, quiet)

{X}

(1)

d_(A(x))

Physics:-d_[mu](A(x), [X])*Physics:-d_((X)[`~mu`])

(2)

SumOverRepeatedIndices(Physics[d_][mu](A(x), [X])*Physics[d_]((X)[`~mu`]))

(diff(A(x), x))*Physics:-d_(x)

(3)

The question is whether to display the d-ronde in (3) as a straight d, as we see in textbooks for the total differential of x. There are two inconveniences:

 

1) the same command would have two different displays (easy to implement, but may be confusing, although we already have this kind of different display implemented in diff);

 

"2) d(x)" may mislead people into using d(x) as input to represent d_(x) which of course won't work, while displaying it as a `∂`(x) makes it clear that what you are looking at is not just d(x).

 

Also, introducing a single letter command 'd' for this purpose is not a good idea in general (to mention but one, the existence of D as Maple command is a historical inconvenience).

 

So, any ideas? Taking everything into account, is it d(x) better than `∂`(x)as the display for the total derivative of x that in Physics is implemented as d_(x)? 

 


 

Download d-ronde_or_d-straight.mw

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

For a Minkowski spacetime, we know, without even starting to write anything, that all the Christoffel symbols are equal to 0 and therefore everything that depends on them is too. To go ahead with tensor computations in a flat space as if the space were not flat would not be good.

Then, for a Schwarzschild metric, not only some of the Christoffel symbols are not zero but some of the Ricci rotation coefficients are also not zero. For example, 

So, in this case, it would be wrong to automatically set these rotation coefficients to 0, that is why "not also for Schwarzschild?".

Now, zero recognition "in advance" (this is what is implemented in the Physics code) is non-trivial, as it is zero-recognition in general, so the code does not aim for absolute performance regarding this, and you may find a way to enter a metric where the Christoffel symbols are actually all equal to zero but that is not obvious even after simplifying them. In these case, not wrong, the code will not automatically set everything that is Christoffel related to zero automatically.

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

First 31 32 33 34 35 36 37 Last Page 33 of 60