digerdiga

370 Reputation

8 Badges

10 years, 122 days

MaplePrimes Activity


These are replies submitted by digerdiga

@acer One may add that the problem seems to arise in the subroutine "contour" (infolevel[int]:=5) which makes sense, since the i*Pi/2 term arises precisely because of the residue at t=1.

The sign in the first term seems to arise depending on the branch chosen on the segment (-infinity,0) for the contour integral int(...,t=-infinity..infinity). The integral over the arc vanishes for 0<a<1.

Btw: While it doesn't seem to matter in the assumptions a=1 and a=0 is not allowed.

@Kitonum This is good :-), but it would be cool if these trig identities are covered by convert(*,radical)

@acer I really appreciate your effort, but I must say that the following little loop is probably simpler

restart;
with(ArrayTools);
N := 5;
cosx := Array([0]);
for i to N do
    cosx := Append(cosx, sqrt((1 + cosx[i])/2));
end do;
simplify(cosx);
evalf(`-`~(%, [seq(cos(Pi/2^i), i = 1 .. N + 1)]));

 

The point is, why is such a seemingly simple thing not covered by convert(*,radical)? I looks as if this is the perfect thing for which convert(*,radical) could be called for.

@ecterrab That's what I precisely tried too.

It does not work.


 

restart; with(Physics); Setup(dimension = 3, metric = Euclidean, spacetimeindices = lowercaselatin, mathematicalnotation = true, hermitianoperators = {P, X}, automaticsimplification = true); g_[]; Define(X, P); Setup(quantumop = {P, X}, algebrarules = {%Commutator(P[i], P[j]) = 0, %Commutator(X[i], P[j]) = Physics:-`*`(I, g_[i, j]), %Commutator(X[i], X[j]) = 0}); L2 := Simplify(Physics:-`^`(Physics:-`*`(Physics:-`*`(LeviCivita[i, j, k], X[j]), P[k]), 2)); L2X := Simplify(Commutator(L2, X[k])); L2L2X__1 := Library:-SortProducts(Expand(Simplify(Commutator(L2, L2X))), [Physics:-`^`(X[b], 2), X[a]]); Library:-SortProducts(%, [Physics:-`^`(X[b], 2), X[a]], totheright); Simplify(%, indices); L2L2X__2 := Simplify(Expand(AntiCommutator(Physics:-`*`(2, L2), X[k]))); Simplify(L2L2X__1-L2L2X__2)

`The dimension and signature of the tensor space are set to `[3, `- - +`]

 

`The Euclidean metric in cartesian coordinates`

 

`Changing the signature of the tensor spacetime to: `*`+ + +`

 

[automaticsimplification = true, dimension = 3, hermitianoperators = {P, X}, mathematicalnotation = true, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}, spacetimeindices = lowercaselatin]

 

Physics:-g_[a, b] = Matrix(%id = 18446746066398517478)

 

`Defined objects with tensor properties`

 

{P, X, Physics:-Dgamma[a], Physics:-Psigma[a], Physics:-d_[a], Physics:-g_[a, b], Physics:-LeviCivita[a, b, c]}

 

`* Partial match of  '`*quantumop*`' against keyword '`*quantumoperators*`' `

 

_______________________________________________________

 

[algebrarules = {%Commutator(P[i], P[j]) = 0, %Commutator(X[i], P[j]) = I*Physics:-g_[i, j], %Commutator(X[i], X[j]) = 0}, quantumoperators = {P, X}]

 

(2*I)*Physics:-`*`(X[j], P[j])+Physics:-`*`(Physics:-`^`(X[j], 2), Physics:-`^`(P[k], 2))-Physics:-`*`(X[j], X[k], P[j], P[k])

 

2*X[k]-(2*I)*Physics:-`*`(Physics:-`^`(X[b], 2), P[k])+(2*I)*Physics:-`*`(X[c], X[k], P[c])

 

(12*I)*Physics:-`*`(X[c], X[k], P[c])-(4*I)*Physics:-`*`(Physics:-`^`(X[b], 2), P[k])-4*Physics:-`*`(X[f], X[i], X[k], P[f], P[i])-4*Physics:-`*`(X[a], Physics:-`^`(X[b], 2), P[a], P[k])+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[k], Physics:-`^`(P[h], 2))+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[f], P[f], P[k])+4*X[k]

 

