Getting wrong answer using Maple (Physics package)

  • Topic: Maple 
  • Thread starter graupner1000
  • Start date
  • Tags Tags
    Maple
1 reply · 3K views · last reply
graupner1000
Messages
15
Reaction score
1
Hi all,

I'm hoping somebody can save me from this impending frustration induced aneurysm. The problem lies with Maple's physics package and is this:

I am in an FLRW spacetime with metric

##ds^{2}=dt^{2}−a(t)^{2}(\frac{dr^{2}}{1−kr^{2}}+r^{2}d\theta^{2}+r^{2}sin^{2}(\theta)d\phi^{2})##

and a(t) is the scale factor. Now, I also have an antisymmetric, rank two tensor ##W## with components

##W^{23}=−W^{32}=\frac{1}{r^{2}a(t)^{2}sin(\theta)}##

and all others zero. So far, so straight forward. OK, next I want to take the covariant derivative of ω; rather easy with the Christoffel symbols given here http://universeinproblems.com/index...oblem_20:_Christoffel_symbols_for_FLRW_metric, and get

##\nabla_{\alpha} W^{\mu\nu} = 0##

Now, what I am doing involves many subsidiary calculations so I am doing it in Maple using the Physics package. I am confident in the answer above and have had somebody check it for me (by hand). The problem is, when telling maple to evaluate the above covariant derivative, it gives a different answer. Not only that, but seems, that giving it the same problem in three different ways results in different answers (neither of which is the one it should be). In one instance, it is the D_() command, in the second I use the "Define" command and D_() and in the other I am expanding the covariant derivative in terms of Christoffel symbols and using "Define" to input it as

d_[alpha](W[~mu,~nu]) + Christoffel[~mu,alpha,beta] W[~mu,~nu]+ Christoffel[~nu,alpha,beta] W[~mu,~nu]

The issue is less with this specific calculation, but more with whether or not I can rely on the package to give me the right answer (I'd rather not have to do it all by hand). So I basically wanted to ask where am I going wrong? Is it me or the software?

I've also attached screesshots of a minimal example . Any help would be very much appreciated. Meanwhile, I'm going to go and scream at a wall :)
Maple worksheet screenshot: restart with Physics, metric ds2 for FLRW spacetime, Define of tensor W with mu and nu indices as a 4 by 4 matrix, then Define of AI as D_alpha of W, and the matrix AI with components involving cos(theta) and a(t).
Maple worksheet screenshot: restart with Physics, metric ds2 for FLRW spacetime, Define of tensor W with mu and nu indices as a 4 by 4 matrix, then Define of AI as D_alpha of W, and the matrix AI with components involving cos(theta) and a(t).
 
Attachments
  • Maple session showing D_[2](W[~mu,~nu, matrix]) equal to a 4x4 matrix with entries cos(theta)/(a(t)^2 r^2 sin(theta)) and minus cos(theta)/(a(t)^2 r^2 sin(theta)^2), numbered (5).
    ProblemExample2.png
    57.3 KB · Views: 659
  • Like
Likes   Reactions: jedishrfu
Have you checked with MAPLE to see if anyone else has a similar problem? All software systems encounter bugs and manufacturers will provide either a workaround or state its a known issue.

One area that always messes calculations up is precedence of operation. You could try placing parentheses around factors and terms to insure they are computed in the right order:

A + B * C^2 vs (A + (B * (C^2) ) ) where you can clearly see that C^2 is computed first then B * C^2 and finally A + B * C^2