Education

Teaching and learning about math, Maple and MapleSim

Using the learning sequence as an alternative to learn problems related to "balance of a body" is shown in this video; thanks to the kindness that Maple offers us in its fundamental programming syntax.

Balance_of_a_body_with_learning_sequence.mw

Lenin Araujo

Ambassador Of Maple

 

 

On the example of a manipulator with three degrees of freedom.
A mathematical model is created that takes into account degrees of freedom of the manipulator and the trajectory of the movement from the initial point to the final one (in the figure, the ends of the red curve). In the text of the program, these are the equations fi, i = 1..5.
Obviously, the straight line could be the simplest trajectory, but we will consider a slightly different variant. The solution of the system of equations is the coordinates of the points of the manipulator (x1, x2, x3) and (x4, x5, x6) in all trajectory. After that, knowing the lengths of the links and the coordinates of the points at each moment of time, any angles of the manipulator are calculated. The same selected trajectory is reproduced from these angles. The possible angles are displayed by black color.
All the work on creating a mathematical model and calculating the angles can be done without the manipulator itself, is sufficient to have only the instruction with technical characteristics.
To display some angles, the procedure created by vv is used.
MAN_2.mw

This post is devoted to the rigorous proof of Miquel's five circles theorem, which I learned about from this question. The proof is essentially very simple and takes only 15 lines of code. The figure below, in which all the labels coincide with the corresponding names in the code, illustrates the basic ideas of the code. First, we symbolically define common points of intersection of blue circles with a red unit circle  (these parameters  s1 .. s5  are the polar coordinates of these points). All other parameters of this configuration can be expressed through them. Then we find the centers  M  and  N  of two circles. Then we find the coordinates of the point  K  from the condition that  CK  is perpendicular to  MN . Then we find the point  and using the result obtained, we easily find the coordinates  of all the points  A1 .. A5. Then we find the coordinates of the point   P  as the point of intersection of the lines  A1A2  and  A3A4 . Finally, we verify that the point  P  lies on a circle with center at the point  N , which completes the proof.

                      

 

Below - the code of the proof. Note that the code does not use any special (in particular geometric) packages, only commands from the Maple kernel. I usually try any geometric problems to solve in this style, it is more reliable,  and often shorter.

restart;
t1:=s1/2+s2/2: t2:=s2/2+s3/2:
M:=[cos(t1),sin(t1)]: N:=[cos(t2),sin(t2)]:
C:=[cos(s2),sin(s2)]: K:=(1-t)*~M+t*~N:
CK:=K-C: MN:=M-N:
t0:=simplify(solve(CK[1]*MN[1]+CK[2]*MN[2]=0, t)):
E:=combine(simplify(C+2*eval(CK,t=t0))):
s0:=s5-2*Pi: s6:=s1+2*Pi:
assign(seq(A||i=eval(E,[s2=s||i,s1=s||(i-1),s3=s||(i+1)]), i=1..5)):
Dist:=(p,q)->sqrt((p[1]-q[1])^2+(p[2]-q[2])^2):
LineEq:=(P,Q)->(y-P[2])*(Q[1]-P[1])=(x-P[1])*(Q[2]-P[2]):
Line1:=LineEq(A1,A2):
Line2:=LineEq(A3,A4):
P:=combine(simplify(solve({Line1,Line2},[x,y])))[]:
Circle:=(x-N[1])^2+(y-N[2])^2-Dist(N,C)^2:
is(eval(Circle, P)=0);  
# The final result

                                                                    true


It may seem that this proof is easy to repeat manually. But this is not so. Maple brilliantly coped with very cumbersome trigonometric transformations. Look at the coordinates of point  , expressed through the initial parameters  s1 .. s5 :

simplify(eval([x,y], P));  # The coordinates of the point  P

  

  

 

ProofMiquel.mw

A few days ago, I drew attention to the question in which OP talked about the generation of triangles in a plane, for which the lengths of all sides, the area and radius of the inscribed circle are integers. In addition, all vertices must have different integer coordinates (6 different integers), the lengths of all sides are different and the triangles should not be rectangular. I prepared the answer to this question, but the question disappeared somewhere, so I designed my answer as a separate post.

The triangles in the plane, for which the lengths of all sides and the area  are integers, are called as Heronian triangles. See this very interesting article in the wiki about such triangles
https://en.wikipedia.org/wiki/Integer_triangle#Heronian_triangles

The procedure finds all triangles (with the fulfillment of all conditions above), for which the lengths of the two sides are in the range  N1 .. N2 . The left side of the range is an optional parameter (by default  N1=5). It is not recommended to take the length of the range more than 100, otherwise the operating time of the procedure will greatly increase. The procedure returns the list in which each triangle is represented by a list of  [list of coordinates of the vertices, area, radius of the inscribed circle, list of lengths of the sides]. Without loss of generality, one vertex coincides with the origin (obviously, by a shift it is easy to place it at any point). 

The procedure works as follows: one vertex at the origin, then the other two must lie on circles with integer and different radii  x^2+y^2=r^2. Using  isolve  command, we find all integer points on these circles, and then in the for loops we select the necessary triangles.


 

 

restart;
HeronianTriangles:=proc(N2::posint,N1::posint:=5)
local k, r, S, L, Ch, Dist, IsOnline, c, P, p, A, B, C, a, b, s, ABC, cc, s1, T ;
uses combinat, geometry;
if N2<N1 then error "Should be N2>=N1" fi;
if N2<34 then return [] fi;
k:=0:
for r from max(N1,5) to N2 do
S:=[isolve(x^2+y^2=r^2)];
if nops(S)>4 then k:=k+1; L[k]:=select(s->s[1]<>0 and s[2]<>0,map(t->rhs~(convert(t,list)), S)); fi;
od:
L:=convert(L, list):
if type(L[1],symbol) then return [] fi;

Ch:=combinat:-choose([$1..nops(L)], 2):
Dist:=(A::list,B::list)->simplify(sqrt((A[1]-B[1])^2+(A[2]-B[2])^2));
IsOnline:=(A::list,B::list)->`if`(A[1]*B[2]-A[2]*B[1]=0, true, false);
k:=0:
for c in Ch do
for A in L[c[1]] do
for B in L[c[2]] do
if not IsOnline(A,B) and nops({A[],B[]})=4 then if type(Dist(A,B),posint) then
 k:=k+1; P[k]:=[A,B] fi; fi;
od: od: od:
P:=convert(P, list):
if type(P[1],symbol) then return [] fi;

k:=0:
for p in P do
point('A',0,0), point('B',p[1]), point('C',p[2]);
a:=simplify(distance('A','B')); b:=simplify(distance('A','C')); c:=simplify(distance('B','C'));
s:=sort([a,b,c]); s1:={a,b,c};
triangle(ABC,['A','B','C']);
incircle(cc,ABC);
r:=radius(cc);
if type(r,integer) and s[3]^2<>s[1]^2+s[2]^2 and nops(s1)=3 then k:=k+1; T[k]:=[[[0,0],p[]],area(ABC),r, [a,b,c]] fi;
od:
T:=convert(T,list);
if type(T[1],symbol) then return [] fi;
T;
end proc:

Examples of use of the procedure  HeronianTriangles

T:=HeronianTriangles(100): # All the Geronian triangles, whose lengths of two sides do not exceed 100
nops(T);

256

(1)

Tp:=select(p->p[1,2,1]>0 and p[1,2,2]>0 and p[1,3,1]>0 and p[1,3,2]>0, T);

[[[[0, 0], [16, 30], [28, 21]], 252, 6, [34, 35, 15]], [[[0, 0], [30, 16], [21, 28]], 252, 6, [34, 35, 15]], [[[0, 0], [21, 28], [15, 36]], 168, 4, [35, 39, 10]], [[[0, 0], [28, 21], [36, 15]], 168, 4, [35, 39, 10]], [[[0, 0], [27, 36], [13, 84]], 900, 10, [45, 85, 50]], [[[0, 0], [36, 27], [84, 13]], 900, 10, [45, 85, 50]], [[[0, 0], [33, 44], [48, 36]], 462, 7, [55, 60, 17]], [[[0, 0], [44, 33], [36, 48]], 462, 7, [55, 60, 17]], [[[0, 0], [33, 44], [96, 28]], 1650, 15, [55, 100, 65]], [[[0, 0], [44, 33], [28, 96]], 1650, 15, [55, 100, 65]], [[[0, 0], [16, 63], [72, 21]], 2100, 20, [65, 75, 70]], [[[0, 0], [63, 16], [21, 72]], 2100, 20, [65, 75, 70]], [[[0, 0], [39, 52], [18, 80]], 1092, 12, [65, 82, 35]], [[[0, 0], [52, 39], [80, 18]], 1092, 12, [65, 82, 35]], [[[0, 0], [32, 60], [56, 42]], 1008, 12, [68, 70, 30]], [[[0, 0], [60, 32], [42, 56]], 1008, 12, [68, 70, 30]], [[[0, 0], [42, 56], [30, 72]], 672, 8, [70, 78, 20]], [[[0, 0], [56, 42], [72, 30]], 672, 8, [70, 78, 20]]]

(2)

Tr:=map(p->p+[2,1],Tp[1,1]);
with(geometry):
point(A,Tr[1]), point(B,Tr[2]), point(C,Tr[3]):
triangle(ABC,[A,B,C]):
simplify(distance(A,B)), simplify(distance(A,C)), simplify(distance(B,C));
local O:
incircle(c,ABC, centername=O):
draw([A,B,C, ABC, c(color=blue)], color=red, thickness=2, symbol=solidcircle, tickmarks = [spacing(1)$2], gridlines, scaling=constrained, view=[0..31,0..33], size=[800,550], printtext=true, font=[times, 18], axesfont=[times, 10]);

[[2, 1], [18, 31], [30, 22]]

 

34, 35, 15

 

 



