I thought it would be interesting to review what happened with Physics in Maple during 2013. The proposed theme for the Physics project was the consolidation and integration of the package with the rest of the Maple library. There were more than 500 changes, enhancements in most of the Physics commands, plus 17 new Physics:-Library commands. The impact of these changes is across the board, from Vector Analysis to Quantum Mechanics, Relativity and Field Theory.

Consolidation of the Physics package is about making it robust and versatile in real case scenarios. With the launch of the Physics: Research and Development updates webpage, Maplesoft has pioneered feedback, adjustments in the package and new developments provided around the clock for all of its users. The result of this accelerated exchange with people around the world is what you find in Maple's updated Physics today.

In addition to changes improving the functionality in mathematical-physics, changes were introduced towards making the computational experience as natural as possible, now including textbook-like typesetting of inert forms for the whole mathematical language and vectorial differential operators.

Physics doubled in size in Maple 16, almost doubled again in Maple 17, and during 2013 Physics received the largest number of changes ever in the package in one year. We are aiming for real to provide a state-of-the-art environment for algebraic computations in Physics. The links at the end show the same but with the Examples sections expanded.

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 for all these cases.

Examples

   

4-Vectors, Substituting Tensors

 

In Maple 17, it is possible to define a tensor with a tensorial equation, where the tensor being defined is on the left-hand side. Then, on the right-hand side, you write either a tensorial expression with free and repeated indices, or a Matrix or Array with the components themselves. With the updated Physics, you can also define a 4-Vector with a tensorial equation, where you indicate the vector's components on the right-hand 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 sub-expressions of type product or sum within the expression, generalizing and unifying the functionality of the subs and algsubs  commands for algebraic tensor expressions.

Examples

   

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

   

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 Space-Time". 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).

• 

With the updated Physics, fifty more metrics are available in 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

   

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 during 2013. 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 `#mover(mi("A",mathcolor = "olive"),mo("→"))`, `#mover(mi("B",mathcolor = "olive"),mo("→"))`, are now implemented and expressed using the dot (scalar) product, as in Physics:-Commutator(`#mover(mi("A",mathcolor = "olive"),mo("→"))`, `#mover(mi("B",mathcolor = "olive"),mo("→"))`) = `#mover(mi("A",mathcolor = "olive"),mo("→"))`.`#mover(mi("B",mathcolor = "olive"),mo("→"))`-`#mover(mi("B",mathcolor = "olive"),mo("→"))`.`#mover(mi("A",mathcolor = "olive"),mo("→"))`

• 

If two noncommutative operators a and S  satisfy "[a^(†),S][-]=0" , then the commutator  "[a,S^(†)][-]" is automatically taken equal to 0; if in addition S is Hermitian, then  "[a,S][-]"is also automatically taken equal to zero.

Examples

   

Expand and Combine

 

In the context of Physics, the expansion and recombination of algebraic expressions requires additional care: products may involve non-commutative 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. During 2013, many of these algebraic operations were reviewed and related special formulas (such as Glauber's and Haussdorf's) were implemented.

Examples

   

New Enhanced Modes in Physics Setup

 

Four enhanced modes were added to the Physics setup. With these modes, you can:

1. 

Indicate the real objects of a computation.

2. 

Automatically combine powers of the same base.

3. 

Set Maple to take z and its conjugate, "z," as independent variables and in equal footing; this is Wirtinger calculus.

4. 

Redefine the sum command in order to perform multi-index summation.

These options combined provide flexibility, subsequently making the Physics environment more expressive.

Real Objects

   

Combining Powers of the Same Base

   

Complex variables: z and conjugate(z) in equal footing

   

Redefine Sum for Multi-Index Summation

   

Dagger

 

Physics:-Dagger now has the same shortcut notation of Hermitian transpose , which acts on Vectors, vector products, equations, and automatically maps over the arguments of derivatives when the differentiation variables are real.

Examples

   

Vectors Package

 

A number of changes were performed in the Vectors subpackage to make the computations more natural and versatile:

• 

You can now use geometrical coordinates indexed, as in r[j], to represent mathematical objects unrelated to the coordinates themselves (in this case the spherical coordinate r).  This is a more appropriate mimicry of the way we compute with paper and pencil.

• 

Integrate the Vectors package commands with assuming and accept a tensor with 1 index (of type Library:-PhysicsType:-Tensor, defined using Define) as a possible abstract representation of the kth component of a vector.

• 

When V is a vector of the Physics:-Vectors package, make its absolute value abs(V), compute automatically using Physics:-Vectors:-Norm

• 

For an arbitrary vector  `#mover(mi("A"),mo("→"))`, make its Norm LinearAlgebra[Norm](`#mover(mi("A"),mo("→"))`) = "A*(A)," and introduce a new option conjugate to Norm, to specify whether to use `#mover(mi("A"),mo("→"))`.conjugate(`#mover(mi("A"),mo("→"))`) or `#mover(mi("A"),mo("→"))`.`#mover(mi("A"),mo("→"))` when computing LinearAlgebra[Norm](`#mover(mi("A"),mo("→"))`).

• 

When `#mover(mi("A",mathcolor = "olive"),mo("→"))` is a quantum operator, Norm returns using Dagger instead of conjugate.

