478 Reputation

12 Badges

7 years, 65 days

MaplePrimes Activity

These are answers submitted by Pascal4QM


There are several ways. You can use "indets" to extract the variable of an expression, and then "select" according particular properties. For instance, assuming x and y have a t depedency, while A and B are independent of that parameter:

EE := (x(t)/A)^2 + (y(t)/B)^2 = 1;
                              2       2    
                          x(t)    y(t)     
                    EE := ----- + ----- = 1
                            2       2      
                           A       B       

FF := indets(EE);
                  FF := {A, B, t, x(t), y(t)}

select(u -> type(u, freeof(t)), FF);
                             {A, B}



In addition to Edgardo's recommendations, you could try to close the palettes (left Panel). There is a known issue at startup for Maple 2020 involving those palettes. Once Maple has started again, you can reopen the required palettes.


The LinearAlgebra algebra package has a trace function.

Either enter:


or, load the package :



Note, there is also a Trace function within the Physics package. In addition to standard Matrix, it can work on special matrices such as the Pauli or the Dirac matrices.



Functional derivative, that is derivative of a function with respect to another one, is supported within the Physics package. For instance:

ee := diff(f(t), t)^2;
                             / d      \
                       ee := |--- f(t)|
                             \ dt     /

diff(ee, diff(f(t), t));
                            / d      \
                          2 |--- f(t)|
                            \ dt     /


In your code, just add "with(Physics):" after restart, and there will be no error message anymore.

You could also have a look at the Fundiff function. Enter ?Physics:-Fundiff


Entering whattype(a) will return "set".

Hi, maybe CodeTools:-ProgramAnalysis:-StaticCallGraph might be helpful. This is new to Maple 2020.


The best is probably to represent your matrices symbolically by quantum operators within the Physics package:



All algebra performed with quantum operators will be non-Abelian. It is possible to do many operations with :Simplify, Expand, Factor, SortProducts...


The following return what you expect.

(combine(F^(1/2)*x^(1/2)/m^(1/2)) assuming positive)


The Physics Setup properties "differentialoperators" might help you. With that, you can formally define your own differential operator, and trigg it at will. For an example see:

Note also that Dirac gamma matrices are known by the Physics package, enter help("Physics:-Dgamma")


I have the same issue sometime (Windows 10, 64 bits). Open Maple from the starting menu instead of clicking on a file might help. Once Maple is open, you should also close the "Palette", this could help for the next start-up.

The power works as well (almost)

For instance:



Will work fine, while



Doesn't. Indeed, that's convenient, much more cases could work that way.


You shoud modify the setup as follow:

Setup(dimension = 3, metric = Euclidean, spacetimeindices = lowercaselatin, quiet)

Furtheremore, SumOverRepeatedIndices is for tensor, therefore, X and P should be define as such:

Define(X[j], P[k])

Finally, starting M2019, KroneckerDelta is not a tensor anymore. So the commutator should rather be:

algebrarule = {%Commutator(X[j], P[k]) = I g_[j, k]}

And it should work as designed.



I am not used with the DifferentialGeometry package, but, in a general manner, I advise you to switch to the Physics package. It is more general, easier to use, and above all, it is very dynamic and continuously up-dated. Enter ?Physics. Notably, the sections "Mini-Course: Computer Algebra for Physicists" and "A Complete Guide for performing Tensors computations using Physics" are very instructive.

BTW, to avoid people starting with it, ?DifferentialGeometry should probably refer to Physics. Indeed, the DifferentialGeometry package is now mostly superceeded.


It is likely that the displayed result with M2018 is incorrect. "Expand" with M2019 gives the correct result. "Simplify" is ambiguous, see the attached mw.



Setup(noncommutativeprefix = {V, W})

[noncommutativeprefix = {V, W}]


ee := (-1/W-W/V^2)/W

Physics:-`*`(1/W, -1/W-Physics:-`*`(W, 1/Physics:-`^`(V, 2)))


Expand gives a correct result


-1/Physics:-`^`(W, 2)-1/Physics:-`^`(V, 2)


The result given by simplify might be correct or not


-(Physics:-`^`(V, 2)+Physics:-`^`(W, 2))/(Physics:-`^`(W, 2)*Physics:-`^`(V, 2))


The point is that the numerator and the denominator might not commute. In the general case, they do not:

numer(-(Physics[`^`](V, 2)+Physics[`^`](W, 2))/(Physics[`^`](W, 2)*Physics[`^`](V, 2))), denom(-(Physics[`^`](V, 2)+Physics[`^`](W, 2))/(Physics[`^`](W, 2)*Physics[`^`](V, 2)))

-Physics:-`^`(V, 2)-Physics:-`^`(W, 2), Physics:-`^`(W, 2)*Physics:-`^`(V, 2)


Library:-Commute(-Physics[`^`](V, 2)-Physics[`^`](W, 2), Physics[`^`](W, 2)*Physics[`^`](V, 2))



Therefore, there is an ambiguity in the way (4) is read. Is it?

numer(-(Physics[`^`](V, 2)+Physics[`^`](W, 2))/(Physics[`^`](W, 2)*Physics[`^`](V, 2)))/denom(-(Physics[`^`](V, 2)+Physics[`^`](W, 2))/(Physics[`^`](W, 2)*Physics[`^`](V, 2)))

Physics:-`*`(-Physics:-`^`(V, 2)-Physics:-`^`(W, 2), Physics:-`^`(Physics:-`^`(W, 2)*Physics:-`^`(V, 2), -1))



numer(-(Physics[`^`](V, 2)+Physics[`^`](W, 2))/(Physics[`^`](W, 2)*Physics[`^`](V, 2)))/denom(-(Physics[`^`](V, 2)+Physics[`^`](W, 2))/(Physics[`^`](W, 2)*Physics[`^`](V, 2)))

Physics:-`*`(Physics:-`^`(Physics:-`^`(W, 2)*Physics:-`^`(V, 2), -1), -Physics:-`^`(V, 2)-Physics:-`^`(W, 2))






A possible answer you gave:


1 2 3 4 Page 2 of 4