
Physics




Maple provides a stateoftheart environment for algebraic computations in physics, with emphasis on ensuring the computational experience is as natural as possible. The theme of the Physics project for Maple 18 has been the consolidation and integration of the Physics package with the rest of the Maple library, making it even easier to combine standard Maple commands and techniques with Physicsspecific computations. With more than 500 enhancements throughout the entire package to increase robustness and versatility, an extension of its typesetting capabilities to support even more standard notation, as well 17 new Physics:Library commands to support further explorations and extensions, Maple 18 extends the range of physicsrelated algebraic formulations that can be done in a natural way inside Maple. The impact of these changes is across the board, from vector analysis to quantum mechanics, relativity and field theory.
As part of its commitment to providing the best possible environment for algebraic computations in physics, Maplesoft has launched a Maple Physics: Research and Development web site, where users can 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 18.

Simplify


Simplification is perhaps the most common operation performed in a computer algebra system. In Physics, this typically entails simplifying tensorial expressions, or expressions involving noncommutative operators that satisfy certain commutator/anticommutator rules, or sums and integrals involving quantum operators and Dirac delta functions in the summands and integrands. Relevant enhancements were introduced in Maple 18 for all these cases.

Examples


>


 (1) 
Simplification of sums when the summand is linear in KroneckerDeltas:
>


 (2) 
>


 (3) 
Simplification of tensorial expressions. To facilitate typing, set the spacetime indices to be lowercaselatin:
>


 (4) 
Define a tensor
>


 (5) 
The following tensorial expression,
>


 (6) 
has various terms with contracted indices. In each term, {a,b,c} are free indices:
>


 (7) 
Taking into account Einstein's sum rule for contracted (repeated) indices, the symmetry properties of and , this tensorial expression is equal to zero:
>


 (8) 
The simplification of integrals and sums involving quantum operators that satisfy algebra rules is now more powerful, both in the continuous and discrete case. Consider a field, , and its expansion in terms in a basis of functions, using operators, and , that satisfy:
>


 (9) 
The expansion of terms and is given by:
>


 (10) 
>


 (11) 
The commutator is equal to:
>


 (12) 
>


 (13) 
The products of integrals on the righthand side can both be combined into double integrals, then recombined into a single integral and simplified taking into account the algebra rule stated:
>


 (14) 
The step involving only the combination of the integrals can now also be performed separately:
>


 (15) 
The extended capabilities in Simplify regarding integration also work in the discrete case, over sums. Redo the algebra rule now considering the same relations but in the discrete case.
>


 (16) 
The following sum can now be simplified by combining the sums and taking into account the new (discrete) algebra rules, or just performing the combination step:
>


 (17) 
>


 (18) 
>


 (19) 
>


 (20) 
>


 (21) 
Improvements in the simplification of annihilation and the creation of fermionic operators, as well as the related occupation number operator:
>


 (22) 
>


 (23) 
>


 (24) 
The related occupation number operator:
>


 (25) 
Consider the application of these fermionic operators to a related state vector:
>


 (26) 
>


 (27) 
>


 (28) 
Increasing the occupation number,
>


 (29) 
>


 (30) 
In other words, powers of annihilation and creation fermionic operators are equal to zero:
>


 (31) 
>


 (32) 
>


 (33) 
The occupation number operator is also idempotent:
>


 (34) 
These expressions can now be simplified:
>


 (35) 
The simplification of vectorial expressions was also enhanced. For example:
>


>


 (36) 
>


 (37) 
>





4Vectors, Substituting Tensors


In Maple 17, it is possible to define a tensor with a tensorial equation, where the tensor being defined is on the lefthand side. Then, on the righthand side, you write either a tensorial expression with free and repeated indices, or a Matrix or Array with the components themselves. In Maple 18, you can also define a 4Vector with a tensorial equation, where you indicate the vector's components on the righthand side as a list.
One new Library routine specialized for tensor substitutions was added to the Maple library: SubstituteTensor, which substitutes the equation(s) Eqs into an expression, taking care of the free and repeated indices, such that: 1) equations in Eqs are interpreted as mappings having the free indices as parameters, and 2) repeated indices in Eqs do not clash with repeated indices in the expression. This new routine can also substitute algebraic subexpressions of type product or sum within the expression, generalizing and unifying the functionality of the subs and algsubs commands for algebraic tensor expressions.

Examples


>


 (38) 
Define a contravariant 4vector with components
>


 (39) 
You can retrieve the components in different ways:
>


 (40) 
>


 (41) 
Or, indexing p with a contravariant or covariant integer value of the index:
>


 (42) 
You can compute with algebraically; p[~mu] will return its components only when the index assumes integer values
>


 (43) 
>


 (44) 
>


 (45) 
>


 (46) 
Define some tensors for experimentation with the new Library:SubstituteTensor command:
>


 (47) 
A substitution equation:
>


 (48) 
Substitute into : the free indices of (48) are taken as parameters, repeated indices in the substitution equation do not repeat more than once in the result:
>


 (49) 
When the lefthand side of the substitution equation is a tensor function, the functionality is also taken as a parameter,
>


 (50) 
SubstituteTensor can also substitute subexpressions of type product or sum, similar to what algsubs does, so for example substitute:
>


 (51) 
into,
>


 (52) 
>


 (53) 
Check the free and repeated indices of this result and verify that the free indices of (52) are the same:
>


 (54) 
>


 (55) 



Functional Differentiation


The Physics:Fundiff command for functional differentiation has been extended to handle all the complex components (abs, argument, conjugate, Im, Re, signum) and vectorial differential operators in order to compute field equations using variational principles when the field function enters the Lagrangian together with its conjugate. For an example illustrating the use of the new capabilities in the context of a more general problem, see the MaplePrimes™ post Quantum Mechanics using Computer Algebra.

