ecterrab

13431 Reputation

24 Badges

19 years, 362 days

MaplePrimes Activity


These are replies submitted by ecterrab

Hi

First of all, after restart you have a comma `,`, not `;`. Also, I cannot reproduce the output you show in your worksheet. For example: you show covariant derivatives in some output, but there are none in the input lines.

Could you please then put a `;` after restart and re-execute the worksheet (just click that "!!!" icon) and poste it again? Also, what version of Maple and Physics are you using? For the latter, please enter Physics:-Version()[2] and you will see the date. Could you please include that in the worksheet? In any case what I recommend is to have the latest version installed, that you can download from the Maplesoft R&D Physics webpage.

Edgardo S. Cheb-Terrab Syria

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

@JonMcLoone 

Yes, I agree entirely with you that any comparison should include numerical solving of everything: DEs, integrals, sums, special functions, etc. Although these systems are mainly for "symbolic computation", it has been recognized long time ago that they are actually hybrid systems, excelling also in "numerical computation".

Yes, the recent Mathematica 10 introduced symbolic solutions to delay ODEs, and we do not have that in current Maple (we may in a week and distribute it in the Maplesoft R&D webpage for DEs :) just a joke!).

No, I don't think that you will find a different (unbiased, of course) test arena where the symbolic ODE or PDE solving capabilities of Mathematica and Maple are equivalent. The better performance of the Maple system in this area is wide range and across the board.

The difference regarding symbolic solving of PDEs and PDE systems, mixed or not with ODEs and/or algebraic equations, including or not mathematical functions in the equations (i.e. not just polynomial equations) is even more dramatic than the difference regarding symbolic solving of ODEs, e.g. with Kamke's suite. The key observation here, Jon, is differential algebra, one of the things that doesn't exist in Mathematica and that I mentioned in  "Maple strengths compared to Mathematica and Matlab". I think it is practically impossible to achieve the performance you see in Maple's DE solving without differential algebra support. Maple introduced a differential algebra package in 1996. I note as well that Maple symbolically solves piecewise defined/discontinuous ODEs also since 1996, almost 20 years before Mathematica introduced code for this problem.

Now, I re-read the whole thread, let me contextualize at the risk of repeating: I think both systems are great, and that in this case "which one is better" looks like an ill-posed question. On the other hand, understanding the relative strengths of each system, where each system performs better, is relevant information, and I tried to focus that - the Maple side - in my reply in this thread and forum, regarding physics, differential equations and mathematical functions. Independent of that, I also agree with you in that whatever is incorrect in a comparison document should be corrected, even if unilaterally - regardless that I already read comparisons in Mathematica's website, regarding Maple, that look biased and incorrect to me (including mocking, something you do not see in the official Maplesoft comparison document). Biased comparisons are of no real use.

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

@JonMcLoone 

First, you are welcome, Jon. The fact that Mapleprimes is basically a Maple forum doesn't change that it is open, and mostly nobody here is fanatic, hey! :) You are honestly welcome to post your views here.

Now on the topic: on my reply in this thread I gave my opinion pointing to a previous post, in which I mentioned what I feel more relevant, in  "Maple strengths compared to Mathematica and Matlab". I also updated (above) with a relevant comment, on nice new functionality using rather abstract mathematics, and illustrated with concrete posts showing examples ("PDEs & Boundary Conditions", "Nth order symbolic derivatives" and "Sequences").

You replied pointing to the official Maplesoft comparison document, on which you dispute some of the claims page by page, but you didn't dispute any of those on Page 9, entitled "Mathematics". I think this is a relevant page, just from the title. This page also points to some of the same strengths mentioned in  "Maple strengths compared to Mathematica and Matlab", regarding relevant mathematics and physics functionality that does not exist in Mathematica.

Page 9 is also incomplete on a relevant topic: the conversion network for the whole set of mathematical functions plus the FunctionAdvisor. All this is alive stuff with which you can effectively compute within a Maple worksheet, not just static information searchable on the web. Page 9 is also out-of-date not just regarding Mathematica's current version but also regarding Maple's current version, as is illustrated with links in my previous reply in this thread (above).

To mention but one more relevant thing, Maple also offers, to everybody, bug fixing and new developments around the clock in the areas of Physics, Differential Equations and Mathematical Functions and a lot of related code (e.g. the simplifier). These Maplesoft R&D webpages are updated several times per week, taking concrete users' feedback into account. I am not aware of anything like this in Mathematica.

