ecterrab

14540 Reputation

24 Badges

20 years, 22 days

MaplePrimes Activity


These are replies submitted by ecterrab

@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

Preben is right, without further details all I can say is that this works correctly, as shown in this image

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

@Markiyan Hirnyk 

Indeed, when writing the answer I copied and pasted from trace's worksheet and didn't notice his typo, sin^2*theta instead of sin(theta)^2.. I included this correction now in the answer.

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

@Inacio 

Your first question is: "Is there a way to remove the test function Phi in a different way?"

Yes, you can use coeff, as shown in this image:

 

Your second question: "Can Maple rewrite the expression above like F[mu nu]Phi? Because I have define F[mu, nu] like d_[rho](A[nu]) - d_[nu](A[rho])."

Yes, you can use simplify taking equations into account (check the help page ?simplify/siderels), as shown in this other image; note I first match the indices, and alternatively you could also use SubstituteTensor (check its help page):

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

 

Hi Inacio,

 

This functionality required a bit more of time. What you were expecting is actually a full implementation of "operatorial algebraic expressions", that is, algebraic expressions where you multiply differential operators with the meaning of applying them to what come to their right.

 

In Computer Algebra Systems, however, there is a strong distinction between multiplication of algebraic objects and application of differential operators: the latter are implemented as function application, (a function name applied to arguments) not multiplication. Also, when computing by hand, we multiply from the right of a differential operator with the meaning of "it gets applied to all what comes to its right", while with computer algebra "function application" there is no way you can do that. To implement such a thing in computer algebra, it is necessary to do a careful mimicry of the paper and pencil computation, i.e. one where you tell when is that the product becomes application of the differential operator.

 

In brief, implementing the whole thing required changes in various places, starting with the produt operator, making all differential operators non-commutative objects under multiplication, etc. The result was worth: a very nice full implementation of operatorial expressions, something really interesting to have in place, mainly for computations of Physics - we compute that way all the time.

 

Going to your example, good for illustration purposes

restart

with(Physics):

 

Note the Physics version, from today, you need to update your Physics library from the Maplesoft R&D Physics webpage to have everything working as shown below:

Physics:-Version()

"/Users/ecterrab/Maple/lib/Physics2015.mla", `2015, April 16, 10:40 hours`

(1)

So, what follows is your worksheet with few changes to show how to use the new functionality (arriving at the results you were expecting for a Commutator involving sums of differential operators and functions of the coordinates)

 

Physics:-Setup(math = true, coord = X, diff = X, quiet):

Physics:-Define(A, quiet):

 

First, note that d_[mu] operators commute between themselves, but not with functions of the coordinates

 

Library:-Commute(Physics:-d_[mu], Physics:-d_[nu])

true

(2)

Library:-Commute(Physics:-d_[mu], A(X))

false

(3)

Library:-Commute(Physics:-d_[mu], A)

true

(4)

Now the commutator of a d_ operator with a function of the coordinates

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

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

(5)

Regarding the expansion of this commutator, I revised the experimental design of the previous reply for consistency: the product of an operator times a function is now expressed as a product (i.e. multiplication) instead of function application. 

expand(Physics:-Commutator(Physics:-d_[mu], A[nu](X)))

 

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

(6)

So in the above, you see `∂`[mu]*A[nu], not `∂`[mu](A[nu]), which would be the operator `∂`[mu] applied to A[nu]. This permits multiplying from the right and allowing to have the operator applied (a posteriori) to the product that gets formed to its right:

Physics:-`*`(Physics:-`*`(Physics:-d_[mu], A[nu](X))-Physics:-`*`(A[nu](X), Physics:-d_[mu]), Phi(X))

Physics:-`*`(Physics:-`*`(Physics:-d_[mu], A[nu](X))-Physics:-`*`(A[nu](X), Physics:-d_[mu]), Phi(X))

(7)

expand(Physics:-`*`(Physics:-`*`(Physics:-d_[mu], A[nu](X))-Physics:-`*`(A[nu](X), Physics:-d_[mu]), Phi(X)))

Physics:-`*`(Physics:-d_[mu], A[nu](X), Phi(X))-Physics:-`*`(A[nu](X), Physics:-d_[mu], Phi(X))