Examples of triangles with longer sides

T:=HeronianTriangles(1000,980):  # All the Geronian triangles, whose lengths of two sides lie in the range  980..1000
nops(T);

56

(3)

Tp:=select(p->p[1,2,1]>0 and p[1,2,2]>0 and p[1,3,1]>0 and p[1,3,2]>0, T);  # Triangles lying in the first quarter x>0, y>0
nops(%);

[[[[0, 0], [540, 819], [680, 714]], 85680, 80, [981, 986, 175]], [[[0, 0], [819, 540], [714, 680]], 85680, 80, [981, 986, 175]], [[[0, 0], [216, 960], [600, 800]], 201600, 168, [984, 1000, 416]], [[[0, 0], [960, 216], [800, 600]], 201600, 168, [984, 1000, 416]], [[[0, 0], [380, 912], [324, 945]], 31806, 31, [988, 999, 65]], [[[0, 0], [912, 380], [945, 324]], 31806, 31, [988, 999, 65]], [[[0, 0], [594, 792], [945, 324]], 277992, 216, [990, 999, 585]], [[[0, 0], [792, 594], [324, 945]], 277992, 216, [990, 999, 585]]]

 

8

(4)

 


 

Download Integer_Triangle1.mw

Edit.

The Joint Mathematics Meetings are taking place this week (January 10 – 13) in San Diego, California, U.S.A. This will be the 101th annual winter meeting of the Mathematical Association of America (MAA) and the 124nd annual meeting of the American Mathematical Society (AMS).

Maplesoft will be exhibiting at booth #505 as well as in the networking area. Please stop by our booth or the networking area to chat with me and other members of the Maplesoft team, as well as to pick up some free Maplesoft swag or win some prizes.

There are also several interesting Maple-related talks and events happening this week - I would definitely not miss the talk by our own Paulina Chin on grading sketch graphs.

 

Using Symbol-Crunching to find ALL Sucker's Bets (with given deck sizes). 

AMS Special Session on Applied and Computational Combinatorics, II 
Wednesday January 10, 2018, 2:15 p.m.-2:45 p.m.

Shalosh B. Ekhad, Rutgers University, New Brunswick 
Doron Zeilberger*, Rutgers University, New Brunswick 
 

Collaborative Research: Maplets for Calculus. 

MAA Poster Session: Projects Supported by the NSF Division of Undergraduate Education 
Thursday January 11, 2018, 2:00 p.m.-4:00 p.m.

Philip B. Yasskin*, Texas A&M University 
Douglas B. Meade, University of South Carolina 
Matthew Barry, Texas A&M Engineering Extension Service 
Andrew Crenwelge, Texas A&M University 
Joseph Martinson, Texas A&M University 
Matthew Weihing, Texas A&M University

 

Automated Grading of Sketched Graphs in Introductory Calculus Courses. 

AMS Special Session on Visualization in Mathematics: Perspectives of Mathematicians and Mathematics Educators, I 

Friday January 12, 2018, 9:00 a.m.

Dr. Paulina Chin*, Maplesoft 

 

Semantic Preserving Bijective Mappings of Mathematical Expressions between LaTeX and Computer Algebra Systems.

AMS Special Session on Mathematical Information in the Digital Age of Science, III 
Friday January 12, 2018, 9:00 a.m.-9:20 a.m.

Howard S. Cohl*, NIST 

 

Interactive Animations in MYMathApps Calculus. 

MAA General Contributed Paper Session on Mathematics and Technology 
Saturday January 13, 2018, 11:30 a.m.-11:40 a.m.

Philip B. Yasskin*, Texas A&M University 
Andrew Crenwelge, Texas A&M University 
Joseph Martinsen, Texas A&M University 
Matthew Weihing, Texas A&M University 
Matthew Barry, Texas A&M Engineering Experiment Station 

 

Applying Maple Technology in Calculus Teaching To Create Artwork. 

MAA General Contributed Paper Session on Teaching and Learning Calculus, II 
Saturday January 13, 2018, 2:15 p.m.

Lina Wu*, Borough of Manhattan Community College-The City University of New York

 

If you are attending the Joint Math meetings this week and plan on presenting anything on Maple, please feel free to let me know and I'll update this list accordingly.


See you in San Diego!

Daniel

Maple Product Manager

Implementation of Maple apps for the creation of mathematical exercises in
engineering

In this research work has allowed to show the implementation of applications developed in the Maple software for the creation of mathematical exercises given the different levels of education whether basic or higher.
For the majority of teachers in this area, it seems very difficult to implement apps in Maple; that is why we show the creation of exercises easily and permanently. The purpose is to get teachers from our institutions to use applications ready to be evaluated in the classroom. The results of these apps (applications with components made in Maple) are supported on mobile devices such as tablets and / or laptops and taken to the cloud to be executed online from any computer. The generation of patterns is a very important alternative leaving aside random numbers, which would allow us to lose results
onscreen. With this; Our teachers in schools or universities would evaluate their students in parallel on the blackboard without losing the results of any student and thus achieve the competencies proposed in the learning sessions.
In these apps would be the algorithms for future research updates and integrated with systems in content management. Therefore what we show here is extremely important for the evaluation on the blackboard in bulk to students without losing any scientific criteria.

FAST_UNT_2018.mw

FAST_UNT_2018.pdf

Lenin Araujo Castillo

Ambasador of Maple

 

It passed through my mind it would be interesting to collect the links to the most relevant Mapleprimes posts about Quantum Mechanics using the Physics package of the last couple of years, to have them all accessible from one place. These posts give an idea of what kind of computation is already doable in quantum mechanics, how close is the worksheet input to what we write with paper and pencil, and how close is the typesetting of the output to what we see in textbooks.

At the end of each page linked below, you will see another link to download the corresponding worksheet, that you can open using Maple (say the current version or the version 1 or 2 years ago).

This other set of three consecutive posts develops one problem split into three parts:

This other link is interesting as a quick and compact entry point to the use of the Physics package:

There is an equivalent set of Mapleprimes posts illustrating the Physics package tackling problems in General Relativity, collecting them is for one other time.

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

December 2017: This is, perhaps, one of the most complicated computations done in this area using the Physics package. To the best of my knowledge never before performed on a computer algebra worksheet. It is exciting to present a computation like this one. At the end the corresponding worksheet is linked so that it can be downloaded and the sections be opened, the computation be reproduced. There is also a link to a pdf with everything open.  Special thanks to Pascal Szriftgiser for bringing this problem. To reproduce the computations below, please update the Physics library with the one distributed from the Maplesoft R&D Physics webpage.

June 17, 2020: updated taking advantage of new features of Maple 2020.1 and Physics Updates v.705. Submitted to arxiv.org

January 25, 2021: updated in the arXiv and submitted for publication in Computer Physics Communications

 

 

Quantum Runge-Lenz Vector and the Hydrogen Atom,

the hidden SO(4) symmetry using Computer Algebra

 

Pascal Szriftgiser1 and Edgardo S. Cheb-Terrab2 

(1) University of Lille, CNRS, UMR 8523 - PhLAM - Physique des Lasers, Atomes et Molécules, F-59000 Lille, France

(2) Maplesoft

NULL

 

Abstract

 

Pauli first noticed the hidden SO(4) symmetry for the Hydrogen atom in the early stages of quantum mechanics [1]. Departing from that symmetry, one can recover the spectrum of a spinless hydrogen atom and the degeneracy of its states without explicitly solving Schrödinger's equation [2]. In this paper, we derive that SO(4) symmetry and spectrum using a computer algebra system (CAS). While this problem is well known [3, 4], its solution involves several steps of manipulating expressions with tensorial quantum operators, simplifying them by taking into account a combination of commutator rules and Einstein's sum rule for repeated indices. Therefore, it is an excellent model to test the current status of CAS concerning this kind of quantum-and-tensor-algebra computations. Generally speaking, when capable, CAS can significantly help with manipulations that, like non-commutative tensor calculus subject to algebra rules, are tedious, time-consuming and error-prone. The presentation also shows a pattern of computer algebra operations that can be useful for systematically tackling more complicated symbolic problems of this kind.

 

Introduction

 

The primary purpose of this work is to derive, step-by-step, the SO(4) symmetry of the Hydrogen atom and its spectrum using a computer algebra system (CAS). To the best of our knowledge, such a derivation using symbolic computation has not been shown before. Part of the goal was also to see whether this computation can be performed entering only the main definition formulas, followed by only simplification commands, and without using previous knowledge of the result. The intricacy of this problem is in the symbolic manipulation and simplification of expressions involving noncommutative quantum tensor operators. The simplifications need to take into account commutator rules, symmetries under permutation of indices of tensorial subexpressions, and use Einstein's sum rule for repeated indices.

We performed the derivation using the Maple 2020 system with the Maplesoft Physics Updates v.705. Generally speaking, the default computational domain of CAS doesn't include tensors, noncommutative operators nor related simplifications. On the other hand, the Maple system is distributed with a Physics package that extends that default domain to include those objects and related operations. Physics includes a Simplify command that takes into account custom algebra rules and the sum rule for repeated indices, and uses tensor-simplification algorithms [5] extended to the noncommutative domain.

 

A note about notation: when working with a CAS, besides the expectation of achieving a correct result for a complicated symbolic calculation, readability is also an issue. It is desired that one be able to enter the definition formulas and computational steps to be performed (the input, preceded by a prompt >, displayed in black) in a way that resembles as closely as possible their paper and pencil representation, and that the results (the output, computed by Maple, displayed in blue) use textbook mathematical-physics notation. The Physics package implements such dedicated typesetting. In what follows, within text and in the output, noncommutative objects are displayed using a different color, e.g. H, vectors and tensor indices are displayed the standard way, as in `#mover(mi("L",mathcolor = "olive"),mo("&rarr;"))`, and L[q], and commutators are displayed with a minus subscript, e.g. "[H,L[q]][-]". Although the Maple system allows for providing dedicated typesetting also for the input, we preferred to keep visible the Maple input syntax, allowing for comparison with paper and pencil notation. We collected the names of the commands used and a one line description for them in an Appendix at the end. Maple also implements the concept of inert representations of computations, which are activated only when desired. We use this feature in several places. Inert computations are entered by preceding the command with % and are displayed in grey. Finally, as is usual in CAS, every output has an equation label, which we use throughout the presentation to refer to previous intermediate results.

 

