Physics
Maple provides a state-of-the-art environment for algebraic computations in Physics, with emphasis on ensuring that the computational experience is as natural as possible. The theme of the Physics project for Maple 2019 has been the consolidation of the functionality introduced in previous releases, together with significant enhancements to further strengthen the functionality mainly in three areas:
Quantum Mechanics: coherent states, tensor products of states, taylor series of expressions involving anticommutative variables and functions, and several improvements in the normalization and simplification of Commutator and AntiCommutator algebra rules.
Tensor computations in general, making Maple 2019 unmatched in the field, covering classical and quantum mechanics, and special and general relativity, using natural tensor input notation and textbook-like display of results. The functionality for tensors is tightly integrated with the full Maple computation system and extensively documented in "A Complete Guide for performing tensor computations using Physics".
Documentation: besides the new guide for tensor computations, two other new pages, linked in all the help pages of Physics commands, are
Physics Updates organizes and presents in one place all formerly scattered links to updates and presentations with examples on the use of Physics.
Mini-Course: Computer Algebra for Physicists, is a course that can be used as a tutorial, with 10 sections to be covered in 5 hands-on guided experiences of 2 hours each. The first part, 5 sections, is about Maple 101, while the remaining 5 sections is all about using the Physics package.
Overall, the enhancements throughout the entire package increase robustness, versatility and functionality, extending furthermore the range of Physics-related algebraic computations that can be done naturally in a worksheet. The presentation below illustrates both the novelties and the kind of mathematical formulations that can now be performed.
As part of its commitment to providing the best possible environment for algebraic computations in Physics, Maplesoft launched a Maple Physics: Research and Development website with Maple 18, which enabled users to download research versions, ask questions, and provide feedback. The results from this accelerated exchange with people around the world have been incorporated into the Physics package in Maple 2019.
Tensor product of Quantum States using Dirac's Bra-Ket Notation
Coherent States in Quantum Mechanics
The Zassenhaus formula and the algebra of the Pauli matrices
Multivariable Taylor series of expressions involving anticommutative (Grassmannian) variables
New SortProducts command
Documentation: "Physics updates", "A complete guide for performing tensor computations" and the "Mini-Course: Computer Algebra for Physicists"
Simplification of tensors, Pauli and Dirac matrices and KroneckerDelta
See Also
The implementation of the Pauli matrices and their algebra were reviewed for Maple 2019, including the algebraic manipulation of nested commutators, resulting in faster computations using simpler and more flexible input. As it frequently happens, improvements of this type suddenly transform research problems presented in the literature as untractable in practice, into tractable.
As an illustration, we tackle below the derivation of the coefficients entering the Zassenhaus formula shown in section 4 of [1] for the Pauli matrices up to order 10 (results in the literature go up to order 5). The computation presented can be reused to compute these coefficients up to any desired higher-order (hardware limitations may apply). A number of examples which exploit this formula and its dual, the Baker-Campbell-Hausdorff formula, occur in connection with the Weyl prescription for converting a classical function to a quantum operator (see sec. 5 of [1]), as well as when solving the eigenvalue problem for classes of mathematical-physics partial differential equations [2].
References
[1] R.M. Wilcox. "Exponential Operators and Parameter Differentiation in Quantum Physics", Journal of Mathematical Physics, V.8, 4, (1967.
[2] S. Steinberg. "Applications of the lie algebraic formulas of Baker, Campbell, Hausdorff, and Zassenhaus to the calculation of explicit solutions of partial differential equations". Journal of Differential Equations, V.26, 3, 1977.
[3] K. Huang. "Statistical Mechanics". John Wiley & Sons, Inc. 1963, p217, Eq.(10.60).
Formulation of the problem
The Zassenhaus formula expresses ⅇλ⁢A+B as an infinite product of exponential operators involving nested commutators of increasing complexity
ⅇλ⁢A+B = ⅇλ⁢A⁢⋅ ⅇλ⁢B⁢⋅ ⅇλ2⁢C2⁢⋅ ⅇλ3⁢C3⁢⋅ ... = ⅇλ⁢A⁢⋅ ⅇλ⁢B⁢⋅ ⅇ−12⁢λ2⁢A,B−⁢⋅ ⅇ16⁢λ3⁢A,A,B−−+2⋅B,A,B−−⁢⋅ ...
Given A, B and their commutator E=A,B−, if A and B commute with E, Cn=0 for n≥3 and the Zassenhaus formula reduces to the product of the first three exponentials above. The interest here is in the general case, when A,E−≠0 and B,E−≠0, and the goal is to compute the Zassenhaus coefficients Cn in terms of A, B for arbitrary n. Following [1], in that general case, differentiating the Zassenhaus formula with respect to λ and multiplying from the right by ⅇ−λ A+B one obtains
A+B=A+ⅇλ⁢A⁢B⁢ⅇ−λ⁢A+ⅇλ⁢A+ⅇλ⁢B⁢2⁢λ⁢C2⁢ⅇ−λ⁢B⁢ⅇ−λ⁢A+ ...
This is an intricate formula, which however (see eq.(4.20) of [1]) can be represented in abstract form as
0=∑n=1∞⁡λnn!⁢An,B+2⁢λ⁢∑m=0∞⁡∑n=0∞⁡λn+mn!⁢m!⁢Am,Bn,C2+3⁢λ2⁢∑k=0∞⁡∑m=0∞⁡∑n=0∞⁡λn+m+kn!⁢m!⁢k!⁢Ak,Bm,C2n,C3+ ...
from where an equation to be solved for each Cn is obtained by equating to 0 the coefficient of λn−1. In this formula, the repeated commutator bracket is defined inductively in terms of the standard commutator A,B− by
A0,B=B, An+1,B=A,An,B−
A0,Bn,Cj=Bn,Cj, Am,Bn,Cj=A,Am−1,Bn,Cj−
and higher-order repeated-commutator brackets are similarly defined. For example, taking the coefficient of λ and λ2 and respectively solving each of them for C2 and C3 one obtains
C2=−12⁢A,B−
C3=16⁢A,A,B−−+13⁢B,A,B−−
This method is used in [3] to treat quantum deviations from the classical limit of the partition function for both a Bose-Einstein and Fermi-Dirac gas. The complexity of the computation of Cn grows rapidly and in the literature only the coefficients up to C5 have been published. Taking advantage of developments in the Physics package for Maple 2019, below we show the computation up to C10 and provide a compact approach to compute them up to arbitrary order.
Computing up to C10
Set the signature of spacetime such that its space part is equal to +++ and use lowercaselatin letters to represent space indices. Set also A, B and Cn to represent quantum operators
restart; withPhysics:
Setupop=A,B,C,signature = `+++-`,spaceindices=lowercaselatin
* Partial match of 'op' against keyword 'quantumoperators'
_______________________________________________________
quantumoperators=A,B,C,signature=+ + + -,spaceindices=lowercaselatin
To illustrate the computation up to C10, a convenient example, where the commutator algebra is closed, consists of taking A and B as Pauli Matrices which, multiplied by the imaginary unit, form a basis for the 𝔰𝔲2group, which in turn exponentiate to the relevant Special Unitary Group SU⁡2. The algebra for the Pauli matrices involves a commutator and an anticommutator
Library:-DefaultAlgebraRulesPsigma
σi,σj−=2⁢I⁢εi,j,k⁢σk,σi,σj+=2⁢gi,j
Assign now A and B to two Pauli matrices, for instance
A≔Psigma1
A≔σ1
B≔Psigma3
B≔σ3
Next, to extract the coefficient of λn from
0=∑n=1∞⁡λnn!⁢An,B+2⁢λ⁢∑m=0∞⁡∑n=0∞⁡λn+mn!⁢m!⁢Am,Bn,C2+3⁢λ2⁢∑k=0∞⁡∑m=0∞⁡∑n=0∞⁡λn+m+kn!⁢m!⁢k!⁢Ak,Bm,C2n,C3+...
to solve it for Cn+1 we note that each term has a factor λm multiplying a sum, so we only need to take into account the first n+1 terms (sums) and in each sum replace ∞ by the corresponding n−m. For example, given C2=−12⁢A,B−, to compute C3 we only need to compute these first three terms:
0=∑n=12⁡λnn!⁢An,B+2⁢λ⁢∑m=01⁡∑n=01⁡λn+mn!⁢m!⁢Am,Bn,C2+3⁢λ2⁢∑k=00⁡∑m=00⁡∑n=00⁡λn+m+kn!⁢m!⁢k!⁢Ak,Bm,C2n,C3
then solving for C3 one gets C3=13⁢B,A,B−−+16⁢A,A,B−−.
Also, since to compute Cn we only need the coefficient of λn−1, it is not necessary to compute all the terms of each multiple-sum. One way of restricting the multiple-sums to only one power of λ consists of using multi-index summation, available in the Physics package (see Physics:-Library:-Add). For that purpose, redefine sum to extend its functionality with multi-index summation
Setupredefinesum = true
redefinesum=true
Now we can represent the same computation of C3 without multiple sums and without computing unnecessary terms as
0=∑n=1⁡λnn!⁢An,B+2⁢λ⁢⁡∑n+m=1⁡λn+mn!⁢m!⁢Am,Bn,C2+3⁢λ2⁢⁡∑n+m+k=0⁡λn+m+kn!⁢m!⁢k!⁢Ak,Bm,C2n,C3
Finally, we need a computational representation for the repeated commutator bracket
One way of representing this commutator bracket operation is defining a procedure, say F, with a cache to avoid recomputing lower order nested commutators, as follows
F≔ procA,B,n option cache; if n∷negint then 0 elif n =0 then B elif n∷posint then %CommutatorA, FA,B,n−1 else 'FA,B,n' fi; end;
F≔procA,B,noptioncache;ifn::negintthen0elifn=0thenBelifn::posintthen%Commutator⁡A,F⁡A,B,n − 1else'F⁡A,B,n'fiend
For example,
FA,B,1
σ1,σ3−
FA,B,2
σ1,σ1,σ3−−
FA,B,3
σ1,σ1,σ1,σ3−−−
We can set now the value of C2
C2≔−12⁢CommutatorA,B
C2≔I⁢σ2
and enter the formula that involves only multi-index summation
H≔∑n=2⁡λnn!⁢F⁡A,B,n+2⁢λ⁢∑n+m=1⁡λn+mn!⁢m!⁢F⁡A,F⁡B,C2,n,m+3⁢λ2⁢∑n+m+k=0⁡λn+m+kn!⁢m!⁢k!⁢F⁡A,F⁡B,F⁡C2,C3,n,m,k
H≔λ2⁢σ1,σ1,σ3−−2+2⁢λ⁢λ⁢σ1,I⁢σ2−+λ⁢σ3,I⁢σ2−+3⁢λ2⁢C3
from where we compute C3 by solving for it the coefficient of λ2, and since due to the multi-index summation this expression already contains λ2 as a factor,
C3= solvevalueH,C3
C3=−4⁢σ13+2⁢σ33
In order to generalize the formula for H for higher powers of λ, the right-hand side of the multi-index summation limit can be expressed in terms of an abstract N, and H transformed into a mapping:
H≔unapply∑n=N⁡λnn!⁢F⁡A,B,n+2⁢λ⁢∑n+m=N−1⁡λn+mn!⁢m!⁢F⁡A,F⁡B,C2,n,m+3⁢λ2⁢∑n+m+k=N−2⁡λn+m+kn!⁢m!⁢k!⁢F⁡A,F⁡B,F⁡C2,C3,n,m,k,N
H≔N↦λN⁢F⁡σ1,σ3,NN!+2⁢λ⁢∑n+m=N−1⁡λn+m⁢1n!⁢m!⁢F⁡σ1,F⁡σ3,I⁢σ2,n,m+3⁢λ2⁢∑n+m+k=N−2⁡λn+m+k⁢1n!⁢m!⁢k!⁢F⁡σ1,F⁡σ3,F⁡I⁢σ2,C3,n,m,k
Now we have
H0
σ3
H1
λ⁢σ1,σ3−+2⁢I⁢λ⁢σ2
The following is already equal to (11)
H2
λ2⁢σ1,σ1,σ3−−2+2⁢λ⁢λ⁢σ1,I⁢σ2−+λ⁢σ3,I⁢σ2−+3⁢λ2⁢C3
In this way, we can reproduce the results published in the literature for the coefficients of Zassenhaus formula up to C5 by adding two more multi-index sums to (13). Unassign C first
unassignC
H≔unapply∑n=N⁡λnn!⁢F⁡A,B,n+2⁢λ⁢∑n+m=N−1⁡λn+mn!⁢m!⁢F⁡A,F⁡B,C2,n,m+3⁢λ2⁢∑n+m+k=N−2⁡λn+m+kn!⁢m!⁢k!⁢F⁡A,F⁡B,F⁡C2,C3,n,m,k+4⁢λ3⁢∑n+m+k+l=N−3⁡λn+m+k+ln!⁢m!⁢k!⁢l!⁢F⁡A,F⁡B,F⁡C2,F⁡C3,C4,n,m,k,l+5⁢λ4⁢∑n+m+k+l+p=N−4⁡λn+m+k+l+pn!⁢m!⁢k!⁢l!⁢p!⁢F⁡A,F⁡B,F⁡C2,F⁡C3,F⁡C4,C5,n,m,k,l,p,N:
We compute now up to C5 in one go
for j to 4 do Cj+1 ≔ solvevalueHj,Cj+1 od;
C3≔−4⁢σ13+2⁢σ33
C4≔4⁢I⁢σ23+σ1+2⁢σ3
C5≔−16⁢I⁢σ23−8⁢σ19−158⁢σ345
The nested-commutator expression solved in the last step for C5 is
H4
λ4⁢σ1,σ1,σ1,σ1,σ3−−−−24+2⁢λ⁢λ3⁢σ1,σ1,σ1,I⁢σ2−−−6+λ3⁢σ1,σ1,σ3,I⁢σ2−−−2+λ3⁢σ1,σ3,σ3,I⁢σ2−−−2+λ3⁢σ3,σ3,σ3,I⁢σ2−−−6+3⁢λ2⁢λ2⁢σ1,σ1,−4⁢σ13+2⁢σ33−−2+λ2⁢σ1,σ3,−4⁢σ13+2⁢σ33−−+λ2⁢σ3,σ3,−4⁢σ13+2⁢σ33−−2+λ2⁢σ1,I⁢σ2,−4⁢σ13+2⁢σ33−−+λ2⁢σ3,I⁢σ2,−4⁢σ13+2⁢σ33−−+λ2⁢I⁢σ2,I⁢σ2,−4⁢σ13+2⁢σ33−−2+4⁢λ3⁢λ⁢σ1,4⁢I⁢σ23+σ1+2⁢σ3−+λ⁢σ3,4⁢I⁢σ23+σ1+2⁢σ3−+λ⁢I⁢σ2,4⁢I⁢σ23+σ1+2⁢σ3−+λ⁢−4⁢σ13+2⁢σ33,4⁢I⁢σ23+σ1+2⁢σ3−+5⁢λ4⁢−16⁢I⁢σ23−8⁢σ19−158⁢σ345
With everything understood, we want now to extend these results generalizing them into an approach to compute an arbitrarily large coefficient Cn, then use that generalization to compute all the Zassenhaus coefficients up to C10. To type the formula for H for higher powers of λ is however prone to typographical mistakes. The following is a program, using the Maple programming language, that produces these formulas for an arbitrary integer power of λ:
This Formula program uses a sequence of summation indices with as much indices as the order of the coefficient Cn we want to compute, in this case we need 10 of them
summation_indices ≔ n, m, k, l, p, q, r, s, t, u
summation_indices≔n,m,k,l,p,q,r,s,t,u
To avoid interference of the results computed in the loop (17), unassign C again
Now the formulas typed by hand, used lines above to compute each of C2, C3 and C5, are respectively constructed by the computer
FormulaA,B,C,2
∑n=N⁡λn⁢F⁡σ1,σ3,nn!+2⁢λ⁢∑n+m=N−1⁡λn+m⁢F⁡σ1,F⁡σ3,C2,n,mn!⁢m!
FormulaA,B,C,3
∑n=N⁡λn⁢F⁡σ1,σ3,nn!+2⁢λ⁢∑n+m=N−1⁡λn+m⁢F⁡σ1,F⁡σ3,C2,n,mn!⁢m!+3⁢λ2⁢∑n+m+k=N−2⁡λn+m+k⁢F⁡σ1,F⁡σ3,F⁡C2,C3,n,m,kn!⁢m!⁢k!
FormulaA,B,C,5
∑n=N⁡λn⁢F⁡σ1,σ3,nn!+2⁢λ⁢∑n+m=N−1⁡λn+m⁢F⁡σ1,F⁡σ3,C2,n,mn!⁢m!+3⁢λ2⁢∑n+m+k=N−2⁡λn+m+k⁢F⁡σ1,F⁡σ3,F⁡C2,C3,n,m,kn!⁢m!⁢k!+4⁢λ3⁢∑n+m+k+l=N−3⁡λn+m+k+l⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,C4,n,m,k,ln!⁢m!⁢k!⁢l!+5⁢λ4⁢∑n+m+k+l+p=N−4⁡λn+m+k+l+p⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,F⁡C4,C5,n,m,k,l,pn!⁢m!⁢k!⁢l!⁢p!
Construct then the formula for C10 and make it be a mapping with respect to N, as done for C5 after (16)
H ≔ unapplyFormulaA,B,C,10,N
H≔N↦∑n=N⁡λn⁢F⁡σ1,σ3,nn!+2⁢λ⁢∑n+m=N−1⁡λn+m⁢F⁡σ1,F⁡σ3,C2,n,mn!⁢m!+3⁢λ2⁢∑n+m+k=N−2⁡λn+m+k⁢F⁡σ1,F⁡σ3,F⁡C2,C3,n,m,kn!⁢m!⁢k!+4⁢λ3⁢∑n+m+k+l=N−3⁡λn+m+k+l⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,C4,n,m,k,ln!⁢m!⁢k!⁢l!+5⁢λ4⁢∑n+m+k+l+p=N−4⁡λn+m+k+l+p⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,F⁡C4,C5,n,m,k,l,pn!⁢m!⁢k!⁢l!⁢p!+6⁢λ5⁢∑n+m+k+l+p+q=N−5⁡λn+m+k+l+p+q⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,F⁡C4,F⁡C5,C6,n,m,k,l,p,qn!⁢m!⁢k!⁢l!⁢p!⁢q!+7⁢λ6⁢∑n+m+k+l+p+q+r=N−6⁡λn+m+k+l+p+q+r⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,F⁡C4,F⁡C5,F⁡C6,C7,n,m,k,l,p,q,rn!⁢m!⁢p!⁢k!⁢q!⁢l!⁢r!+8⁢λ7⁢∑n+m+k+l+p+q+r+s=N−7⁡λn+m+k+l+p+q+r+s⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,F⁡C4,F⁡C5,F⁡C6,F⁡C7,C8,n,m,k,l,p,q,r,sn!⁢m!⁢p!⁢k!⁢q!⁢r!⁢l!⁢s!+9⁢λ8⁢∑n+m+k+l+p+q+r+s+t=N−8⁡λn+m+k+l+p+q+r+s+t⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,F⁡C4,F⁡C5,F⁡C6,F⁡C7,F⁡C8,C9,n,m,k,l,p,q,r,s,tn!⁢m!⁢p!⁢k!⁢q!⁢s!⁢r!⁢l!⁢t!+10⁢λ9⁢∑n+m+k+l+p+q+r+s+t+u=N−9⁡λn+m+k+l+p+q+r+s+t+u⁢F⁡σ1,F⁡σ3,F⁡C2,F⁡C3,F⁡C4,F⁡C5,F⁡C6,F⁡C7,F⁡C8,F⁡C9,C10,n,m,k,l,p,q,r,s,t,un!⁢m!⁢t!⁢p!⁢k!⁢q!⁢s!⁢r!⁢l!⁢u!
Compute now the coefficients of the Zassenhaus formula up to C10 all in one go
for j to 9 do Cj+1 ≔ solvevalueHj, Cj+1 od;
C6≔1078⁢I⁢σ2405+1030⁢σ181−8⁢σ381
C7≔11792⁢I⁢σ2243+358576⁢σ142525+12952⁢σ3135
C8≔35837299048⁢I⁢σ217222625+87277417⁢σ1492075+833718196⁢σ3820125
C9≔−449018539801088⁢I⁢σ2104627446875−263697596812424⁢σ1996451875+84178036928794306⁢σ32197176384375
C10≔2185211616689851230363020476⁢I⁢σ24204571658549609375+3226624781090887605597040906⁢σ121022858292748046875+200495118165066770268119656⁢σ3200217698026171875
Notes: with the material above you can compute higher order values of Cn. For that you need:
Unassign C, as done above in two cases, to avoid interference of the results just computed.
Indicate more summation indices in the sequence summation_indices in (19), as many as the maximum value of n in Cn.
Have in mind that the growth in size and complexity is significant, with each Cn taking significantly more time than the computation of all the previous ones.
Re-execute the input line (23) and the loop (24).
The Physics:-Gtaylor command, for computing Taylor series of expressions involving anticommutative variables, got rewritten, now as a multivariable Taylor series command (same difference as in between the taylor and mtaylor commands) and combining two different approaches to handle, when possible, the presence of noncommutative and anticommutative variables. One is the standard approach for multi-variable expansions, it requires that the derivative of each function entering the expression being expanded commutes with the function itself. The second approach, for expansions with respect to anticommutative variables, separates the function into a "Body" and a "Soul", as is standard in supermathematics.
Consider a set of anticommutative Grassmann variables θ__i with i=1.. n, forming a basis enlarged by their products, that satisfies θ__i⋅θ__j = −θ__j⋅θ__i, so that θ__i2=0. The elements of the algebra involving these variables are linear combinations of the form
a=a0+∑ia__i1⁢θ__i+∑i<ja__ij2⁢θ__i⁢θ__j+ ...
where the coefficients a__ij ...m are complex numbers, a0 is called the body and everything else, a−a0=nila, is called the soul (nilpotent part).
Consider now a mapping (function) fa which is assumed to be differentiable. Then fa can be defined by its Taylor expansion,
fa=fa0+f⁡ 'a0⁢nil⁡a+12⁢f⁡ ' 'a0⁢nil⁡a2+ ...
That is the expansion computed by Gtaylor in Maple 2019.
Examples
restart;withPhysics:Setupanticommutativeprefix=Θ,θ,quantumoperators=Θ,a
anticommutativeprefix=Θ,θ,quantumoperators=Θ,a
Consider
11+θ__1θ__2+θ__1
11+θ__1⁢θ__2+θ__1
Step by step, (26) is the application of the mapping
f ≔ u → 1u
f≔u↦1u
to the element of the algebra
a ≔ 1+θ__1θ__2+θ__1
a≔1+θ__1⁢θ__2+θ__1
The body of a is
body ≔ evala,θ__1=0,θ__2=0
body≔1
The soul of a is
soul ≔ a − body
soul≔θ__1⁢θ__2+θ__1
and in view of
soul2: % = Expand%
θ__1⁢θ__2+θ__12=0
for the expression (26), the Taylor expansion, mentioned in the introductory paragraph is
fbody + Dfbody ⋅ soul
1−θ__1⁢θ__2−θ__1
The same computation, all in one go:
Gtaylor
Gauss integrals in this domain, that is, integrals over the exponential of a quadratic form of Grassmann variables, yield the determinant of the coefficient matrix of the quadratic form. These integrals play an important role in applications of anticommutative variables.
Problem. Taking into account that, with regards to Grassmann variables, differentiation and integration are the same operation, recover the determinant of the coefficient matrix with dimension N=3
Define the coefficient matrix and construct the exponential
N ≔ 3:
M≔MatrixN,symbol=m
M≔m1,1m1,2m1,3m2,1m2,2m2,3m3,1m3,2m3,3
Θ__1≔Vectorrow N,n→θn+3
Θ__1≔θ4θ5θ6
Θ__2≔Vectorcolumn N,n→θn
Θ__2≔θ1θ2θ3
expΘ__1·M · Θ__2
ⅇ−θ1⁢m1,1⁢θ4+m2,1⁢θ5+m3,1⁢θ6−θ2⁢m1,2⁢θ4+m2,2⁢θ5+m3,2⁢θ6−θ3⁢m1,3⁢θ4+m2,3⁢θ5+m3,3⁢θ6
The integral of this exponential can thus be obtained performing a multivariable Taylor series expansion, then differentiating (equivalent to integrating) with respect to the six θi variables.
Θ≔θ1,θ2,θ3,θ4,θ5,θ6:
To avoid the default behavior of discarding terms of order 6 or higher in Θ, as in the other series commands of the Maple system, indicate the order term to be O⁡θi7.
Gtaylor,Θ,order=7
1−m2,2⁢θ2⁢θ5−m1,2⁢θ2⁢θ4−m3,1⁢θ1⁢θ6−m2,1⁢θ1⁢θ5−m1,1⁢θ1⁢θ4−m3,3⁢θ3⁢θ6−m2,3⁢θ3⁢θ5−m1,3⁢θ3⁢θ4−m3,2⁢θ2⁢θ6+m1,1⁢m2,2−m2,1⁢m1,2⁢m3,3+m3,1⁢m1,2⁢m2,3+m1,3⁢m2,1⁢m3,2−m3,1⁢m2,2−m1,1⁢m3,2⁢m2,3⁢θ1⁢θ2⁢θ3⁢θ4⁢θ5⁢θ6+−m2,2⁢m3,3+m3,2⁢m2,3⁢θ2⁢θ3⁢θ5⁢θ6+−m1,2⁢m3,3+m3,2⁢m1,3⁢θ2⁢θ3⁢θ4⁢θ6+−m1,2⁢m2,3+m2,2⁢m1,3⁢θ2⁢θ3⁢θ4⁢θ5+−m2,1⁢m3,3+m3,1⁢m2,3⁢θ1⁢θ3⁢θ5⁢θ6+−m1,1⁢m3,3+m3,1⁢m1,3⁢θ1⁢θ3⁢θ4⁢θ6+−m1,1⁢m2,3+m2,1⁢m1,3⁢θ1⁢θ3⁢θ4⁢θ5+−m2,1⁢m3,2+m3,1⁢m2,2⁢θ1⁢θ2⁢θ5⁢θ6+−m1,1⁢m3,2+m3,1⁢m1,2⁢θ1⁢θ2⁢θ4⁢θ6+−m1,1⁢m2,2+m2,1⁢m1,2⁢θ1⁢θ2⁢θ4⁢θ5
Perform now the integration of the expanded exponential
diff, Θ
m1,1⁢m2,2−m2,1⁢m1,2⁢m3,3+m3,1⁢m1,2⁢m2,3+m1,3⁢m2,1⁢m3,2−m3,1⁢m2,2−m1,1⁢m3,2⁢m2,3
Compare with the determinant of the coefficient matrix M
Δ≔LinearAlgebra:-DeterminantM
Δ≔m1,1⁢m2,2⁢m3,3−m1,1⁢m3,2⁢m2,3−m2,1⁢m1,2⁢m3,3+m3,1⁢m1,2⁢m2,3+m2,1⁢m3,2⁢m1,3−m3,1⁢m2,2⁢m1,3
normalDelta−
0
An example with fermionic annihilation and creation operators, typical from quantum field theory.
Setupadditionally, anticommutativeprefix = lambda, Lambda, op = Lambda
anticommutativeprefix=Λ,Θ,λ,θ,quantumoperators=Λ,Θ,a
Define corresponding annihilation and creation operators
am ≔ AnnihilationΛ
am≔a−
ap ≔ CreationΛ
ap≔a+
Note that the anticommutator of these two operators is equal to 1 (so they don't anticommute)
%AntiCommutator = AntiCommutatoram, ap
a−,a++=1
while they do anticommute with all Grassmann variables
%AntiCommutator = AntiCommutatoram, theta
a−,θ+=0
%AntiCommutator = AntiCommutatorap, lambda
a+,λ+=0
and, because of Pauli's exclusion principle for fermions, the square of a+ and a−are equal to 0.
Consider now the product of exponentials
exptheta am exp−lambda ap
ⅇθ⁢a−⁢ⅇ−λ⁢a+
Because the corresponding exponents θ⁢a− and −λ⁢a+ commute with their commutator, this product of exponentials can be combined using Hausdorff's formula
= combine
ⅇθ⁢a−⁢ⅇ−λ⁢a+=ⅇθ⁢a−−λ⁢a+−λ⁢θ2
Both sides can be expanded in multivariable Taylor series, this time including the annihilation and creation operators as series variables since their commutation rules are all known ((45), (46), (47)) and their square is equal to 0:
1−λ⁢a++θ⁢a−−λ⁢θ+λ⁢θ⁢a+⁢a−=1−λ⁢a++θ⁢a−−λ⁢θ+λ⁢θ⁢a+⁢a−
On the left-hand side is the product of the expansion of each exponential while on the right-hand side it is the expansion of the single exponential (no-trivially) combined taking into account the commutator of the exponents on the left-hand side. Verify that both expansions are one and the same:
evalb
true
Both Gtaylor and diff now handle θ† as a differentiation or series variable in equal footing as θ itself
expθ†⁢a−−θ⁢a+
ⅇθ†⁢a−−θ⁢a+
=Gtaylor
ⅇθ†⁢a−−θ⁢a+=1+θ†⁢a−−θ⁢a++θ†⁢θ2−θ†⁢θ⁢a+⁢a−
diff,θ,θ†
−12+a+⁢a−=−12+a+⁢a−
Depending on the case, multivariable Taylor expansions in the presence of not commutative variables can also be computed for functions of more than one variable and for unknown functions
GtaylorFx,θ,λ,order = 3
F⁡0,0,0+x⁢D1⁡F⁡0,0,0+x2⁢D1,1⁡F⁡0,0,02+x⁢D1,3⁡F⁡0,0,0+D3⁡F⁡0,0,0⁢λ+x⁢D1,2⁡F⁡0,0,0+D2⁡F⁡0,0,0⁢θ+D2,3⁡F⁡0,0,0⁢λ⁢θ
Setupnoncommutativeprefix = A, B
noncommutativeprefix=A,B
GtaylorⅇA+B⁢δ,δ=0,order=3
1+δ⁢A+B+δ2⁢A+B22
A new command, SortProducts, receives an expression involving products and sorts the operands of these products according to the ordering indicated as the second argument, a list containing some or all of the operands of the product(s) found in the expression. The sorting of operands performed automatically takes into account any algebra rules set using Setup.
restart;
with⁡Physics:
Consider the product of the commutative a,b,c,d
P≔a⁢b⁢c⁢d
Reorder the operands c and b "in place".
SortProducts⁡P,c,b
a⁢c⁢b⁢d
Sort the operands b and c and put them to the left, then to the right
SortProducts⁡P,c,b,totheleft
c⁢b⁢a⁢d
SortProducts⁡P,c,b,totheright
a⁢d⁢c⁢b
Set a prefix identifying noncommutative variables and related algebra rules for some of them, such that Z1,Z2,Z3 and Z4 commute between themselves, but none of them commute with Z5.
Setup⁡noncommutativeprefix=Z,%Commutator⁡Z1,Z2=0,%Commutator⁡Z1,Z3=0,%Commutator⁡Z2,Z3=0,%Commutator⁡Z3,Z4=0,%Commutator⁡Z2,Z4=0,%Commutator⁡Z1,Z4=0
algebrarules=Z1,Z2−=0,Z1,Z3−=0,Z1,Z4−=0,Z2,Z3−=0,Z2,Z4−=0,Z3,Z4−=0,noncommutativeprefix=Z
P≔Z1⁢Z2⁢Z3⁢Z4
Sort Z2 and Z3 "in place".
SortProducts⁡P,Z3,Z2
Z1⁢Z3⁢Z2⁢Z4
SortProducts⁡P,Z3,Z2,totheright
Z1⁢Z4⁢Z3⁢Z2
The value of the commutator between Z1 and Z5 is not known to the system, so by default they are not sorted:
SortProducts⁡Z1⁢Z5,Z5,Z1
Z1⁢Z5
Force their sorting using their commutator or anticommutator
SortProducts⁡Z1⁢Z5,Z5,Z1,usecommutator
Z5⁢Z1+Z1,Z5−
expand⁡
SortProducts⁡Z1⁢Z5,Z5,Z1,useanticommutator
−Z5⁢Z1+Z1,Z5+
Enter the product of P with Z5 at the end (so, to the right of P) and sort it with Z5 to the left. This is a case where Z5 does not commute with any of the other operands. Compare the results with and without the option usecommutator,
P≔P⁢Z5
P≔Z1⁢Z2⁢Z3⁢Z4⁢Z5
SortProducts⁡P,Z5,Z1
Z1⁢Z2⁢Z3⁢Z4⁢Z5
SortProducts⁡P,Z5,Z1,usecommutator
Z5⁢Z1⁢Z2⁢Z3⁢Z4−Z5,Z1⁢Z2⁢Z3⁢Z4−
SortProducts⁡P,Z5,Z3,usecommutator
Z1⁢Z2⁢Z5⁢Z3⁢Z4−Z5,Z3⁢Z4−