All in all, although I think Mathematica is a great system, honestly, the Maple strenghts precisely for mathematics and physics computations, that is, this page 9, copied below, about relevant areas, plus various of the points of the official Maplesoft comparison document that you also don't dispute, plus the remarks above on new advanced functionality and bug fixing around the clock make a stronger point than the corrections and updates that you suggest in your reply, I think.

And this is the mentioned Page 9 that you don't dispute in your reply:

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

Hi Mekai

You seem to have attached an image that happens to be not visible - in any case it is better if you could please post a worksheet with your example (for that you use the Green arrow you see when preparing your question).

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

Hi jmcollard,

I agree that both packages are fantastic. Having said that, I also agree with Christopher2222 and others in that it is frequently useful to know the relative strengths of each of them. I don't know which post you read (you mention one) but there is one from 2014, someone asked about the relative strengths, and at that time I preferred to summarize those that I feel more relevant, in  "Maple strengths compared to Mathematica and Matlab". Differential Geometry is in fact one of the things I mentioned there.

The recent Mapleprimes posts on "PDEs & Boundary Conditions", "Nth order symbolic derivatives" and "Sequences" add to that post on relative Maple strengths. All these are things you can only do in Maple. Perhaps more important: these new posts show an increase in Maple's mathematical abstraction that in my opinion has great potential, it makes the whole system more intelligent, able to perform much more involved mathematics. The Physics package in its current state is also a bold example of the same. For instance, none of the problems you see tackled in "Computer Algebra for Theoretical Physics" are actually doable in Mathematica, mainly because they do not support such abstract notation conveying so dense mathematical meaning.

On the other hand I agree with you that Mathematica's Manipulate is great, to mention but one thing, there are of course others.

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

@Mac Dude 

Consider Physics:-Assume instead of the old `assume`. Please give a look at its help page: it does all what you would expect, AND does not change the variables at all. it is always the same variable. Before placing the assumption, after placing it, etc. even if you remove the assumption. The variables do not change. That is the central idea behind this command, i.e. do what the old one does but without redefining the variables at all. If you are happy with `assuming`, note that Physics:-Assume is in fact a form of "extended assuming". Trust me on this one, Mac, you will like it.

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

@jschulzb 

You are welcome. The old assume was excellent when it was created so many (25?) years ago. The paradigm it uses, one where variables are redefined, is not really appropriate for the directions into which the Maple library evolved. By the way making `assuming` use the more modern (Physics:-)Assume, in addition to having assumptions compatible with all the existing Maple packages, you also solve an old design issue in assuming: global variables that happen to be within a procedure are now also reached with the assumptions placed using assuming. That is by itself a great bonus: it addresses the complaint number 1 (and perhaps the only one I heard so far) regarding `assuming`. For an example of this, take for instance the one with equation number (31) in the help page ?assuming,details and you will see it working (after you entered Setup(assumingusesAsume = true)).

So yes, I'm sorry for what happened to you with this example. But, life has these issues, something worked fine, now it is partly obsolete, in some respects, but there is something more modern superseding, just that the news about it are not as widely spread as desired.

Best

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

Dear Alan,

Just to say that your post is not only very well written, but also inspiring. I really enjoyed reading it. Indeed computer algebra can substantialy change the dynamics of our work, engiineering in your case, theoretical physics in mine. Few people realize this in full though, to the point of verbalizing it so clearly. Not only the algebraic computations involved in our work can become rather tedious when done with paper and pencil, but also sometimes they are almost impossible in practice. Using computers for these purposes one moves from that situation to one where the algebraic computations involved actually become great fun, spiced up with the ability to perform all sorts of explorations to the sides - not to mention playing with the formulation at will, without the penality of having to redo by hand all the computations. This is a real game changer. And yes, it is not just computer algebra: Maple is indeed a great system, and particularly so at the time of computing symbolic solutions to differential equations.

All the best

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

@Carl Love 

Just a note on your post: there is one solution for theta(y), and two solutions for u(y) depending on theta(y). In these cases the design is to return the way you see, without composing the solutions automatically, so that one can understand how the two really explicit solutions to this problem could be constructed. And after you have the whole picture, to have really explicit solutins returned you can use the option 'explicit'  (say as in dsolve([...], explicit)) and you will see the equivalent of having inserted the value of theta(y) into the two posible solutions for u(y).

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

@Michael_Watson 