In Sec.1, we recall the standard formulation of the problem and present the computational goal, which is the derivation of the formulas representing the SO(4) symmetry and related spectrum.

 

In Sec.2, we set tensorial non-commutative operators representing position and linear and angular momentum, respectively X[a], p[a] and L[a], their commutation rules used as departure point, and the form of the quantum Hamiltonian H. We also derive a few related identities used in the sections that follow.

 

In Sec.3, we derive the conservation of both angular momentum and the Runge-Lenz quantum operator, respectively "[H,L[q]][-]=0" and "[H,Z[k]][-]=0". Taking advantage of the differentialoperators functionality in the Physics package, we perform the derivation exploring two equivalent approaches; first using only a symbolic tensor representation p[j] of the momentum operator, then using an explicit differential operator representation for it in configuration space, p[j] = -i*`&hbar;`*`&PartialD;`[j].  With the first approach, expressions are simplified only using the departing commutation rules and Einstein's sum rule for repeated indices. Using the second approach, the problem is additionally transformed into one where the differentiation operators are applied explicitly to a test function G(X). Presenting both approaches is of potential interest as it offers two partly independent methods for performing the same computation, which is helpful to provide confidence on in the results when unknown, a relevant issue when using computer algebra.

 

In Sec. 4, we derive %Commutator(L[m], Z[n]) = I*`&hbar;`*`&epsilon;`[m, n, u]*Z[u] and show that the classical relation between angular momentum and the Runge-Lenz vectors,  "L *"`#mover(mi("Z"),mo("&rarr;"))` = 0, due to the orbital momentum being perpendicular to the elliptic plane of motion while the Runge-Lenz vector lies in that plane, still holds in quantum mechanics, where the components of these quantum vector operators do not commute but "L *"`#mover(mi("Z",mathcolor = "olive"),mo("&rarr;"))` = "(Z) *"`#mover(mi("L",mathcolor = "olive"),mo("&rarr;"))` = 0.

 

In Sec. 5, we derive "[Z[a],Z[b]][-]=-(2 i `&hbar;` `&epsilon;`[a,b,c] (H L[c]))/`m__e`" using the two alternative approaches described for Sec.3.

In Sec. 6, we derive the well-known formula for the square of the Runge-Lenz vector, Z[k]^2 = 2*H*(`&hbar;`^2+L[a]^2)/m__e+kappa^2.

 

Finally, in Sec. 7, we use the SO(4) algebra derived in the previous sections to obtain the spectrum of the Hydrogen atom. Following the literature, this approach is limited to the bound states for which the energy is negative.

 

Some concluding remarks are presented at the end, and input syntax details are summarized in an Appendix.

 

1. The hidden SO(4) symmetry of the Hydrogen atom

 

 

Let's consider the Hydrogen atom and its Hamiltonian

H = LinearAlgebra[Norm](`#mover(mi("p"),mo("&rarr;"))`)^2/(2*m__e)-kappa/r,

 

where `#mover(mi("p"),mo("&rarr;"))`is the electron momentum, m__e its mass, κ a real positive constant, r = `&equiv;`(LinearAlgebra[Norm](`#mover(mi("r"),mo("&rarr;"))`), sqrt(X[a]^2)) the distance of the electron from the proton located at the origin, and X[a] is its tensorial representation with components ["x, y,z]". We assume that the proton's mass is infinite. The electron and nucleus spin are not taken into account. Classically, from the potential -kappa/r, one can derive a central force `#mover(mi("F"),mo("&rarr;"))` = -kappa*`#mover(mi("r"),mo("&and;"))`/r^2 that drives the electron's motion. Introducing the angular momentum

 

`#mover(mi("L"),mo("&rarr;"))` = `&x`(`#mover(mi("r"),mo("&rarr;"))`, `#mover(mi("p"),mo("&rarr;"))`),

 

one can further define the Runge-Lenz vector `#mover(mi("Z"),mo("&rarr;"))`

 

"Z=1/(`m__e`) (L)*(p)+kappa ( r)/r."

 

It is well known that `#mover(mi("Z"),mo("&rarr;"))` is a constant of the motion, i.e. diff(`#mover(mi("Z"),mo("&rarr;"))`(t), t) = 0. Switching to Quantum Mechanics, this condition reads

 

%Commutator(H, Z_) = 0.

 

where, for hermiticity purpose, the expression of `#mover(mi("Z",mathcolor = "olive"),mo("&rarr;"))` must be symmetrized

 

`#mover(mi("Z",mathcolor = "olive"),mo("&rarr;"))` = (`&x`(`#mover(mi("L",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`)-`&x`(`#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("L",mathcolor = "olive"),mo("&rarr;"))`))/(2*m__e)+kappa*`#mover(mi("r",mathcolor = "olive"),mo("&rarr;"))`/r.

 

In what follows, departing from the Hamiltonian H, the basic commutation rules between position`#mover(mi("r",mathcolor = "olive"),mo("&rarr;"))`, momentum `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))` and angular momentum `#mover(mi("L",mathcolor = "olive"),mo("&rarr;"))` in tensor notation, we derive the following commutation rules between the quantum Hamiltonian, angular momentum and Runge-Lenz vector `#mover(mi("Z",mathcolor = "olive"),mo("&rarr;"))`

 

 

"[H,L[n]][-]"

=

0

"[H,Z[n]][-]"

=

0

" [L[m],Z[n]][-]"

=

I*`&hbar;`*`&epsilon;`[m, n, o]*Z[o]

" [Z[m],Z[n]][-]"

=

-(2*(I*`&hbar;`/m__e))*H*`&epsilon;`[m, n, o]*L[o]

 

 

Since H commutes with both `#mover(mi("L",mathcolor = "olive"),mo("&rarr;"))`NULL and `#mover(mi("Z",mathcolor = "olive"),mo("&rarr;"))`, defining

 

"`M__n`=sqrt(-(`m__e`)/(2 H)) `Z__n`,"

these commutation rules can be rewritten as

 

"[L[m],L[n]][-]"

=

I*`&hbar;`*`&epsilon;`[m, n, o]*L[o]

" [L[m],M[n]][-]"

=

I*`&hbar;`*`&epsilon;`[m, n, o]*M[o]

"[M[m],M[n]][-]"

=

I*`&hbar;`*`&epsilon;`[m, n, o]*L[o]

 

 

  

This set constitutes the Lie algebra of the SO(4) group.

  

 

2. Setting the problem, commutation rules and useful identities

   

3. Commutation rules between the Hamiltonian and each of the angular momentum and Runge-Lenz tensors

   

4. Commutation rules between the angular momentum L[q]and the Runge-Lenz Z[k]tensors

   

5.  Commutation rules between the components of the Runge-Lenz tensor

   

6. The square of the norm of the Runge-Lenz vector

   

7. The atomic hydrogen spectrum

   

Conclusions

 

 

In this presentation, we derived, step-by-step, the SO(4) symmetry of the Hydrogen atom and its spectrum using the symbolic computer algebra Maple system. The derivation was performed without departing from the results, entering only the main definition formulas in eqs. (1), (2) and (5), followed by using a few simplification commands - mainly Simplify, SortProducts and SubstituteTensor - and a handful of Maple basic commands, subs, lhs, rhs and isolate. The computational path that was used to get the results of sections 2 to 7 is not unique. Instead of searching for the shortest path, we prioritized clarity and illustration of the techniques that can be used to crack problems like this one.

This problem is mainly about simplifying expressions using two different techniques. First, expressions with noncommutative operands in products need reduction with respect to the commutator algebra rules that have been set. Second, products of tensorial operators require simplification using the sum rule for repeated indices and the symmetries of tensorial subexpressions. Those techniques, which are part of the Maple Physics simplifier, together with the SortProducts and SubstituteTensor commands for sorting the operands in products to apply tensorial identities, sufficed. The derivations were performed in a reasonably small number of steps.

Two different computational strategies - with and without differential operators - were used in sections 3 and 5, showing an approach for verifying results, a relevant issue in general when performing complicated algebraic manipulations. The Maple Physics ability to handle differential operators as noncommutative operands in products (as frequently done in paper and pencil computations) facilitates readability and ease in entering the computations. The complexity of those operations is then handled by one Physics:-Library command, ApplyProductsOfDifferentialOperators (see eqs. (47) and (83)).

Besides the Maple Physics ability to handle noncommutative tensor operators and simplify such operators using commutator algebra rules, it is interesting to note: a) the ability of the system to factorize expressions involving products of noncommutative operands (see eqs. (90) and (108)) and b) the extension of the algorithms for simplifying tensorial expressions [5] to the noncommutativity domain, used throughout this presentation.

It is also worth mentioning how equation labels can reduce the whole computation to entering the main definitions, followed by applying a few commands to equation labels. That approach helps to reduce the chance of typographical errors to a very strict minimum. Likewise, the fact that commands and equations distribute over each other allows cumbersome manipulations to be performed in simple ways, as done, for instance, in eqs. (8), (9) and (13).

Finally, it was significantly helpful for us to have the typesetting of results using standard mathematical physics notation, as shown in the presentation above.

 

Appendix

 

 

In this presentation, the input lines are preceded by a prompt > and the commands used are of three kinds: some basic Maple manipulation commands, the main Physics package commands to set things and simplify expressions, and two commands of the Physics:-Library to perform specialized, convenient, operations in expressions.

 

