Pascal4QM

478 Reputation

13 Badges

8 years, 136 days

MaplePrimes Activity


These are answers submitted by Pascal4QM

Hi,

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}

 

Hi,

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.

Hi,

The LinearAlgebra algebra package has a trace function.

Either enter:

LinearAlgebra:-Trace(J)

or, load the package :

with(LinearAlgebra):

Trace(J)

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.

 

Hi,

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

restart;
with(Physics):
ee := diff(f(t), t)^2;
                                       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

Hi,

Entering whattype(a) will return "set".

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

Hi,

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

with(Physics):

Setup(quantumoperators={A,B,C})

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

Hi,

The following return what you expect.

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

Hi,

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:

https://www.mapleprimes.com/posts/208710-Quantum-Commutation-Rules-Basics

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

Hi,

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:

e1^2

e1^(1/2)

Will work fine, while

sqrt(e1)

e1^a

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

Hi,

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.

 

Hi,

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.

Hi,

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.
 

restart

with(Physics)

Setup(noncommutativeprefix = {V, W})

[noncommutativeprefix = {V, W}]

(1)

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

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

(2)

Expand gives a correct result

Expand(ee)

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

(3)

The result given by simplify might be correct or not

Simplify(ee)

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

(4)

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)

(5)

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

false

(6)

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))

(7)

Or?

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))

(8)

``


 

Download ExpandPhysicsPackage.mw

Hi,

A possible answer you gave:

https://www.mapleprimes.com/questions/222865-How-To-Index-A-Procedure-Fijkxyz

 

1 2 3 4 Page 2 of 4