Great to know that you also found that the computation by Maple is correct. But your original post focused again on a design dllema for the covariant derivative ... Recalling, you tried to check your result computing one term at a time summing over repeated indices, resulting in the computation of things like D_[2](e_[3,4]), thinking that

     D_[2](e_[3,4])  =  eval( D_[mu](e_[a, nu]), [mu=2, a=3, nu=4] ).

It is a natural to do what you did, we compute with paper and pencil in that way. For the computer, however, these two were different: the computation on the right-hand side has one Christoffel symbol term, related to the tensorial character of e_[a, nu] with one spacetime index, while the computation on the left-hand side missed that term. Why? Because in a computer algebra worksheet things are evaluated from inside to outside, and because e_[3,4] has a scalar value, say f(x), (i.e the component [3,4] of e_[a,b], itself, is not a tensor) then D_[2](f(x)) = d_(f(x)) (because there is no distinction between covariant and non-covariant derivatives when the derivand is not a tensor), and hence the Christoffel term related to the tensorial character of e_[a, nu] (the object behind the component e_[3,4]), don't show up.

This is one of those things that are tricky when using computer algebra ... Anyway, the fact is that the programming language is flexible enough to accomodate this situation, so it is now implemented: things like D_[2](e_[3,4])  are now interpreted as eval( D_[mu](e_[a, nu]), [mu=2, a=3, nu=4] ), and hence your approach for verifying your result now works as you (and I would have) expected, without missing the Christoffel terms, despite that computers normally evaluate things the other way around.

This development as well as several adjustments of different kinds are available for download as usual in the Maplesoft R&D Physics webpage.

 

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

@fre 

Yes, by all means you can do this computation using the DifferentialGeometry package too, and yes you can convert the Christoffel symbol to a tensor in the context of the DifferentialGeometry package as well, as Torre is showing above.

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

@krw2015 

I use GUI all the time, windows and Mac platforms, and since I started using Maple so many years ago. And no error whatsoever. I am using Maple 2015. What version of Maple are you using? From what you show, my guess is also that you may be using a mixture of libraries from different versions of Maple ... or perhaps you have an initialization file that is not compatible with the version of Maple that you are using. You can alwyas try entering > interface(typesetting = standard); then change 'standard' by 'extended' and see if the problem still happens. Anyway, until the problem is not reproducible there is no way to help, and if the problem is not reproducible then - somehow - some piece of information  is missing.

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

Hi

Could you please post a worksheet with the actual input lines that reproduce the problem you see? Independent of that, depending on what you want to do on general relativity, the Physics package may be more direct.

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

Michael

As said in the "Answer" above, Maple's output looks correct to me. So, what is then wrong in your worksheet? You seem to have verified things adding the components one by one .. and yet there is one mistake, easy to do when computing within a worksheet. You added the components for instance e_[4,2],

e_[4, 2]

Y(X)

(1)

You then compute

Physics:-D_[2](e_[4, 2])

diff(Y(X), zetabar)

(2)

The computational mistake is that since e_[4, 2] is a scalar, not a tensor, the Christoffel symbol is missing, i.e. D_ = d_, as you can see here:

'Physics:-D_[2](e_[4, 2]) = Physics:-d_[2](e_[4, 2])'

Physics:-D_[2](Physics:-Tetrads:-e_[4, 2]) = Physics:-d_[2](Physics:-Tetrads:-e_[4, 2])

(3)

%

diff(Y(X), zetabar) = diff(Y(X), zetabar)

(4)

In other words, what you computed adding the components one by one is not the definition of gamma_[4,2,3] but, actually that object after replacing the covariant derivative D_ by the non-covariant one d_, as in

subs(Physics:-D_ = Physics:-d_, gamma_[definition])

Physics:-Tetrads:-gamma_[a, b, c] = Physics:-d_[nu](Physics:-Tetrads:-e_[a, mu])*Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]

(5)

Let's see:

Physics:-SumOverRepeatedIndices(Physics:-Tetrads:-gamma_[a, b, c] = Physics:-d_[nu](Physics:-Tetrads:-e_[a, mu])*Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`])

Physics:-Tetrads:-gamma_[a, b, c] = Physics:-diff(Physics:-Tetrads:-e_[a, 1], zeta)*Physics:-Tetrads:-e_[b, `~1`]*Physics:-Tetrads:-e_[c, `~1`]+Physics:-diff(Physics:-Tetrads:-e_[a, 2], zeta)*Physics:-Tetrads:-e_[b, `~2`]*Physics:-Tetrads:-e_[c, `~1`]+Physics:-diff(Physics:-Tetrads:-e_[a, 3], zeta)*Physics:-Tetrads:-e_[b, `~3`]*Physics:-Tetrads:-e_[c, `~1`]+Physics:-diff(Physics:-Tetrads:-e_[a, 4], zeta)*Physics:-Tetrads:-e_[b, `~4`]*Physics:-Tetrads:-e_[c, `~1`]+Physics:-diff(Physics:-Tetrads:-e_[a, 1], zetabar)*Physics:-Tetrads:-e_[b, `~1`]*Physics:-Tetrads:-e_[c, `~2`]+Physics:-diff(Physics:-Tetrads:-e_[a, 2], zetabar)*Physics:-Tetrads:-e_[b, `~2`]*Physics:-Tetrads:-e_[c, `~2`]+Physics:-diff(Physics:-Tetrads:-e_[a, 3], zetabar)*Physics:-Tetrads:-e_[b, `~3`]*Physics:-Tetrads:-e_[c, `~2`]+Physics:-diff(Physics:-Tetrads:-e_[a, 4], zetabar)*Physics:-Tetrads:-e_[b, `~4`]*Physics:-Tetrads:-e_[c, `~2`]+Physics:-diff(Physics:-Tetrads:-e_[a, 1], u)*Physics:-Tetrads:-e_[b, `~1`]*Physics:-Tetrads:-e_[c, `~3`]+Physics:-diff(Physics:-Tetrads:-e_[a, 2], u)*Physics:-Tetrads:-e_[b, `~2`]*Physics:-Tetrads:-e_[c, `~3`]+Physics:-diff(Physics:-Tetrads:-e_[a, 3], u)*Physics:-Tetrads:-e_[b, `~3`]*Physics:-Tetrads:-e_[c, `~3`]+Physics:-diff(Physics:-Tetrads:-e_[a, 4], u)*Physics:-Tetrads:-e_[b, `~4`]*Physics:-Tetrads:-e_[c, `~3`]+Physics:-diff(Physics:-Tetrads:-e_[a, 1], v)*Physics:-Tetrads:-e_[b, `~1`]*Physics:-Tetrads:-e_[c, `~4`]+Physics:-diff(Physics:-Tetrads:-e_[a, 2], v)*Physics:-Tetrads:-e_[b, `~2`]*Physics:-Tetrads:-e_[c, `~4`]+Physics:-diff(Physics:-Tetrads:-e_[a, 3], v)*Physics:-Tetrads:-e_[b, `~3`]*Physics:-Tetrads:-e_[c, `~4`]+Physics:-diff(Physics:-Tetrads:-e_[a, 4], v)*Physics:-Tetrads:-e_[b, `~4`]*Physics:-Tetrads:-e_[c, `~4`]

(6)

Physics:-SubstituteTensorIndices([a = 4, b = 2, c = 3], Physics:-Tetrads:-gamma_[a, b, c] = Physics:-diff(Physics:-Tetrads:-e_[a, 1], zeta)*Physics:-Tetrads:-e_[b, `~1`]*Physics:-Tetrads:-e_[c, `~1`]+Physics:-diff(Physics:-Tetrads:-e_[a, 2], zeta)*Physics:-Tetrads:-e_[b, `~2`]*Physics:-Tetrads:-e_[c, `~1`]+Physics:-diff(Physics:-Tetrads:-e_[a, 3], zeta)*Physics:-Tetrads:-e_[b, `~3`]*Physics:-Tetrads:-e_[c, `~1`]+Physics:-diff(Physics:-Tetrads:-e_[a, 4], zeta)*Physics:-Tetrads:-e_[b, `~4`]*Physics:-Tetrads:-e_[c, `~1`]+Physics:-diff(Physics:-Tetrads:-e_[a, 1], zetabar)*Physics:-Tetrads:-e_[b, `~1`]*Physics:-Tetrads:-e_[c, `~2`]+Physics:-diff(Physics:-Tetrads:-e_[a, 2], zetabar)*Physics:-Tetrads:-e_[b, `~2`]*Physics:-Tetrads:-e_[c, `~2`]+Physics:-diff(Physics:-Tetrads:-e_[a, 3], zetabar)*Physics:-Tetrads:-e_[b, `~3`]*Physics:-Tetrads:-e_[c, `~2`]+Physics:-diff(Physics:-Tetrads:-e_[a, 4], zetabar)*Physics:-Tetrads:-e_[b, `~4`]*Physics:-Tetrads:-e_[c, `~2`]+Physics:-diff(Physics:-Tetrads:-e_[a, 1], u)*Physics:-Tetrads:-e_[b, `~1`]*Physics:-Tetrads:-e_[c, `~3`]+Physics:-diff(Physics:-Tetrads:-e_[a, 2], u)*Physics:-Tetrads:-e_[b, `~2`]*Physics:-Tetrads:-e_[c, `~3`]+Physics:-diff(Physics:-Tetrads:-e_[a, 3], u)*Physics:-Tetrads:-e_[b, `~3`]*Physics:-Tetrads:-e_[c, `~3`]+Physics:-diff(Physics:-Tetrads:-e_[a, 4], u)*Physics:-Tetrads:-e_[b, `~4`]*Physics:-Tetrads:-e_[c, `~3`]+Physics:-diff(Physics:-Tetrads:-e_[a, 1], v)*Physics:-Tetrads:-e_[b, `~1`]*Physics:-Tetrads:-e_[c, `~4`]+Physics:-diff(Physics:-Tetrads:-e_[a, 2], v)*Physics:-Tetrads:-e_[b, `~2`]*Physics:-Tetrads:-e_[c, `~4`]+Physics:-diff(Physics:-Tetrads:-e_[a, 3], v)*Physics:-Tetrads:-e_[b, `~3`]*Physics:-Tetrads:-e_[c, `~4`]+Physics:-diff(Physics:-Tetrads:-e_[a, 4], v)*Physics:-Tetrads:-e_[b, `~4`]*Physics:-Tetrads:-e_[c, `~4`])

diff(Y(X), u) = -H(X)*Y(X)*(diff(Y(X), zeta))-H(X)*(diff(Y(X), zetabar))*Ybar(X)+(diff(Y(X), u))*(H(X)*Y(X)*Ybar(X)+1)-H(X)*(diff(Y(X), v))

(7)

Of course the right-hand side is not correct, because it is constructed using d_, instead of D_. Hope this makes the answer to your question more complete. It is also convenient to first sum over the repeated indices, then take components, proceed in that order, not the opposite one.

Also relevant: when verifying tensorial expressions that involve covariant derivatives it is convenient to first rewrite everything in terms of non-covariant ones so that the Christoffe symbols get placed before the tensors being differentiated become "compoents" (scalars ).

For example:

gamma_[definition]

Physics:-Tetrads:-gamma_[a, b, c] = Physics:-D_[nu](Physics:-Tetrads:-e_[a, mu])*Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]

(8)

convert(Physics:-Tetrads:-gamma_[a, b, c] = Physics:-D_[nu](Physics:-Tetrads:-e_[a, mu])*Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`], Physics:-d_)

