ecterrab

14540 Reputation

24 Badges

20 years, 22 days

MaplePrimes Activity


These are replies submitted by ecterrab

@Dmitry Lyakhov 

Without further details, I don't have something to add: my understanding is that DifferentialGeometry:-LieAlgebras:-Decompose gives you what you are asking, in that it decomposes a given Lie Algebra into a sum of idencomposable Lie algebras, and the number of them is the maximal dimension you are asking; did you give a look at the Examples section of its help page? If yes, could you please post a worksheet with the concrete problem that you think it cannot be tackled with this command?

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

@Carl Love 

in "arctan(y" you have an open parenthesis; in that case you can keep the comma in the denominator, only. When the parenthesis are closed, in my opinion there is no point in keeping the comma in the denominator - I agree with Christopher2222, and even if that were necessary in some obscure case, it would suffice to provide a way - say with an extra key pressed, for instance as in Ctrl + comma, or whatever that would server the same purpose.

Besides, if I were to design this from scratch I'd probably follow the same rules you have in 1D, so that it would be intuitive, as opposed to "you have to learn two dialects" regarding precedence. Then for instance not just a comma but also a "+" would automatically jump out of the denominator if there are no open parenthesis.

Anyway ... 

Edgardo Cheb-Terrab
Physics, DifferentialEquations and MathematicalFunctions, Maplesoft

@Michael_Watson 

This is about something else, the presentation of your worksheets in Mapleprimes. As you can see in this thread, your worksheet overflows to the sides. So, to read a single line, you need to scroll horizontally to the right, then to read the beginning of the next line you scroll to the left and so on. Your worksheet has no text but you see this need to scroll when trying to read the formulas.

So how could you avoid this need to scrool? Open Maple's preferences, go to "Export" and where you read Math linebreaking width, set it to 6.5 (the default is 8, which is what causes the overflow to the sides), then click on "Apply Globally" and you are done: next time you post, everything will appear presented within margins.

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

@Carl Love 

What I implemented is the standard multi-index notation for sums. Your question is now clear in this third iteration, and no, you cannot set different lower limits for each of the symbols entering the multi-index notation in a sum. By the way that is not standard in  multi-index notation, where the lower limits are always determined by the value of the right-hand-side of the multi-index sum. More important, I do not recall ever seeing the need of setting the lower value for each of these symbols entering the left-hand side of a multi-index sum notation, in all my career. Of course that is not a "solid" argument against that though. Do you have a couple of interesting examples that would motivate allowing for someting like that?

If not, for me at this point what we have is fantastic functionality working for this. Multi-index notation for sums together with the novelties for symbolic sequences, nth order symbolic differentiation, and some other stuff I posted recently here in Mapleprimes all these things are adding interesting layers of abstraction to the capabilities of the Maple symbolic algebra engine, allowing for more and more advanced mathematics and mathematical-physics methods to be implemented. Sort of "very good enough" :) I'm really happy with each of these developments.

By the way, correcting something I said in a previous reply in this thread: when you Physics:-Setup(redefinesum = true), the redefined sum already handles well, and since Maple 18, the notation "1 <= a+b = c" even when that automatically evaluates to false outside the context of sum. What requires delay evaluation quotes is Sum, not sum. Sum, as all symbols used to represent inert functions, has nothing assigned to it. On the other hand, the redefined sum has the first and second arguments of type 'uneval', so that the evaluation is controlled, avoiding in this way all those "premature evaluation" problems that pervade our old (the not redefined) sum.

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

 

@Carl Love 

Carl, in this other post you ask: "I want the inner sum to be done for all pairs of positive integers (j,k) such that j+k = m-1. ".  It works the same way, but for the detail that in Maple 1 <= j+k = m-1 automatically evaluates to false. So the first workaround is to quote that, as in '1 <= j+k = m-1', but still you cannot do it in two steps because in the middle this will again automatically evaluate to false. One way is then 

> value(Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), ‘1 <= j+k = m-1'), m = 1 .. 5))


The other way is to adjust the code a bit to accomodate this input without having to delay its evaluation - at first sight I'd say this is pretty easy to do. I will give a look.

EDIT I see you also asked about the typesetting. No, I didn't change the GUI. I only adjusted the typesetting rule for sum and with that automatically also the one for Sum (now that the typesetting for inert functions is derived from the rule from the active functions). There is no documentation for this though, as changing the typesetting code is not meant to be done by everybody. I do have an old project, however, of a mapplet allowing one to change the typesetting of everything ... It is not difficult. But I have had no time yet for this.

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

