## 453 Reputation

5 years, 343 days

## LinearAlgebra:-Trace...

Hi,

The LinearAlgebra algebra package has a trace function.

Either enter:

LinearAlgebra:-Trace(J)

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.

## Functional derivative...

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

## whattype...

Hi,

Entering whattype(a) will return "set".

## Hi, maybe CodeTools:-ProgramAnalysis:-St...

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

## Quantum Operators...

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

## combine(Expression) assuming positive...

Hi,

The following return what you expect.

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

## differentialoperators...

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 (Windo...

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 inst...

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.

## Use Define and the metric...

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.

## Physics...

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.

## Expand...

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.

 >
 >
 >
 (1)
 >
 (2)

Expand gives a correct result

 >
 (3)

The result given by simplify might be correct or not

 >
 (4)

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

 >
 (5)
 >
 (6)

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

 >
 (7)

Or?

 >
 (8)
 >

## By you......

Hi,

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

## Physics...

Hi,

As a side remark, if you are newly starting with Maple you should have a look at the Physics Package. This is the best option. Enter for instance:

help("Physics:-KillingVectors")

You could also have a look at these two very recent posts:

https://www.mapleprimes.com/posts/210090-A-Complete-Guide-For--Tensor-Computations

## Operator ~...

Hi,

The behavior is indeed changing when Physics is loaded, though I cannot say if it should be considered as a bug when Physics is not loaded or loaded (if it is a bug). The syntax you are using is indeed ambiguous. As you need to perform element-wise operations, I suggest using the dedicated operator for that, i.e. "~". It is working both with and without Physics.

 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 >
 (5)
 >
 (6)
 >