(12*I)*Physics:-`*`(X[c], X[k], P[c])-(4*I)*Physics:-`*`(Physics:-`^`(X[b], 2), P[k])-4*Physics:-`*`(X[f], X[i], X[k], P[f], P[i])-4*Physics:-`*`(X[a], Physics:-`^`(X[b], 2), P[a], P[k])+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[k], Physics:-`^`(P[h], 2))+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[f], P[f], P[k])+4*X[k]

 

(12*I)*Physics:-`*`(X[c], X[k], P[c])-(4*I)*Physics:-`*`(Physics:-`^`(X[b], 2), P[k])-4*Physics:-`*`(X[f], X[i], X[k], P[f], P[i])-4*Physics:-`*`(X[a], Physics:-`^`(X[b], 2), P[a], P[k])+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[k], Physics:-`^`(P[h], 2))+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[f], P[f], P[k])+4*X[k]

 

4*X[k]+(12*I)*Physics:-`*`(X[c], X[k], P[c])+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[k], Physics:-`^`(P[d], 2))-(4*I)*Physics:-`*`(Physics:-`^`(X[b], 2), P[k])-4*Physics:-`*`(X[e], X[f], X[k], P[e], P[f])

 

0

(1)

NULL


 

Download Commutator_Algebra_with_L2.mw

@ecterrab I know I'm getting on your nerves, but not satisfying answers were given as to why it can not commute X^2[b] with X[a] if a commutation rule %Commutator(X[i],X[j])=0 has been set. Afterall it can commute P^2[i] with X[j] given the commutation rule %Commutator(X[i],P[j])=i g_[i,j] ??

The only thing you said is that there are issues when X is both a tensor and an operator at the same time.

So that is the answer?

 

I'm already reading your tut regarding the Sort-thing, but I just would like to understand.

If not here, where should be place for discussion!?

@ecterrab  What noncommutative objects subject to commutator rules? Not sure what you mean; the only thing that needs to be commuted is X[b]^2 with X[a] which commute by the algebrarule %Commutator(X[a],X[b])=0 !?

 

Is it possible to do this without using tensor then, but still benefitting from some automatic summation procedure?

@Pascal4QM I updated my question.

Whatever the problem before, Defining it as

Define(X,P)

seems to work, while I'm curious why Coordinates does not work!?!?

 

 

 

@Pascal4QM Commutator_Algebra_with_L2.mw
 

restart; with(Physics); Setup(dimension = 3, metric = Euclidean, spacetimeindices = lowercaselatin); Coordinates(X, P); g_[]; L2 := Physics:-`*`(Physics:-`^`(X[i], 2), Physics:-`^`(P[j], 2))-Physics:-`*`(Physics:-`*`(Physics:-`*`(X[i], X[j]), P[i]), P[j]); Setup(quantumop = {P, X}, algebrarules = {%Commutator(P[i], P[j]) = 0, %Commutator(X[i], X[j]) = 0, %Commutator(X[j], P[k]) = Physics:-`*`(I, g_[j, k])}); L2X := Simplify(Commutator(L2, X[k])); Simplify(Commutator(L2, L2X))

`The dimension and signature of the tensor space are set to `[3, `- - +`]

 

`The Euclidean metric in cartesian coordinates`

 

`Changing the signature of the tensor spacetime to: `*`+ + +`

 

[dimension = 3, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}, spacetimeindices = lowercaselatin]

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x1, x2, x3)}

 

`Systems of spacetime coordinates are:`*{P = (p1, p2, p3), X = (x1, x2, x3)}

 

{P, X}

 

Physics:-g_[a, b] = Matrix(%id = 18446746397848441190)

 

Physics:-SpaceTimeVector[i](X)^2*Physics:-SpaceTimeVector[j](P)^2-Physics:-SpaceTimeVector[i](X)*Physics:-SpaceTimeVector[j](X)*Physics:-SpaceTimeVector[i](P)*Physics:-SpaceTimeVector[j](P)

 

`* Partial match of  '`*quantumop*`' against keyword '`*quantumoperators*`' `

 

_______________________________________________________

 