The basic Maple commands used

 

• 

interface is used once at the beginning to set the letter used to represent the imaginary unit (default is I but we used i).

• 

isolate is used in several places to isolate a variable in an expression, for example isolating x in a*x+b = 0 results in x = -b/a

• 

lhs and rhs respectively get the left-hand side Aand right-hand side Bof an equation A = B

• 

subs substitutes the left-hand side of an equation by the righ-hand side in a given target, for example subs(A = B, A+C) results in B+C

• 

@ is used to compose commands. So(`@`(A, B))(x) is the same as A(B(x)). This command is useful to express an abstract combo of manipulations, for example as in (108) ≡ lhs = `@`(Factor, rhs).

 

The Physics commands used

 

• 

Setup is used to set algebra rules as well as the dimension of space, type of metric, and conventions as the kind of letter used to represent indices.

• 

Commutator computes the commutator between two objects using the algebra rules set using Setup. If no rules are known to the system, it outputs a representation for the commutator that the system understands.

• 

CompactDisplay is used to avoid redundant display of the functionality of a function.

• 

d_[n] represents the `&PartialD;`[n] tensorial differential operator.

• 

Define is used to define tensors, with or without specifying its components.

• 

Dagger  computes the Hermitian transpose of an expression.

• 

Normal, Expand, Factor respectively normalizes, expands and factorizes expressions that involve products of noncommutative operands.

• 

Simplify performs simplification of tensorial expressions involving products of noncommutative factors taking into account Einstein's sum rule for repeated indices, symmetries of the indices of tensorial subexpressions and custom commutator algebra rules.

• 

SortProducts uses the commutation rules set using Setup to sort the non-commutative operands of a product in an indicated ordering.

 

The Physics:-Library commands used

 

• 

Library:-ApplyProductsOfDifferentialOperators applies the differential operators found in a product to the product operands that appear to its right. For example, applying this command to  p*V(X)*m__e results in m__e*p(V(X))

• 

Library:-EqualizeRepeatedIndices equalizes the repeated indices in the terms of a sum, so for instance applying this command to L[a]^2+L[b]^2 results in 2*L[a]^2

 

References

 

[1] W. Pauli, "On the hydrogen spectrum from the standpoint of the new quantum mechanics,” Z. Phys. 36, 336–363 (1926)

[2] S. Weinberg, "Lectures on Quantum Mechanics, second edition, Cambridge University Press," 2015.

[3] Veronika Gáliková, Samuel Kováčik, and Peter Prešnajder, "Laplace-Runge-Lenz vector in quantum mechanics in noncommutative space", J. Math. Phys. 54, 122106 (2013)

[4] Castro, P.G., Kullock, R. "Physics of the so__q(4) hydrogen atom". Theor. Math. Phys. 185, 1678–1684 (2015).

[5] L. R. U. Manssur, R. Portugal, and B. F. Svaiter, "Group-Theoretic Approach for Symbolic Tensor Manipulation," International Journal of Modern Physics C, Vol. 13, No. 07, pp. 859-879 (2002).

 

Download Hidden_SO4_symmetry_of_the_hydrogen_atom.mw

Download Hidden_SO4_symmetry_submitted_to_CPC.pdf (all sections open)


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

hi guys....new image that I am very proud of....utilzing the number theoretic argument λ (n)

 

 

The computation of traces of products of Dirac matrices was implemented years ago - see Physics,Trace .

 

The simplification of products of Dirac matrices, however, was not. Now it is, and illustrating this new feature is the matter of this post. To reproduce the results below please update the Physics library with the one distributed at the Maplesoft R&D Physics webpage.

with(Physics)

 

First of all, when loading Physics, a frequent question is about the signature, the default is (- - - +)

Setup(signature)

[signature = `- - - +`]

(1)

This is important because the convention for the Algebra of Dirac Matrices depends on the signature. With the signatures (- - - +) as well as (+ - - -), the sign of the timelike component is 1

Library:-SignOfTimelikeComponent()

1

(2)

With the signatures (+ + + -) as well as (- + + +), the sign of the timelike component is of course -1

Library:-SignOfTimelikeComponent(`+ + + -`)

-1

(3)

The simplification of products of Dirac Matrices, illustrated below with the default signature, works fine with any of these signatures, and works without having to set a representation for the Dirac matrices -- all the results are representation-independent.

 

The examples below, however, also illustrate a new feature of Physics, for now implemented as a Library:-PerformMatrixOperations command (there is a related, also new, command, Library:-RewriteInMatrixForm, to just present the underlying matrix operations, without performing them). To illustrate this other new functionality , set a representation for the Dirac matrices, say the standard one

 

Setup(Dgamma = standard, math = true)

`* Partial match of  'Physics:-Dgamma' against keyword 'Dgammarepresentation'`

 

`* Partial match of  'math' against keyword 'mathematicalnotation'`

 

`Setting lowercaselatin letters to represent spinor indices `

 

`Defined Dirac gamma matrices (Dgamma) in standard representation`, gamma[1], gamma[2], gamma[3], gamma[4]

 

__________________________________________________

 

[Dgammarepresentation = standard, mathematicalnotation = true]

(4)

The four Dirac matrices are

TensorArray(Dgamma[`~mu`])

Array(%id = 18446744078360533342)

(5)

The definition of the Dirac matrices is implemented in Maple following the conventions of Landau books ([1] Quantum Electrodynamics, V4), and  does not depend on the signature, ie the form of these matrices is

"Library:-RewriteInMatrixForm(?)"

Array(%id = 18446744078360529726)

(6)

With the default signature, the space part components of  gamma[mu] change sign when compared with corresponding ones from gamma[`~mu`] while the timelike component remains unchanged

TensorArray(Dgamma[mu])

Array(%id = 18446744078565663678)

(7)

"Library:-RewriteInMatrixForm(?)"

Array(%id = 18446744078677131982)

(8)

For the default signature, the algebra of the Dirac Matrices, loaded by default when Physics is loaded, is (see page 80 of [1])

(%AntiCommutator = AntiCommutator)(Dgamma[`~mu`], Dgamma[`~nu`])

%AntiCommutator(Physics:-Dgamma[`~mu`], Physics:-Dgamma[`~nu`]) = 2*Physics:-g_[`~mu`, `~nu`]

(9)

When the sign of the timelike component of the signature is -1, we have a -1 factor on the right-hand side of (9).

 

Note as well that in (9) the right-hand side has no matrix elements. This is standard in particle physics where the computations are performed algebraically, without performing the matrix operations. For the purpose of actually performing the underlying matrix operations, however, one may want to rewrite this algebra including a 4x4 identity matrix. For that purpose, see Algebra of Dirac Matrices with an identity matrix on the right-hand side. For the purpose of this illustration, below we proceed with the algebra as shown in (9), interpreting right-hand sides as if they involve an identity matrix.

 

Verify the algebra rule by performing all the involved matrix operations

expand(%AntiCommutator(Physics[Dgamma][`~mu`], Physics[Dgamma][`~nu`]) = 2*Physics[g_][`~mu`, `~nu`])

Physics:-`*`(Physics:-Dgamma[`~mu`], Physics:-Dgamma[`~nu`])+Physics:-`*`(Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~mu`]) = 2*Physics:-g_[`~mu`, `~nu`]

(10)

Note that, regarding the spacetime indices, this is a 4x4 matrix, whose elements are in turn 4x4 matrices. Compute first the external 4x4 matrix related to mu and nu

TensorArray(Physics[`*`](Physics[Dgamma][`~mu`], Physics[Dgamma][`~nu`])+Physics[`*`](Physics[Dgamma][`~nu`], Physics[Dgamma][`~mu`]) = 2*Physics[g_][`~mu`, `~nu`])

Matrix(%id = 18446744078587020822)

(11)

Perform now all the matrix operations involved in each of the elements of this 4x4 matrix

"Library:-PerformMatrixOperations(?)"

Matrix(%id = 18446744078743243942)

(12)

By eye everything checks OK.NULL

 

Consider now the following five products of Dirac matrices

e0 := Dgamma[mu]^2

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~mu`])

(13)

e1 := Dgamma[mu]*Dgamma[`~nu`]*Dgamma[mu]

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~mu`])

(14)

e2 := Dgamma[mu]*Dgamma[`~lambda`]*Dgamma[`~nu`]*Dgamma[mu]

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~mu`])

(15)

e3 := Dgamma[mu]*Dgamma[`~lambda`]*Dgamma[`~nu`]*Dgamma[`~rho`]*Dgamma[mu]

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~mu`])

(16)

e4 := Dgamma[mu]*Dgamma[`~lambda`]*Dgamma[`~nu`]*Dgamma[`~rho`]*Dgamma[`~sigma`]*Dgamma[mu]

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~sigma`], Physics:-Dgamma[`~mu`])

(17)

New: the simplification of these products is now implemented

e0 = Simplify(e0)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~mu`]) = 4

(18)

Verify this result performing the underlying matrix operations

T := SumOverRepeatedIndices(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][`~mu`]) = 4)

Physics:-`*`(Physics:-Dgamma[1], Physics:-Dgamma[`~1`])+Physics:-`*`(Physics:-Dgamma[2], Physics:-Dgamma[`~2`])+Physics:-`*`(Physics:-Dgamma[3], Physics:-Dgamma[`~3`])+Physics:-`*`(Physics:-Dgamma[4], Physics:-Dgamma[`~4`]) = 4

(19)

Library:-PerformMatrixOperations(T)

Matrix(%id = 18446744078553169662) = 4

(20)

The same with the other expressions

e1 = Simplify(e1)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~mu`]) = -2*Physics:-Dgamma[`~nu`]

(21)

SumOverRepeatedIndices(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][`~nu`], Physics[Dgamma][`~mu`]) = -2*Physics[Dgamma][`~nu`])