• 

Commutators and Anticommutators of vectorial quantum operators `#mover(mi("A",mathcolor = "olive"),mo("→"))`, `#mover(mi("B",mathcolor = "olive"),mo("→"))`, are now implemented and expressed using the dot (scalar) product, as in "[A,B][-]=A*B-B*A . "

• 

New PhysicsVectors type in the Library of types Library:-PhysicsTypes, in order to programmatically identify vectors of the Physics:-Vectors package.

 

Two examples illustrating the use of the new capabilities in the context of a more general problem are found in the MaplePrimes posts Quantum Mechanics using Computer Algebra and Quantum Mechanics (II).

Examples

   

Library

 

Seventeen new commands, useful for programming and interactive computation, were added to the Physics:-Library package. These are:

• 

Add unifies the standard add and sum commands using a more modern handling of arguments, free of premature evaluation problems, and brings new multi-index functionality.

• 

ApplyCommandUsingImplicitAssumptions applies any command to expressions containing sums, integrals or products such that the command is applied to the summand (integrand or 1st argument of the product) taking into account the assumptions implicit in the summation (integration or product) range.

• 

CombinePowersOfSameBase combines powers of the same base in products correctly handling the case of noncommutative products and powers, using Glauber's formula.

• 

FromTensorFunctionalForm is a generalization of the former FromGeneralRelativityTensorFunctionalForm command, that also handles user defined tensor functions.

• 

GetFAndDifferentiationVariables receives a derivative and returns a sequence with derivand and all the differentiation variables.

• 

GetReplacementIndices receives a list of indices of different kinds (spacetime, space, spinor, etc) and any other arguments and returns a list with new indices of the same kinds - useful for replacements - not present in the rest of the arguments.

• 

GetSymbolsWithSameType receives an expression x, of type commutative, anticommutative or noncommutative, and any other arguments, and returns symbols of the same type as x, and not present in the rest of arguments.

• 

GetTensorDependency gets the dependency of a given tensor; this dependency typically depends of the spacetime metric or on the way you defined the tensor using Define.

• 

GetTensorFunctionalForm is a generalization of the former GetGeneralRelativityTensorFunctionalForm command, that also handles user defined tensor functions.

• 

IsLiteralSubscript returns true or false according to whether a symbol s is of the form x__y, that is, it has the substring __ after the first or next characters and before the last one.

• 

IsRealObject returns true or false according to whether a mathematical expression, function or variable passed is known to be real, either because it was assumed to be real, or because it was set to be real using Setup and its realobjects keyword.

• 

RealObjects sets and unsets mathematical variables and functions as real, and answers queries about them.

• 

SortProducts sorts the operands of noncommutative products into any particular desired ordering while taking into account commutator and anticommutator algebra rules, such that the returned product is mathematically equivalent to the one received.

• 

SubstituteTensor substitutes equations into an expression, taking care of the free and repeated indices such that: 1) the substitution equations are interpreted as mappings having the free indices as parameters, and 2) repeated indices in the substitution equations do not clash with existing repeated indices in the target expression.

• 

ToContravariant and ToCovariant rewrite a given expression multiplying by the spacetime metric so that all of its free indices become respectively contravariant or covariant.

• 

ToTensorFunctionalForm reverses the operation performed by the new FromTensorFunctionalForm described above.

Examples

   

Miscellaneous

 
• 

Implement formulas for abstract k, n both nonnegint entering "`a+`^k*| A[n] >" and "a(-)^k*| A[n] >", where `a+` and "a-" are Creation and Annihilation operators, respectively, acting on the 1st quantum number of the space of quantum states labeled A.

• 

Implement new PDEtools:-dchange rules for changing variables in Bras Kets and Brackets of the Physics package

• 

Library:-Degree can now compute the degree for noncommutative products Enhance PDEtools:-Library:-Degree and PDEtools:-Coefficients, to work with Physics:-`.` the same way it does with Physics:-`*`

• 

Changes in design:

a. 

When the spacetime is Euclidean, there is no difference in value between the covariant and contravariant components of a tensor. Therefore, represent both with covariant indices making simplification and all manipulations simpler. This change affects the display of indices on the screen as well as the output of SumOverRepeatedIndices.

b. 

The dot product A . B of quantum operators A and B now returns as a (noncommutative) product  A * B when neither A nor B involve Bras or Kets.

c. 

When A is a quantum operator (generic, Hermitian or unitary), the literal subscript object A__x is now considered an operator of the same kind.

d. 

Normal normalizes powers of the same base (including exponentials) by combining them. For example, A^n*A^m "->A^(n+m)."

e. 

Normal normalizes noncommutative products by sorting objects that commute between themselves putting those that involve Dagger and conjugate to the left, more aligned with normal ordering in quantum field theories.

f. 

FeynmanDiagrams does not return any crossed propagators unless explicitly requested using the new option includecrossedpropagators. The former option, normalproducts, was renamed as externallegs.

Examples

   

See Also

 

The Physics project, Physics, what is new in Physics in Maple 17, what is new in Physics in Maple 16

 

Physics2013.pdf    Physics2013.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft


Please Wait...