Physics:-Tetrads:-gamma_[a, b, c] = (Physics:-d_[nu](Physics:-Tetrads:-e_[a, mu], [X])-Physics:-Christoffel[`~alpha`, mu, nu]*Physics:-Tetrads:-e_[a, alpha])*Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]

(9)

long_expression := Physics:-SumOverRepeatedIndices(Physics:-Tetrads:-gamma_[a, b, c] = (Physics:-d_[nu](Physics:-Tetrads:-e_[a, mu], [X])-Physics:-Christoffel[`~alpha`, mu, nu]*Physics:-Tetrads:-e_[a, alpha])*Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]):

simplify(Physics:-SubstituteTensorIndices([a = 4, b = 2, c = 3], long_expression))

diff(Y(X), u) = diff(Y(X), u)

(10)

In summary: the result computed by Maple is correct and, in your worksheet, the result you computed as "correct" is actually incorrect in that it entirely misses the term with the Christoffel symbols.

Download Question_about_Ricci_Rotation_Coefficients-2_(additional).mw

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

@trace 

Indeed there was a premature evaluation issue, it is fixed now (actually, fixed on Saturday), please update your Physics library downloading from the usual place, the Maplesoft R&D Physics webpage. Could you please let me know/confirm here that everything runs as expected? Thanks.

By the way, when you found an issue like this one it is faster if you could please send me an email to physics@maplesoft.com. This website has not automatic notifications per topic and I only see your posts if I open a browser and start scanning, as it happened now.

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

First 38 39 40 41 42 43 44 Last Page 40 of 60