Physics:-`*`(Physics:-Dgamma[1], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~1`])+Physics:-`*`(Physics:-Dgamma[2], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~2`])+Physics:-`*`(Physics:-Dgamma[3], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~3`])+Physics:-`*`(Physics:-Dgamma[4], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~4`]) = -2*Physics:-Dgamma[`~nu`]

(22)

T := TensorArray(Physics[`*`](Physics[Dgamma][1], Physics[Dgamma][`~nu`], Physics[Dgamma][`~1`])+Physics[`*`](Physics[Dgamma][2], Physics[Dgamma][`~nu`], Physics[Dgamma][`~2`])+Physics[`*`](Physics[Dgamma][3], Physics[Dgamma][`~nu`], Physics[Dgamma][`~3`])+Physics[`*`](Physics[Dgamma][4], Physics[Dgamma][`~nu`], Physics[Dgamma][`~4`]) = -2*Physics[Dgamma][`~nu`])

Array(%id = 18446744078695012102)

(23)

Library:-PerformMatrixOperations(T)

Array(%id = 18446744078701714238)

(24)

For e2

e2 = Simplify(e2)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~mu`]) = 4*Physics:-g_[`~lambda`, `~nu`]

(25)

SumOverRepeatedIndices(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~mu`]) = 4*Physics[g_][`~lambda`, `~nu`])

Physics:-`*`(Physics:-Dgamma[1], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~1`])+Physics:-`*`(Physics:-Dgamma[2], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~2`])+Physics:-`*`(Physics:-Dgamma[3], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~3`])+Physics:-`*`(Physics:-Dgamma[4], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~4`]) = 4*Physics:-g_[`~lambda`, `~nu`]

(26)

T := TensorArray(Physics[`*`](Physics[Dgamma][1], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~1`])+Physics[`*`](Physics[Dgamma][2], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~2`])+Physics[`*`](Physics[Dgamma][3], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~3`])+Physics[`*`](Physics[Dgamma][4], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~4`]) = 4*Physics[g_][`~lambda`, `~nu`])

Matrix(%id = 18446744078470204942)

(27)

Library:-PerformMatrixOperations(T)

Matrix(%id = 18446744078550068870)

(28)

For e3 we have

e3 = Simplify(e3)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~mu`]) = -2*Physics:-`*`(Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~lambda`])

(29)

Verify this result,

SumOverRepeatedIndices(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~mu`]) = -2*Physics[`*`](Physics[Dgamma][`~rho`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~lambda`]))

Physics:-`*`(Physics:-Dgamma[1], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~1`])+Physics:-`*`(Physics:-Dgamma[2], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~2`])+Physics:-`*`(Physics:-Dgamma[3], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~3`])+Physics:-`*`(Physics:-Dgamma[4], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~4`]) = -2*Physics:-`*`(Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~lambda`])

(30)

In this case, with three free spacetime indices lambda, nu, rho, the spacetime components form an array 4x4x4 of 64 components, each of which is a matrix equation

T := TensorArray(Physics[`*`](Physics[Dgamma][1], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~1`])+Physics[`*`](Physics[Dgamma][2], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~2`])+Physics[`*`](Physics[Dgamma][3], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~3`])+Physics[`*`](Physics[Dgamma][4], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~4`]) = -2*Physics[`*`](Physics[Dgamma][`~rho`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~lambda`]))

Array(%id = 18446744078647326830)

(31)

For instance, the first element is

T[1, 1, 1]

Physics:-`*`(Physics:-Dgamma[1], Physics:-`^`(Physics:-Dgamma[`~1`], 4))+Physics:-`*`(Physics:-Dgamma[2], Physics:-`^`(Physics:-Dgamma[`~1`], 3), Physics:-Dgamma[`~2`])+Physics:-`*`(Physics:-Dgamma[3], Physics:-`^`(Physics:-Dgamma[`~1`], 3), Physics:-Dgamma[`~3`])+Physics:-`*`(Physics:-Dgamma[4], Physics:-`^`(Physics:-Dgamma[`~1`], 3), Physics:-Dgamma[`~4`]) = -2*Physics:-`^`(Physics:-Dgamma[`~1`], 3)

(32)

and it checks OK:

Library:-PerformMatrixOperations(T[1, 1, 1])

Matrix(%id = 18446744078647302614) = Matrix(%id = 18446744078647302974)

(33)

How can you test the 64 components of T all at once?

1. Compute the matrices, without displaying the whole thing, take the elements of the array and remove the indices (ie take the right-hand side); call it M

 

M := map(rhs, ArrayElems(Library:-PerformMatrixOperations(T)))

 

For instance,

M[1]

Matrix(%id = 18446744078629635726) = Matrix(%id = 18446744078629636206)

(34)

Now verify all these matrix equations at once: take the elements of the arrays on each side of the equations and verify that the are the same: we expect for output just {true}

 

map(proc (u) options operator, arrow; evalb(map(ArrayElems, u)) end proc, M)

{true}

(35)

The same for e4

e4 = Simplify(e4)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~sigma`], Physics:-Dgamma[`~mu`]) = 2*Physics:-`*`(Physics:-Dgamma[`~sigma`], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`])+2*Physics:-`*`(Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~sigma`])

(36)

SumOverRepeatedIndices(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~sigma`], Physics[Dgamma][`~mu`]) = 2*Physics[`*`](Physics[Dgamma][`~sigma`], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`])+2*Physics[`*`](Physics[Dgamma][`~rho`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~sigma`]))

Physics:-`*`(Physics:-Dgamma[1], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~sigma`], Physics:-Dgamma[`~1`])+Physics:-`*`(Physics:-Dgamma[2], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~sigma`], Physics:-Dgamma[`~2`])+Physics:-`*`(Physics:-Dgamma[3], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~sigma`], Physics:-Dgamma[`~3`])+Physics:-`*`(Physics:-Dgamma[4], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~sigma`], Physics:-Dgamma[`~4`]) = 2*Physics:-`*`(Physics:-Dgamma[`~sigma`], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~rho`])+2*Physics:-`*`(Physics:-Dgamma[`~rho`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~sigma`])

(37)

Regarding the spacetime indices this is now an array 4x4x4x4

T := TensorArray(Physics[`*`](Physics[Dgamma][1], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~sigma`], Physics[Dgamma][`~1`])+Physics[`*`](Physics[Dgamma][2], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~sigma`], Physics[Dgamma][`~2`])+Physics[`*`](Physics[Dgamma][3], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~sigma`], Physics[Dgamma][`~3`])+Physics[`*`](Physics[Dgamma][4], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`], Physics[Dgamma][`~sigma`], Physics[Dgamma][`~4`]) = 2*Physics[`*`](Physics[Dgamma][`~sigma`], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~rho`])+2*Physics[`*`](Physics[Dgamma][`~rho`], Physics[Dgamma][`~nu`], Physics[Dgamma][`~lambda`], Physics[Dgamma][`~sigma`]))

Array(%id = 18446744078730196382)

(38)

For instance the first of these 256 matrix equations

T[1, 1, 1, 1]

Physics:-`*`(Physics:-Dgamma[1], Physics:-`^`(Physics:-Dgamma[`~1`], 5))+Physics:-`*`(Physics:-Dgamma[2], Physics:-`^`(Physics:-Dgamma[`~1`], 4), Physics:-Dgamma[`~2`])+Physics:-`*`(Physics:-Dgamma[3], Physics:-`^`(Physics:-Dgamma[`~1`], 4), Physics:-Dgamma[`~3`])+Physics:-`*`(Physics:-Dgamma[4], Physics:-`^`(Physics:-Dgamma[`~1`], 4), Physics:-Dgamma[`~4`]) = 4*Physics:-`^`(Physics:-Dgamma[`~1`], 4)

(39)

verifies OK:

Library:-PerformMatrixOperations(Physics[`*`](Physics[Dgamma][1], Physics[`^`](Physics[Dgamma][`~1`], 5))+Physics[`*`](Physics[Dgamma][2], Physics[`^`](Physics[Dgamma][`~1`], 4), Physics[Dgamma][`~2`])+Physics[`*`](Physics[Dgamma][3], Physics[`^`](Physics[Dgamma][`~1`], 4), Physics[Dgamma][`~3`])+Physics[`*`](Physics[Dgamma][4], Physics[`^`](Physics[Dgamma][`~1`], 4), Physics[Dgamma][`~4`]) = 4*Physics[`^`](Physics[Dgamma][`~1`], 4))

Matrix(%id = 18446744078727227382) = Matrix(%id = 18446744078727227862)

(40)

Now all the 256 matrix equations verified at once as done for e3

 

M := map(rhs, ArrayElems(Library:-PerformMatrixOperations(T)))

map(proc (u) options operator, arrow; evalb(map(ArrayElems, u)) end proc, M)

{true}

(41)

Finally, although there is more work to be done here, let's define some tensors and contract their product with these expressions involving products of Dirac matrices.

 

For example,

Define(A, B)

`Defined as tensors`

 

{A[nu], B[lambda], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu]}

(42)

Contract with e1 and e2 and simplify

A[nu]*e1; % = Simplify(%)

A[nu]*Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~mu`]) = -2*A[`~nu`]*Physics:-Dgamma[nu]

(43)

A[nu]*B[lambda]*e2; % = Simplify(%)

A[nu]*B[lambda]*Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[`~lambda`], Physics:-Dgamma[`~nu`], Physics:-Dgamma[`~mu`]) = 4*B[`~nu`]*A[nu]

(44)

 


 

Download DiracMatricesAndPerformMatrixOperation.mw

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

Application to generate vector exercises using very easy to use patterns. These exercises are for sum of vectors in calculations of magnitude, direction, graph and projections. Basically to evaluate our students on the board and thus not lose the results. For university professors and engineering students.

Generator_of_exercises_with_vectors.mw

Lenin Araujo Castillo

Ambassador of Maple