[algebrarules = {%Commutator(Physics:-SpaceTimeVector[i](P), Physics:-SpaceTimeVector[j](P)) = 0, %Commutator(Physics:-SpaceTimeVector[i](X), Physics:-SpaceTimeVector[j](X)) = 0, %Commutator(Physics:-SpaceTimeVector[j](X), Physics:-SpaceTimeVector[k](P)) = I*Physics:-g_[j, k]}, quantumoperators = {p1, p2, p3, x1, x2, x3}]

 

-(2*I)*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[k](P))+(2*I)*Physics:-`*`(Physics:-SpaceTimeVector[b](X), Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[b](P))

 

(2*I)*Physics:-`*`(Physics:-SpaceTimeVector[a](X), Physics:-SpaceTimeVector[a](P), Physics:-SpaceTimeVector[k](X))+4*Physics:-`*`(Physics:-SpaceTimeVector[a](X), Physics:-SpaceTimeVector[a](P), Physics:-`^`(Physics:-SpaceTimeVector[f](X), 2), Physics:-SpaceTimeVector[k](P))-6*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[f](P), Physics:-SpaceTimeVector[f](X), Physics:-SpaceTimeVector[k](P))+8*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[k](X), Physics:-`^`(Physics:-SpaceTimeVector[r](P), 2))+(8*I)*Physics:-`*`(Physics:-SpaceTimeVector[c](X), Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[c](P))+(2*I)*Physics:-`*`(Physics:-SpaceTimeVector[d](X), Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[d](P))-(14*I)*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[k](P))-4*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-`^`(Physics:-SpaceTimeVector[f](P), 2), Physics:-SpaceTimeVector[k](X))+2*Physics:-`*`(Physics:-SpaceTimeVector[c](X), Physics:-SpaceTimeVector[m](X), Physics:-SpaceTimeVector[c](P), Physics:-SpaceTimeVector[m](P), Physics:-SpaceTimeVector[k](X))-2*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[s3](X), Physics:-SpaceTimeVector[k](P), Physics:-SpaceTimeVector[s3](P))-6*Physics:-`*`(Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[s3](X), Physics:-SpaceTimeVector[s6](X), Physics:-SpaceTimeVector[s3](P), Physics:-SpaceTimeVector[s6](P))-2*Physics:-`*`(Physics:-SpaceTimeVector[c](X), Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[c](P), Physics:-SpaceTimeVector[r](X), Physics:-SpaceTimeVector[r](P))+4*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[f](X), Physics:-SpaceTimeVector[f](P), Physics:-SpaceTimeVector[k](P))+2*Physics:-`*`(Physics:-SpaceTimeVector[a](X), Physics:-SpaceTimeVector[a](P), Physics:-SpaceTimeVector[f](X), Physics:-SpaceTimeVector[f](P), Physics:-SpaceTimeVector[k](X))

(1)

``


 

Download Commutator_Algebra_with_L2.mw

 

 

 

See above, what version do you use?

Why didn't it work with Define(X,P) but only with Coordinates?

Second still does not work.

@Pascal4QM I was talking about the macro:

macro(KroneckerDelta = g_)

but anyway.

Why does the Commutator not work, when I predefine an expression as in

L2 := X[k]^2*P[j]^2 - X[k]*X[j]*P[k]*P[j];

Commutator(L2,X[j]);
 

He is not shuffling the P all to the right, so it doesn't work. Do I need to define L2 as something?

It is just a definition after all?!

@Pascal4QM Hey, thanks. I made some edits in particular concerning the free indices mentioning in the help. As such they state the macro should work as well, but it does not.

@acer Is it more clear now?

@acer Thanks. With that you also deleted my answers, which were meant for further explanation...

@Carl Love

In a module the structure is somewhat different compared to a procedure. Just to get it right:

1. local 'variables'

is the same as in a procedure, but the following to lines I just asked about are not directly run when calling Rand(), or?

I mean in order for the procedure ModuleApply to run it needs the seed, but this seed is only given later in the export section. So when calling Rand() does the module read everything till the end and then afterwards calls the ModuleApply?

2. Do you have an example of how ModuleLoad could be read from a Library? Not sure I understand you right.

1 2 3 4 5 6 7 Last Page 1 of 19