(8)

That is, in the above, you see `∂`[mu]*A[nu]*Phi, not `∂`[mu](A[nu])*Phi, which would be wrong (with `∂`[mu] applied only to A[nu])

 

Now we still want the function application of differential operators, not just their multiplication. This function aplication is now implemented using a new Physics:-Library command, called ApplyProductsOfDifferentialOperators. In this example, the multiplications of differential operators  you see in `∂`[mu]*A[nu]*Phi-`∂`[mu]*A[nu]*Phi get transformed into their application `∂`[mu](A[nu]*Phi)-A[nu]*`∂`[mu](Phi) that is, with the differential operators applied to all what comes to their right:

Library:-ApplyProductsOfDifferentialOperators(Physics:-`*`(Physics:-d_[mu], A[nu](X), Phi(X))-Physics:-`*`(A[nu](X), Physics:-d_[mu], Phi(X)))

Physics:-d_[mu](A[nu](X), [X])*Phi(X)

(9)

Likewise,

Library:-ApplyProductsOfDifferentialOperators(Physics:-`*`(Physics:-`*`(Physics:-d_[mu], A[nu](X))-Physics:-`*`(A[nu](X), Physics:-d_[mu]), Phi(X)))

Physics:-d_[mu](A[nu](X), [X])*Phi(X)

(10)

The dot operator also knows about these operatorial equations

Physics:-Commutator(Physics:-d_[mu], A[nu](X)).Phi(X)

Physics:-`*`(Physics:-Commutator(Physics:-d_[mu], A[nu](X)), Phi(X))

(11)

 

Commutator already knows about operatorial equations, this is your example

%Commutator(Physics:-d_[mu]+A[mu](X), Physics:-d_[nu]+A[nu](X))

%Commutator(Physics:-d_[mu]+A[mu](X), Physics:-d_[nu]+A[nu](X))

(12)

Note first that the commutator of differential operators is now handled

value(%Commutator(Physics:-d_[mu]+A[mu](X), Physics:-d_[nu]+A[nu](X)))

Physics:-Commutator(Physics:-d_[mu], A[nu](X))+Physics:-Commutator(A[mu](X), Physics:-d_[nu])

(13)

Their multiplication and application too:

Physics:-`*`(%Commutator(Physics:-d_[mu]+A[mu](X), Physics:-d_[nu]+A[nu](X)), Phi(X))

Physics:-`*`(%Commutator(Physics:-d_[mu]+A[mu](X), Physics:-d_[nu]+A[nu](X)), Phi(X))

(14)

expand(Physics:-`*`(%Commutator(Physics:-d_[mu]+A[mu](X), Physics:-d_[nu]+A[nu](X)), Phi(X)))

Physics:-`*`(Physics:-d_[mu], A[nu](X), Phi(X))+Physics:-`*`(A[mu](X), Physics:-d_[nu], Phi(X))-Physics:-`*`(Physics:-d_[nu], A[mu](X), Phi(X))-Physics:-`*`(A[nu](X), Physics:-d_[mu], Phi(X))

(15)

Library:-ApplyProductsOfDifferentialOperators(Physics:-`*`(Physics:-d_[mu], A[nu](X), Phi(X))+Physics:-`*`(A[mu](X), Physics:-d_[nu], Phi(X))-Physics:-`*`(Physics:-d_[nu], A[mu](X), Phi(X))-Physics:-`*`(A[nu](X), Physics:-d_[mu], Phi(X)))

Physics:-d_[mu](A[nu](X), [X])*Phi(X)-Physics:-d_[nu](A[mu](X), [X])*Phi(X)

(16)

factor(Physics:-d_[mu](A[nu](X), [X])*Phi(X)-Physics:-d_[nu](A[mu](X), [X])*Phi(X))

Phi(X)*(Physics:-d_[mu](A[nu](X), [X])-Physics:-d_[nu](A[mu](X), [X]))

(17)

The above is the result you were expecting. Likewise,

Physics:-`*`(Physics:-Commutator(Physics:-d_[mu], A[nu](X))+Physics:-Commutator(A[mu](X), Physics:-d_[nu]), Phi(X))