The Perimeter Institute for Theoretical Physics (PI) is a place where bold ideas flourish. It brings together great minds in a shared effort to achieve scientific breakthroughs that will transform our future. PI is an independent research center in foundational theoretical physics.

One of the key mission objectives of Perimeter is to provide scientific training and educational outreach activities to the general public. Maplesoft is proud to be part of this endeavor, as PI’s Educational Outreach Champion. Maplesoft’s contributions support Perimeter’s Teacher Network training activities, core educational resources, development of online course material, support of events such as the EinsteinPlus workshop for high school teachers, the International Summer School for Young Physicists (ISSYP), and other initiatives.
 

The annual International Summer School for Young Physicists (ISSYP) is a two-week camp that brings together 40 exceptional physics-minded students from high schools across the globe to PI. The program covers many different topics in physics such as quantum mechanics, special relativity, general relativity, and cosmology. Each year students receive a complimentary copy of Maple, and use the product to practice and strengthen their math skills. The program receives an average of three-hundred applications from students in grades eleven and twelve from around the world. Competition is intense, and students who are chosen for the program are extremely bright and advanced for their age; however there is some variation in their level of math and physics knowledge. . Students are asked to review a “math primer” document to prepare them with the background needed for the program.The ISSYP program now uses Möbius, Maplesoft’s online courseware platform to administer this primer. With Möbius, PI has moved from a pdf document primer to fully online material, which has motivated more students to complete the material and be more engaged in their courses. The interactivity and engagement that technology provides has made the summer program more productive and dynamic.

EinsteinPlus is a one-week intensive workshop for Canadian and international high school teachers that focuses on modern physics, including quantum physics, special relativity, and cosmology. EinsteinPlus also provides unique opportunities to learn some of the latest developments in physics from expert researchers at the forefront of their fields. Maplesoft proudly supports this workshop by giving teachers access to and training in Maple.

 

Perimeter Institute also organizes a lively program of seminars, regularly exposing researchers and students to current ideas in the wider theoretical physics community. The talks provide content outside of, but related to, core disciplines.  Recently Maplesoft’s own physics expert Dr. Edgardo Cheb-Terrab conducted a lecture and training session at PI on Computer Algebra for Theoretical Physics.

Dr. Edgardo Cheb-Terrab is the force behind the algorithms and Maple libraries of the ODE and PDE symbolic solvers, the MathematicalFunctions package (an expert system in special functions) and the Physics package, among other things.  

In his talk at PI, the Physics project at Maplesoft was presented and the resulting Physics package was illustrated through simple problems in classical field theory, quantum mechanics and general relativity, and through tackling the computations of some recent Physical Review papers in those areas.   In addition there was a hands-on workshop where attendees were offered four choices of activity:  follow the mini-course; explore items of the worksheet of the morning presentation; or bring their own problems so that Dr. Cheb-Terrab could guide them on how to tackle it using the Physics package and Maple in general.

As a company that strives to continuously improve student learning, and empower instructors and researchers with the tools necessary to compete in an ever changing and demanding educational environment, Maplesoft’s partnership with the Perimeter Institute allows us to do just that. We take great pride and joy in bringing our technology to outreach programs for students and teachers, making these opportunities a more productive and dynamic experience for all.

 

In a previous Mapleprimes question related to Dirac Matrices, I was asked how to represent the algebra of Dirac matrices with an identity matrix on the right-hand side of  %AntiCommutator(Physics:-Dgamma[j], Physics:-Dgamma[k]) = 2*g[j, k]. Since this is a hot-topic in general, in that, making it work, involves easy and useful functionality however somewhat hidden, not known in general, it passed through my mind that this may be of interest in general. (To reproduce the computations below you need to update your Physics library with the one distributed at the Maplesoft R&D Physics webpage.)

 

restart

with(Physics)

 

First of all, this shows the default algebra rules loaded when you load the Physics package, for the Pauli  and Dirac  matrices

Library:-DefaultAlgebraRules()

%Commutator(Physics:-Psigma[j], Physics:-Psigma[k]) = (2*I)*(Physics:-Psigma[1]*Physics:-LeviCivita[4, j, k, `~1`]+Physics:-Psigma[2]*Physics:-LeviCivita[4, j, k, `~2`]+Physics:-Psigma[3]*Physics:-LeviCivita[4, j, k, `~3`]), %AntiCommutator(Physics:-Psigma[j], Physics:-Psigma[k]) = 2*Physics:-KroneckerDelta[j, k], %AntiCommutator(Physics:-Dgamma[j], Physics:-Dgamma[k]) = 2*Physics:-g_[j, k]

(1)

Now, you can always overwrite these algebra rules.

 

For instance, to represent the algebra of Dirac matrices with an identity matrix on the right-hand side, one can proceed as follows.

First create the identity matrix. To emulate what we do with paper and pencil, where we write I to represent an identity matrix without having to see the actual table 2x2 with the number 1 in the diagonal and a bunch of 0, I will use the old matrix command, not the new Matrix (see more comments on this at the end). One way of entering this identity matrix is

`&Iopf;` := matrix(4, 4, proc (i, j) options operator, arrow; KroneckerDelta[i, j] end proc)

array( 1 .. 4, 1 .. 4, [( 4, 1 ) = (0), ( 1, 2 ) = (0), ( 2, 3 ) = (0), ( 1, 3 ) = (0), ( 2, 2 ) = (1), ( 4, 2 ) = (0), ( 3, 4 ) = (0), ( 1, 4 ) = (0), ( 3, 1 ) = (0), ( 4, 4 ) = (1), ( 3, 2 ) = (0), ( 1, 1 ) = (1), ( 2, 1 ) = (0), ( 4, 3 ) = (0), ( 3, 3 ) = (1), ( 2, 4 ) = (0)  ] )

(2)

The most important advantage of the old matrix command is that I is of type algebraic and, consequently, this is the important thing, one can operate with it algebraically and its contents are not displayed:

type(`&Iopf;`, algebraic)

true

(3)

`&Iopf;`

`&Iopf;`

(4)

And so, most commands of the Maple library, that only work with objects of type algebraic, will handle the task. The contents are displayed only on demand, for instance using eval

eval(`&Iopf;`)

array( 1 .. 4, 1 .. 4, [( 4, 1 ) = (0), ( 1, 2 ) = (0), ( 2, 3 ) = (0), ( 1, 3 ) = (0), ( 2, 2 ) = (1), ( 4, 2 ) = (0), ( 3, 4 ) = (0), ( 1, 4 ) = (0), ( 3, 1 ) = (0), ( 4, 4 ) = (1), ( 3, 2 ) = (0), ( 1, 1 ) = (1), ( 2, 1 ) = (0), ( 4, 3 ) = (0), ( 3, 3 ) = (1), ( 2, 4 ) = (0)  ] )

(5)

Returning to the topic at hands: set now the algebra the way you want, with an I matrix on the right-hand side, and without seeing a bunch of 0 and 1

%AntiCommutator(Dgamma[mu], Dgamma[nu]) = 2*g_[mu, nu]*`&Iopf;`

%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]) = 2*Physics:-g_[mu, nu]*`&Iopf;`

(6)

Setup(algebrarules = (%AntiCommutator(Physics[Dgamma][mu], Physics[Dgamma][nu]) = 2*Physics[g_][mu, nu]*`&Iopf;`))

[algebrarules = {%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]) = 2*Physics:-g_[mu, nu]*`&Iopf;`}]

(7)

And that is all.

 

Check it out

(%AntiCommutator = AntiCommutator)(Dgamma[mu], Dgamma[nu])

%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]) = 2*Physics:-g_[mu, nu]*`&Iopf;`

(8)

Set now a Dirac spinor; this is how you could do that, step-by-step.

 

Again you can use {vector, matrix, array} or {Vector, Matrix, Array}, and again, if you use the Upper case commands, you always have the components visible, and cannot compute with the object normally since they are not of type algebraic. So I use matrix, not Matrix, and matrix instead of vector so that the Dirac spinor that is both algebraic and matrix, is also displayed in the usual display as a "column vector"

 

_local(Psi)

Setup(anticommutativeprefix = {Psi, psi})

[anticommutativeprefix = {_lambda, psi, :-Psi}]

(9)

In addition, following your question, in this example I explicitly specify the components of the spinor, in any preferred way, for example here I use psi[j]

Psi := matrix(4, 1, [psi[1], psi[2], psi[3], psi[4]])

array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] )

(10)

Check it out:

Psi

Psi

(11)

type(Psi, algebraic)

true

(12)

Let's see all this working together by multiplying the anticommutator equation by Psi

(%AntiCommutator(Physics[Dgamma][mu], Physics[Dgamma][nu]) = 2*Physics[g_][mu, nu]*`&Iopf;`)*Psi

Physics:-`*`(%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]), Psi) = 2*Physics:-g_[mu, nu]*Physics:-`*`(`&Iopf;`, Psi)

(13)

Suppose now that you want to see the matrix form of this equation

Library:-RewriteInMatrixForm(Physics[`*`](%AntiCommutator(Physics[Dgamma][mu], Physics[Dgamma][nu]), Psi) = 2*Physics[g_][mu, nu]*Physics[`*`](`&Iopf;`, Psi))

Physics:-`.`(%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]), array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] )) = 2*Physics:-g_[mu, nu]*Physics:-`.`(array( 1 .. 4, 1 .. 4, [( 4, 1 ) = (0), ( 1, 2 ) = (0), ( 2, 3 ) = (0), ( 1, 3 ) = (0), ( 2, 2 ) = (1), ( 4, 2 ) = (0), ( 3, 4 ) = (0), ( 1, 4 ) = (0), ( 3, 1 ) = (0), ( 4, 4 ) = (1), ( 3, 2 ) = (0), ( 1, 1 ) = (1), ( 2, 1 ) = (0), ( 4, 3 ) = (0), ( 3, 3 ) = (1), ( 2, 4 ) = (0)  ] ), array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] ))