@Rouben Rostamian  

Yes, simplify(.., size) is very simple and yet incredibly handy functionality. What you probably don't know is that you can make Maple post-process, with simplify/size, every single computation you input. The post-processing happens automatically, only once, and right before returning to the screen. This saves you to have to decipher complicated expressions with your brain, or having to remember to apply simplify/size to some result that you see or suspect it does not present its algebraic structure in evident manner.

Anyway, you may want to try it, to have this running all you need to do is to input

> Physics:-Setup(automaticsimplification = true)

(... and magically :) from here on everything is automatically returned simplified in size).

This feature is explained in the page for what is new in Physics for Maple 18.

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

@Axel Vogt 

I don't know what you wanted to say with your formulas without comments. The notation used is standard notation in mathematics. See for instance Multi-index notation, and for one example of the form presented in this thread see the multi-binomial theorem. The example shown in the Maple help page that presents this functionality is actually the multinomial theorem, also standard in the literature:

Physics:-Setup(redefinesum = true):

(a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n);

(a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n)

(1)

eval((a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n), n = 2)

(a+b+c)^2 = a^2+2*a*b+2*a*c+b^2+2*b*c+c^2

(2)

eval((a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n), n = 3)

(a+b+c)^3 = a^3+3*a^2*b+3*a^2*c+3*a*b^2+6*a*b*c+3*a*c^2+b^3+3*b^2*c+3*b*c^2+c^3

(3)

``

 

Download power_expressed_as_a_sum_using_multi-index_notation.mw

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

@Carl Love 

Hi Carl

Have you actually tried? Put m to start at 3

Physics:-Setup(redefinesum = true)

[redefinesum = true]

(1)

Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), j+k = m-1), m = 3 .. 5)

Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), j+k = m-1), m = 3 .. 5)

(2)

value(Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), j+k = m-1), m = 3 .. 5))

16*(D@@2)(f)*f+8*D(f)^2+32*(D@@3)(f)*f+32*(D@@2)(f)*D(f)+64*(D@@4)(f)*f+64*(D@@3)(f)*D(f)+32*(D@@2)(f)^2

(3)

So, it works as fine. Compare with the result you get using your suggested rewriting of the summand to use only one summation index

add(add(2^m*(D@@j)(f)*(D@@(m-1-j))(f), j = 0 .. m-1), m = 3 .. 5)

16*(D@@2)(f)*f+8*D(f)^2+32*(D@@3)(f)*f+32*(D@@2)(f)*D(f)+64*(D@@4)(f)*f+64*(D@@3)(f)*D(f)+32*(D@@2)(f)^2

(4)

Note also that the multi-index notation in the redefined sum handles not just `=` but also `<=`. For example: 1 <= j+k and j+k <= m-1

Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), 1 <= j+k and j+k <= m-1), m = 3 .. 5)

Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), 1 <= j+k and j+k <= m-1), m = 3 .. 5)

(5)

value(Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), 1 <= j+k and j+k <= m-1), m = 3 .. 5))

112*D(f)*f+112*(D@@2)(f)*f+56*D(f)^2+96*(D@@3)(f)*f+96*(D@@2)(f)*D(f)+64*(D@@4)(f)*f+64*(D@@3)(f)*D(f)+32*(D@@2)(f)^2

(6)

Make it  0 <= j+k and j+k <= m-2

 

Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), 0 <= j+k and j+k <= m-2), m = 3 .. 5)

Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), 0 <= j+k and j+k <= m-2), m = 3 .. 5)

(7)

value(Sum(Sum(2^m*(D@@k)(f)*(D@@j)(f), 0 <= j+k and j+k <= m-2), m = 3 .. 5))

56*f^2+112*D(f)*f+96*(D@@2)(f)*f+48*D(f)^2+64*(D@@3)(f)*f+64*(D@@2)(f)*D(f)

(8)

All this is presented in that section "Redefine Sum for Multi-Index Summation" in the help page for updates,Maple18,Physics


Download Multi-Index_summation_(II).mw

@shzan 

L is a polynomial in Dx, so degree(L, Dx) will directly tell you the order; to the side of your question, note there is also ldegree for lower order.

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

@escorpsy 

I see nothing wrong at first sight - will give this a deeper look by the end of today and write again.

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

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

First 42 43 44 45 46 47 48 Last Page 44 of 64