Physics:-`*`(Physics:-Commutator(Physics:-d_[mu], A[nu](X))+Physics:-Commutator(A[mu](X), Physics:-d_[nu]), Phi(X))

(18)

But a commutator where there are non-differential operands, cannot be "applied", so it remains as a product

Library:-ApplyProductsOfDifferentialOperators(expand(Physics:-`*`(Physics:-Commutator(Physics:-d_[mu], A[nu](X))+Physics:-Commutator(A[mu](X), Physics:-d_[nu]), Phi(X))))

Physics:-d_[mu](A[nu](X), [X])*Phi(X)-Physics:-d_[nu](A[mu](X), [X])*Phi(X)

(19)

expand(Physics:-`*`(Physics:-Commutator(Physics:-d_[mu], A[nu](X))+Physics:-Commutator(A[mu](X), Physics:-d_[nu]), Phi(X)))

Physics:-`*`(Physics:-d_[mu], A[nu](X), Phi(X))+Physics:-`*`(A[mu](X), Physics:-d_[nu], Phi(X))-Physics:-`*`(Physics:-d_[nu], A[mu](X), Phi(X))-Physics:-`*`(A[nu](X), Physics:-d_[mu], Phi(X))

(20)

Physics:-`*`(Physics:-`*`(Physics:-d_[mu], A[nu](X), Phi(X))+Physics:-`*`(A[mu](X), Physics:-d_[nu], Phi(X))-Physics:-`*`(Physics:-d_[nu], A[mu](X), Phi(X))-Physics:-`*`(A[nu](X), Physics:-d_[mu], Phi(X)), Phi(X))

Physics:-`*`(Physics:-`*`(Physics:-d_[mu], A[nu](X), Phi(X))+Physics:-`*`(A[mu](X), Physics:-d_[nu], Phi(X))-Physics:-`*`(Physics:-d_[nu], A[mu](X), Phi(X))-Physics:-`*`(A[nu](X), Physics:-d_[mu], Phi(X)), Phi(X))

(21)

Library:-ApplyProductsOfDifferentialOperators(Physics:-`*`(Physics:-`*`(Physics:-d_[mu], A[nu](X), Phi(X))+Physics:-`*`(A[mu](X), Physics:-d_[nu], Phi(X))-Physics:-`*`(Physics:-d_[nu], A[mu](X), Phi(X))-Physics:-`*`(A[nu](X), Physics:-d_[mu], Phi(X)), Phi(X)))

Physics:-d_[mu](A[nu](X), [X])*Phi(X)^2-Physics:-d_[nu](A[mu](X), [X])*Phi(X)^2

(22)

So regarding the expected result you mentioned:

 

"[(∂)[mu]+ A[mu], ( (∂)[nu])+ A[nu]]" Φ

 

= "[(∂)[mu],  (∂)[nu]]" Φ + "[(∂)[mu],  A[nu]]" Φ + "[A[mu],  (∂)[nu]]" Φ + [A[mu], A[nu]] Φ

 

= "(∂)[mu]" "(A[nu]Phi)-""A[nu] (∂)[mu]"Φ + "A[mu](∂)[nu]Phi - ""(∂)[nu]" A[mu]*Phi

 

= "((∂)[mu]""A[nu]-"" (∂)[nu]""A[mu])Phi"

 

 

You are correct and that is indeed what the code returns now (see above, equation (17)) and in this way this most general concept of operatorial expressions that involve products of differential operators and functions that can then be transformed into function application at any desired moment is now available, which is really great, and thanks for bringing the subject to focus.

``


Download Identidades_de_Bianchi_(reviewed_II).mw

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

@Carl Love 

I don't know to what several bugs you are referring but just to clarify: there was one bug in the numerical evaluation of HeunC fixed in Maple 18 or Maple 17 (can't remember now) and another in the numerical evaluation of HeunG fixed in Maple 16. In addition to that, for Maple 2015, a new algorithm for the numerical evaluation of the same function is available. So no I'd not blame the numerical evaluation of Heun functions, unless you have some information of wrong results that I am missing, of course.

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

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