(14)

The above has the matricial operations delayed; unleash them

%

Physics:-`.`(%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]), array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] )) = 2*Physics:-g_[mu, nu]*(array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] ))

(15)

Or directly perform in one go the matrix operations behind (13)

Library:-PerformMatrixOperations(Physics[`*`](%AntiCommutator(Physics[Dgamma][mu], Physics[Dgamma][nu]), Psi) = 2*Physics[g_][mu, nu]*Physics[`*`](`&Iopf;`, Psi))

Physics:-`.`(%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]), array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] )) = 2*Physics:-g_[mu, nu]*(array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] ))

(16)

REMARK: As shown above, in general, the representation using lowercase commands allows you to use `*` or `.` depending on whether you want to represent the operation or perform the operation. For example this represents the operation, as an exact mimicry of what we do with paper and pencil, both regarding input and output

`&Iopf;`*Psi

Physics:-`*`(`&Iopf;`, Psi)

(17)

And this performs the operation

`&Iopf;`.Psi

array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] )

(18)

Or to only displaying the operation

Library:-RewriteInMatrixForm(Physics[`*`](`&Iopf;`, Psi))

Physics:-`.`(array( 1 .. 4, 1 .. 4, [( 4, 1 ) = (0), ( 1, 2 ) = (0), ( 2, 3 ) = (0), ( 1, 3 ) = (0), ( 2, 2 ) = (1), ( 4, 2 ) = (0), ( 3, 4 ) = (0), ( 1, 4 ) = (0), ( 3, 1 ) = (0), ( 4, 4 ) = (1), ( 3, 2 ) = (0), ( 1, 1 ) = (1), ( 2, 1 ) = (0), ( 4, 3 ) = (0), ( 3, 3 ) = (1), ( 2, 4 ) = (0)  ] ), array( 1 .. 4, 1 .. 1, [( 4, 1 ) = (psi[4]), ( 3, 1 ) = (psi[3]), ( 1, 1 ) = (psi[1]), ( 2, 1 ) = (psi[2])  ] ))

(19)

And to perform all these matricial operations within an algebraic expression,

Library:-PerformMatrixOperations(Physics[`*`](`&Iopf;`, Psi))

Matrix(%id = 18446744079185513758)

(20)

``

 


 

Download DiracAlgebraWithIdentityMatrix.mw

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


 

Quantum Commutation Rules Basics

 

Pascal Szriftgiser1 and Edgardo S. Cheb-Terrab2 

(1) Laboratoire PhLAM, UMR CNRS 8523, Université Lille 1, F-59655, France

(2) Maplesoft

NULL

NULL

In Quantum Mechanics, in the coordinates representation, the component of the momentum operator along the x axis is given by the differential operator


 "`p__x`=-i `&hbar;`(&PartialD;)/(&PartialD;x)  "

 

The purpose of the exercises below is thus to derive the commutation rules, in the coordinates representation, between an arbitrary function of the coordinates and the related momentum, departing from the differential representation

 

p[n] = -i*`&hbar;`*`&PartialD;`[n]

These two exercises illustrate how to have full control of the computational process by using different elements of the Maple language, including inert representations of abstract vectorial differential operators, Hermitian operators, algebra rules, etc.

 

These exercises also illustrate a new feature of the Physics package, introduced in Maple 2017, that is getting refined (the computation below requires the Maplesoft updates of the Physics package) which is the ability to perform computations algebraically, using the product operator, but with differential operators, and transform the products into the application of the operators only when we want that, as we do with paper and pencil.

 

%Commutator(g(x, y, z), p_) = I*`&hbar;`*Nabla(F(X))

 

restart; with(Physics); with(Physics[Vectors]); interface(imaginaryunit = i)

 

Start setting the problem:

– 

 all ofx, y, z, p__x, p__y, p__z are Hermitian operators

– 

 all of x, y, z commute between each other

– 

 tell the system only that the operators x, y, z are the differentiation variables of the corresponding (differential) operators p__x, p__y, p__z but do not tell what is the form of the operators

 

Setup(mathematicalnotation = true, differentialoperators = {[p_, [x, y, z]]}, hermitianoperators = {p, x, y, z}, algebrarules = {%Commutator(x, y) = 0, %Commutator(x, z) = 0, %Commutator(y, z) = 0}, quiet)

[algebrarules = {%Commutator(x, y) = 0, %Commutator(x, z) = 0, %Commutator(y, z) = 0}, differentialoperators = {[p_, [x, y, z]]}, hermitianoperators = {p, x, y, z}, mathematicalnotation = true]

(1.1)

Assuming F(X) is a smooth function, the idea is to apply the commutator %Commutator(F(X), p_) to an arbitrary ket of the Hilbert space Ket(psi, x, y, z), perform the operation explicitly after setting a differential operator representation for `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`, and from there get the commutation rule between F(X) and `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`.

 

Start introducing the commutator, to proceed with full control of the operations we use the inert form %Commutator

alias(X = (x, y, z))

CompactDisplay(F(X))

` F`(X)*`will now be displayed as`*F

(1.2)

%Commutator(F(X), p_)*Ket(psi, X)

Physics:-`*`(%Commutator(F(X), p_), Physics:-Ket(psi, x, y, z))

(1.3)

For illustration purposes only (not necessary), expand this commutator

Physics[`*`](%Commutator(F(X), p_), Physics[Ket](psi, x, y, z)) = expand(Physics[`*`](%Commutator(F(X), p_), Physics[Ket](psi, x, y, z)))

Physics:-`*`(%Commutator(F(X), p_), Physics:-Ket(psi, x, y, z)) = Physics:-`*`(F(X), p_, Physics:-Ket(psi, x, y, z))-Physics:-`*`(p_, F(X), Physics:-Ket(psi, x, y, z))

(1.4)

Note that  `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`, F(X) and the ket Ket(psi, x, y, z) are operands in the products above and that they do not commute: we indicated that the coordinates x, y, z are the differentiation variables of `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`. This emulates what we do when computing with these operators with paper and pencil, where we represent the application of a differential operator as a product operation.

 

This representation can be transformed into the (traditional in computer algebra) application of the differential operator when desired, as follows:

Physics[`*`](%Commutator(F(X), p_), Physics[Ket](psi, x, y, z)) = Library:-ApplyProductsOfDifferentialOperators(Physics[`*`](%Commutator(F(X), p_), Physics[Ket](psi, x, y, z)))

Physics:-`*`(%Commutator(F(X), p_), Physics:-Ket(psi, x, y, z)) = Physics:-`*`(F(X), p_(Physics:-Ket(psi, x, y, z)))-p_(Physics:-`*`(F(X), Physics:-Ket(psi, x, y, z)))

(1.5)

Note that, in `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`(F(X)*Ket(psi, x, y, z)), the application of `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))` is not expanded: at this point nothing is known about  `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))` , it is not necessarily a linear operator. In the Quantum Mechanics problem at hands, however, it is. So give now the operator  `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))` an explicit representation as a linear vectorial differential operator (we use the inert form %Nabla, %Nabla, to be able to proceed with full control one step at a time)

p_ := proc (f) options operator, arrow; -I*`&hbar;`*%Nabla(f) end proc

proc (f) options operator, arrow; -Physics:-`*`(Physics:-`*`(I, `&hbar;`), %Nabla(f)) end proc

(1.6)

The expression (1.5) becomes

Physics[`*`](%Commutator(F(X), p_), Physics[Ket](psi, x, y, z)) = Physics[`*`](F(X), p_(Physics[Ket](psi, x, y, z)))-p_(Physics[`*`](F(X), Physics[Ket](psi, x, y, z)))

Physics:-`*`(%Commutator(F(X), p_), Physics:-Ket(psi, x, y, z)) = -I*`&hbar;`*Physics:-`*`(F(X), %Nabla(Physics:-Ket(psi, x, y, z)))+I*`&hbar;`*%Nabla(Physics:-`*`(F(X), Physics:-Ket(psi, x, y, z)))

(1.7)

Activate now the inert operator VectorCalculus[Nabla] and simplify taking into account the algebra rules for the coordinate operators {%Commutator(x, y) = 0, %Commutator(x, z) = 0, %Commutator(y, z) = 0}

Simplify(value(Physics[`*`](%Commutator(F(X), p_), Physics[Ket](psi, x, y, z)) = -I*`&hbar;`*Physics[`*`](F(X), %Nabla(Physics[Ket](psi, x, y, z)))+I*`&hbar;`*%Nabla(Physics[`*`](F(X), Physics[Ket](psi, x, y, z)))))

Physics:-`*`(Physics:-Commutator(F(X), p_), Physics:-Ket(psi, x, y, z)) = I*`&hbar;`*_i*Physics:-`*`(diff(F(X), x), Physics:-Ket(psi, x, y, z))+I*`&hbar;`*_j*Physics:-`*`(diff(F(X), y), Physics:-Ket(psi, x, y, z))+I*`&hbar;`*_k*Physics:-`*`(diff(F(X), z), Physics:-Ket(psi, x, y, z))

(1.8)

To make explicit the gradient in disguise on the right-hand side, factor out the arbitrary ket Ket(psi, x, y, z)

Factor(Physics[`*`](Physics[Commutator](F(X), p_), Physics[Ket](psi, x, y, z)) = I*`&hbar;`*_i*Physics[`*`](diff(F(X), x), Physics[Ket](psi, x, y, z))+I*`&hbar;`*_j*Physics[`*`](diff(F(X), y), Physics[Ket](psi, x, y, z))+I*`&hbar;`*_k*Physics[`*`](diff(F(X), z), Physics[Ket](psi, x, y, z)))

Physics:-`*`(Physics:-Commutator(F(X), p_), Physics:-Ket(psi, x, y, z)) = I*`&hbar;`*Physics:-`*`((diff(F(X), y))*_j+(diff(F(X), z))*_k+(diff(F(X), x))*_i, Physics:-Ket(psi, x, y, z))