Examples


>


 (56) 
A function and its conjugate are considered independent from each other regarding functional differentiation:
>


 (57) 
Fundiff can now compute functional derivatives of expressions involving vectorial differential operators and the corresponding conjugate functions.
>


>


 (58) 
Set a system of coordinates for functional differentiation with many variables:
>


 (59) 
The Action for a system:
>


 (60) 
The equations of motion through functional differentiation:
>


 (61) 
The Action for a complex scalar field with a Lagrangian quadratic in the derivatives: note that abs now automatically maps into the Norm of the vector.
>


 (62) 
The corresponding field equation:
>


 (63) 



More Metrics in the Database of Solutions to Einstein's Equations


A database of solutions to Einstein's equations was added to the Maple library in Maple 15 with a selection of metrics from "Stephani, H.; Kramer, D.; MacCallum, M.; Hoenselaers, C.; and Herlt, E., Exact Solutions to Einstein's Field Equations" and "Hawking, Stephen; and Ellis, G. F. R., The Large Scale Structure of SpaceTime". More metrics from these two books were added for Maple 16 and Maple 17. These metrics can be searched using the command DifferentialGeometry:Library:MetricSearch, or directly using g_ (the Physics command representing the spacetime metric that also sets the metric to your choice).
•

For Maple 18, fifty more metrics were added to the database from Chapter 28 of the aformentioned book entitled "Exact Solutions to Einstein's Field Equations".

•

It is now possible to list all the metrics of a chapter by indexing the metric command with the chapter's number, for example, entering g_["28"].


Examples


>


 (64) 
By default, the metric is a Minkowski type:
>


 (65) 
You can query about metrics directly from the metric command g_
>


When you identified the metric, you can set it directly from g_ (alternatively, you can do that using Setup):
>


 (66) 
New in Maple 18, you can now also list all the metrics of a chapter. For example, for the metrics of Chapter 28,
>





Commutators, AntiCommutators


When computing with products of noncommutative operators, the results depend on the algebra of commutators and anticommutators that you previously set. Besides that, in Physics, various mathematical objects themselves satisfy specific commutation rules. You can query about these rules using the Library commands Commute and Anticommute. Previously existing functionality and enhancements in this area were refined and implemented in Maple 18. Among them:
•

Both Commutator and AntiCommutator now accept matrices as arguments.

•

The AntiCommutator of products of fermionic operators  for instance annihilation and creation operators  is now derived automatically from the intrinsic anticommutation rules they satisfy.

•

Commutators and Anticommutators of vectorial quantum operators , are now implemented and expressed using the dot (scalar) product, as in


Examples


>


 (67) 
Commutator and AntiCommutator now also operate on matrices:
>


 (68) 
>


 (69) 
>


 (70) 
Commutators of vectorial operators were implemented, expressed using the scalar (dot) product:
>


 (71) 
>


 (72) 
Define 4 pairs of annihilation/creation operators for fermionic particles:
>


 (73) 
>


 (74) 
For these operators, the system knows about the anticommutator rules satisfied between any two of them, the algebra is set on the fly when you define them.
>


 (75) 
Using that information, the system now also knows about the anticommutator of products of these fermionic operators. For example, on the lefthand side: inert, on the righthand side: computed.
>


 (76) 
This new functionality is automatically used when sorting products of noncommutative operators according to a specified ordering using the new Library:SortProducts routine; let P be a product:
>


 (77) 
Rewrite this product using the following ordering: with the creation operators to the left, using the anticommutator relations between them.
>


 (78) 
>


 (79) 
Changes in design:
•

is now considered noncommutative when any of the arguments is noncommutative, regardless of the character of F itself;

•

Unless indicated otherwise through commutation rules set using Setup, the commutation between quantum operators, Bras and Kets is now as follows:

a.

Quantum operators do not commute with Kets or Bras.

b.

Kets do not commute with Bras.

c.

Kets commute with Kets and Bras commute with Bras only when they are eigenvectors of operators that commute (i.e.: their labels commute).

Set some operators for experimentation, two of which commute:
>


 (80) 
>


 (81) 
>


 (82) 
>


 (83) 
>


 (84) 
>


 (85) 



Expand and Combine


In the context of Physics, the expansion and recombination of algebraic expressions requires additional care: products may involve noncommutative operators and then some of the standard expansion and combination rules do not apply, or apply differently. Similarly, the expansion of vectorial operators also follows special rules. In Maple 18, many of these algebraic operations were reviewed and related special formulas (such as Glauber's and Haussdorf's) were implemented.

Examples


>


 (86) 
Set three quantum operators to illustrate ideas:
>


 (87) 
•

The exponential of a sum of noncommutative operators and Glauber's formula:

>


 (88) 
This exponential cannot be expanded into a product of two exponentials because A and B do not commute with their commutator.
>


 (89) 
However, an expansion is possible when and commute with their commutator; this is Glauber's formula. For instance, set and to commute with , while represents their commutator:
>


 (90) 
Now,
>


 (91) 
•

The combination of a product of exponentials of noncommutative exponents using combine.

You can recombine back the righthand side using combine:
>


 (92) 
•

Expanding the logarithm of a product of exponentials of noncommutative operands.

An expansion is possible depending on the value of the commutator of the exponents, as in:
This is Haussdorf's formula. It is implemented now for the more frequent case where the commutator , such that is commutative and and are real, so that all but the first three terms on the righthand side remain. Clear C from the set of quantum operators:
>


 (93) 
>


 (94) 
So, for nonreal A and B, the expansion of this logarithm is not possible in closed form:
>


 (95) 
Assuming they are real:
>


  