(1.9)

Combine now the expanded gradient into its inert (not-expanded) form

subs((Gradient = %Gradient)(F(X)), Physics[`*`](Physics[Commutator](F(X), p_), Physics[Ket](psi, x, y, z)) = I*`&hbar;`*Physics[`*`]((diff(F(X), y))*_j+(diff(F(X), z))*_k+(diff(F(X), x))*_i, Physics[Ket](psi, x, y, z)))

Physics:-`*`(Physics:-Commutator(F(X), p_), Physics:-Ket(psi, x, y, z)) = I*`&hbar;`*Physics:-`*`(%Gradient(F(X)), Physics:-Ket(psi, x, y, z))

(1.10)

Since (1.10) is true for allKet(psi, x, y, z), this ket can be removed from both sides of the equation. One can do that either taking coefficients (see Coefficients ) or multiplying by the "formal inverse" of this ket, arriving at the (expected) form of the commutation rule between F(X) and `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`

(Physics[`*`](Physics[Commutator](F(X), p_), Ket(psi, x, y, z)) = I*`&hbar;`*Physics[`*`](%Gradient(F(X)), Ket(psi, x, y, z)))*Inverse(Ket(psi, x, y, z))

Physics:-Commutator(F(X), p_) = I*`&hbar;`*%Gradient(F(X))

(1.11)

Tensor notation, "[`X__m`,P[n]][-]=i `&hbar;` g[m,n]"

 

The computation rule for position and momentum, this time in tensor notation, is performed in the same way, just that, additionally, specify that the space indices to be used are lowercase latin letters, and set the relationship between the differential operators and the coordinates directly using tensor notation.

You can also specify that the metric is Euclidean, but that is not necessary: the default metric of the Physics package, a Minkowski spacetime, includes a 3D subspace that is Euclidean, and the default signature, (- - - +), is not a problem regarding this computation.

 

restart; with(Physics); interface(imaginaryunit = i)

Setup(mathematicalnotation = true, coordinates = cartesian, spaceindices = lowercaselatin, algebrarules = {%Commutator(x, y) = 0, %Commutator(x, z) = 0, %Commutator(y, z) = 0}, hermitianoperators = {P, X, p}, differentialoperators = {[P[m], [x, y, z]]}, quiet)

[algebrarules = {%Commutator(x, y) = 0, %Commutator(x, z) = 0, %Commutator(y, z) = 0}, coordinatesystems = {X}, differentialoperators = {[P[m], [x, y, z]]}, hermitianoperators = {P, p, t, x, y, z}, mathematicalnotation = true, spaceindices = lowercaselatin]

(2.1)

Define now the tensor P[m]

Define(P[m], quiet)

{Physics:-Dgamma[mu], P[m], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2.2)

Introduce now the Commutator, this time in active form, to show how to reobtain the non-expanded form at the end by resorting the operands in products

Commutator(X[m], P[n])*Ket(psi, x, y, z)

Physics:-`*`(Physics:-Commutator(Physics:-SpaceTimeVector[m](X), P[n]), Physics:-Ket(psi, x, y, z))

(2.3)

Expand first (not necessary) to see how the operator P[n] is going to be applied

Physics[`*`](Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]), Ket(psi, x, y, z)) = expand(Physics[`*`](Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]), Ket(psi, x, y, z)))

Physics:-`*`(Physics:-Commutator(Physics:-SpaceTimeVector[m](X), P[n]), Physics:-Ket(psi, x, y, z)) = Physics:-`*`(Physics:-SpaceTimeVector[m](X), P[n], Physics:-Ket(psi, x, y, z))-Physics:-`*`(P[n], Physics:-SpaceTimeVector[m](X), Physics:-Ket(psi, x, y, z))

(2.4)

Now expand and directly apply in one ago the differential operator P[n]

Physics[`*`](Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]), Ket(psi, x, y, z)) = Library:-ApplyProductsOfDifferentialOperators(Physics[`*`](Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]), Ket(psi, x, y, z)))

Physics:-`*`(Physics:-Commutator(Physics:-SpaceTimeVector[m](X), P[n]), Physics:-Ket(psi, x, y, z)) = Physics:-`*`(Physics:-SpaceTimeVector[m](X), P[n](Physics:-Ket(psi, x, y, z)))-P[n](Physics:-`*`(Physics:-SpaceTimeVector[m](X), Physics:-Ket(psi, x, y, z)))

(2.5)

Introducing the explicit differential operator representation for P[n], here again using the inert %d_[n] to keep control of the computations step by step

P[n] := proc (f) options operator, arrow; -I*`&hbar;`*%d_[n](f) end proc

proc (f) options operator, arrow; -Physics:-`*`(Physics:-`*`(I, `&hbar;`), %d_[n](f)) end proc

(2.6)

The expanded and applied commutator (2.5) becomes

Physics[`*`](Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]), Ket(psi, x, y, z)) = Physics[`*`](Physics[SpaceTimeVector][m](X), P[n](Ket(psi, x, y, z)))-P[n](Physics[`*`](Physics[SpaceTimeVector][m](X), Ket(psi, x, y, z)))

Physics:-`*`(Physics:-Commutator(Physics:-SpaceTimeVector[m](X), P[n]), Physics:-Ket(psi, x, y, z)) = -I*`&hbar;`*Physics:-`*`(Physics:-SpaceTimeVector[m](X), %d_[n](Physics:-Ket(psi, x, y, z)))+I*`&hbar;`*%d_[n](Physics:-`*`(Physics:-SpaceTimeVector[m](X), Physics:-Ket(psi, x, y, z)))

(2.7)

Activate now the inert operators %d_[n] and simplify taking into account Einstein's rule for repeated indices

Simplify(value(Physics[`*`](Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]), Ket(psi, x, y, z)) = -I*`&hbar;`*Physics[`*`](Physics[SpaceTimeVector][m](X), %d_[n](Ket(psi, x, y, z)))+I*`&hbar;`*%d_[n](Physics[`*`](Physics[SpaceTimeVector][m](X), Ket(psi, x, y, z)))))

Physics:-`*`(Physics:-Commutator(Physics:-SpaceTimeVector[m](X), P[n]), Physics:-Ket(psi, x, y, z)) = I*`&hbar;`*Physics:-g_[m, n]*Physics:-Ket(psi, x, y, z)

(2.8)

Since the ket Ket(psi, x, y, z) is arbitrary, we can take coefficients (or multiply by the formal Inverse  of this ket as done in the previous section). For illustration purposes, we use   Coefficients  and note hwo it automatically expands the commutator

Coefficients(Physics[`*`](Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]), Ket(psi, x, y, z)) = I*`&hbar;`*Physics[g_][m, n]*Ket(psi, x, y, z), Ket(psi, x, y, z))

Physics:-`*`(Physics:-SpaceTimeVector[m](X), P[n])-Physics:-`*`(P[n], Physics:-SpaceTimeVector[m](X)) = I*`&hbar;`*Physics:-g_[m, n]

(2.9)

One can undo this (frequently undesired) expansion of the commutator by sorting the products on the left-hand side using the commutator between X[m] and P[n]

Library:-SortProducts(Physics[`*`](Physics[SpaceTimeVector][m](X), P[n])-Physics[`*`](P[n], Physics[SpaceTimeVector][m](X)) = I*`&hbar;`*Physics[g_][m, n], [P[n], X[m]], usecommutator)

Physics:-Commutator(Physics:-SpaceTimeVector[m](X), P[n]) = I*`&hbar;`*Physics:-g_[m, n]

(2.10)

And that is the result we wanted to compute.

 

Additionally, to see this rule in matrix form,

TensorArray(-(Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]) = I*`&hbar;`*Physics[g_][m, n]))

Matrix(%id = 18446744078261558678)

(2.11)

In the above, we use equation (2.10) multiplied by -1 to avoid a minus sign in all the elements of (2.11), due to having worked with the default signature (- - - +); this minus sign is not necessary if in the Setup at the beginning one also sets  signature = `+ + + -`

 

For display purposes, to see this matrix expressed in terms of the geometrical components of the momentum `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))` , redefine the tensor P[n] explicitly indicating its Cartesian components

Define(P[m] = [p__x, p__y, p__z], quiet)

{Physics:-Dgamma[mu], P[m], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2.12)

TensorArray(-(Physics[Commutator](Physics[SpaceTimeVector][m](X), P[n]) = I*`&hbar;`*Physics[g_][m, n]))

Matrix(%id = 18446744078575996430)

(2.13)

Finally, in a typical situation, these commutation rules are to be taken into account in further computations, and for that purpose they can be added to the setup via

"Setup(?)"

[algebrarules = {%Commutator(x, p__x) = I*`&hbar;`, %Commutator(x, p__y) = 0, %Commutator(x, p__z) = 0, %Commutator(x, y) = 0, %Commutator(x, z) = 0, %Commutator(y, p__x) = 0, %Commutator(y, p__y) = I*`&hbar;`, %Commutator(y, p__z) = 0, %Commutator(y, z) = 0, %Commutator(z, p__x) = 0, %Commutator(z, p__y) = 0, %Commutator(z, p__z) = I*`&hbar;`}]

(2.14)

For example, from herein computations are performed taking into account that

(%Commutator = Commutator)(x, p__x)

%Commutator(x, p__x) = I*`&hbar;`

(2.15)

NULL

NULL


 

Download DifferentialOperatorCommutatorRules.mw

 

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

I am pleased to announce that a new release of Maple T.A., our online testing and assessment system, is now available. Maple T.A. 2017 includes significant enhancements to learning management system integration, as well as security, performance, and other improvements. These same improvements are also available in a new version of the  Maple T.A. MAA Placement Test Suite.  For more information, see What’s New in Maple T.A. 

 

First 16 17 18 19 20 21 22 Last Page 18 of 55