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 2015 has been Vector Analysis, symbolic Tensor manipulations, Quantum Mechanics, and General Relativity. With more than 400 enhancements throughout the entire package to increase robustness and versatility, two new commands, Assume and SubstituteTensor, a new Tetrads subpackage with 13 commands, as well as 26 new Physics:-Library commands to support further explorations and extensions, and an enlargement of the database of solutions to Einstein's equations with more than 100 new metrics, Maple 2015 extends again the range of Physics-related algebraic computations that can be done, in a natural way, using computer algebra software.
As part of its commitment to providing the best possible environment for algebraic computations in Physics, Maplesoft launched a Maple Physics: Research and Development web site 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 2015. Examples illustrating the use of the new capabilities in the context of more general problems are found in the MaplePrimes post Computer Algebra for Theoretical Physics.
|
Simplification
|
|
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 2015 for all these cases, including enhancements in the simplification of:
•
|
Tensorial expressions in general that have spacetime, space, and/or tetrad contracted indices, possibly at the same time.
|
•
|
New option tryhard, that resolves zero recognition in an important number of nontrivial situations.
|
•
|
Expressions involving the Dirac function.
|
•
|
Vectorial expressions involving cylindrical or spherical coordinates and related unit vectors.
|
•
|
Expressions simplified with respect to side relations (equations) in the presence of quantum vectorial equations.
|
•
|
Expressions involving products of quantum operators entering parameterized algebra rules.
|
•
|
Expressions involving vectorial quantum operators simplified with respect to other vectorial equations.
|
•
|
Add support for the simplification and integration of spherical harmonics (SphericalY
) relevant in quantum mechanics.
|
|
Examples
|
|
•
|
Enhancements in the simplification of tensorial expressions.
|
>
|
|
| |
| |
| |
| |
| (1) |
•
|
Define a tensor and define the metric in terms of the components of this tensor so that and is a Minkowski metric.
|
>
|
|
| |
>
|
|
| |
| (2) |
•
|
Avoid redundant display:
|
| (3) |
>
|
|
•
|
New: you can define it directly using a tensorial equation like (4), using either Define or Setup.
|
| |
| (5) |
•
|
Verify the resulting :
|
| (6) |
•
|
New: you can query about the definition you gave for any tensor directly from the tensor itself.
|
•
|
Enhanced simplification capabilities: show that this expression involving derivatives of is equal to zero.
|
>
|
|
| (8) |
•
|
A new tryhard option significantly improves zero recognition, which also got improved regardless of the new option.
|
Set spacetimeindices to be represented with lowercase Latin letters to make the input simpler.
>
|
|
| (10) |
>
|
|
| |
| (11) |
Consider the following tensorial expressions.
>
|
|
| (12) |
>
|
|
| (13) |
>
|
|
| (14) |
There are two, three and four free indices, and five, four and six repeated indices respectively in each of these three expressions, (see Check).
>
|
|
| (15) |
>
|
|
>
|
|
•
|
Improve the simplification with respect to side relations (equations) in the presence of quantum vectorial equations.
|
>
|
|
| (19) |
•
|
The identification of the vectorial character of expressions got improved. For example, this commutator is actually a non-projected vector.
|
>
|
|
•
|
Consider an expression involving vectorial quantum operators.
|
>
|
|
>
|
|
| (23) |
•
|
Simplify (23) taking into account the definition of angular momentum.
|
>
|
|
| (24) |
•
|
Enhancements in the simplification and integration of spherical harmonics (SphericalY) relevant in quantum mechanics.
|
>
|
|
| (26) |
>
|
|
| (28) |
>
|
|
| (29) |
|
|
|
Tensors
|
|
A number of relevant changes happened in the tensor routines of the Physics package, towards making the routines pack more functionality, the simplification more powerful, and the handling of symmetries, substitutions, and other operations more flexible and natural.
•
|
Physics now works with four kinds of Minkowski spaces (different signatures) to accommodate the typical situations seen in textbooks; to these, correspond the signatures +---, ---+, -+++ and +++-.
|
•
|
Allow setting the metric by specifying the signature directly, as in g_[`-`] or g_[`+---`], or or .
|
•
|
The signature keyword of the Physics Setup is now in use, to set the metric and to indicate the form of the orthonormal tetrad, in turn used to derive the form of a null tetrad.
|
•
|
Automatic detection of the position of t as the time variable when you set the coordinates automatically sets the signature of the default Minkowski spacetime metric accordingly to ---+ or +---.
|
•
|
New keywords with special meaning when indexing the Physics (also the user defined) tensors:
· `~`; for example g_[`~`] returns the all-contravariant matrix form of the metric.
· definition; for example Ricci[definition] returns the definition of the Ricci tensor; works also with user-defined tensors.
· scalars; for example Weyl[scalars] and Ricci[scalars] return the five Weyl and seven Ricci scalars used to perform a Petrov classification and in the Newman-Penrose formalism.
· scalarsdefinition, and invariantsdefinition; for example Weyl[scalarsdefinition] or Riemann[invariantsdefinition] return the corresponding definitions for the scalars and invariants.
· nullvectors; for example, when the new Tetrads subpackage is loaded, e_[nullvectors] returns a sequence of null vectors with their products normalized according to the Newman-Penrose formalism.
· matrix; this keyword was introduced in previous releases, and in Maple 2015 it can appear after a space index (not spacetime), in which case a matrix with only the space components is returned.
|
•
|
Tensorial expressions can now have spacetime indices (related to a global system of references) and tetrad indices (related to a local system of references) at the same time, or they be rewritten in one (spacetime) or the other (tetrad) frames.
|
•
|
The matrix keyword can be used with spacetime, space, or tetrad indices, resulting in the corresponding matrix
|
•
|
Implement automatic determination of symmetry under permutation of tensor indices when the tensor is defined as a matrix.
|
•
|
New conversions from the Weyl to the Ricci tensors, and from Weyl to the Christoffel symbols.
|
•
|
New option evaluatetrace = true or false within convert/Ricci, to avoid automatically evaluating the Ricci trace when performing conversions that involve this trace.
|
•
|
New option 'evaluate' to convert/g_, convert/Christoffel and convert/Ricci. With this option set to false, it is possible to see the algebraic form of the result (that is, of the tensors involved) before evaluating it.
|
•
|
The Maple 18 Library:-SubstituteTensor command, got enhanced and transformed into one of the main Physics commands, that substitutes tensorial 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, 2) repeated indices in Eqs do not clash with repeated indices in the expression and 3) spacetime, space, and tetrad indices are handled independently, so they can all be present in Eqs and in the expression at the same time. This new command 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
|
|
•
|
Minkowski spacetime: four different conventions.
|
>
|
|
| |
| |
By default, the metric has a signature - - - +, with time in the last position.
You can now set the signature of a Minkowski spacetime directly from the metric, or using the Setup keyword signature to use any of the four conventions frequently found in textbooks (- - - +), (+ - - -), (+++ -), and (- +++), and to indicate an Euclidean spacetime you can indicate (++++) or just +.
| |
| |
| |
Using Setup's signature keyword:
>
|
|
•
|
The position of the different sign in a Minkowski spacetime always, either the first or the last symbol in the signature, refers to the time variable. So if you indicate as one of the coordinates, say in the first position, and the signature is not in agreement with time in the first position, it is now automatically corrected and the metric set. For example, in this moment, due to (33), time is implicitly assumed to be in the first position; set coordinates with in the last (fourth) position.
|
>
|
|
| |
| |
| |
•
|
New shortcut for the matrix form of the all contravariant components of a tensor.
|
Since previous releases, you can always request the matrix (or array in the case of more than 2 indices) form of a tensor by adding the keyword matrix as a last index. For example, . A shortcut notation for the all covariant components is to omit the indices, as in . A new shortcut notation for the all contravariant components is to pass only they tilde `~`. To see the difference, consider a non-Minkowski spacetime, for instance set it in one go via:
| |
| |
| |
The all contravariant components of the metric are:
•
|
It is now possible to also use the keyword matrix passing only space (not spacetime) indices, resulting in a matrix with only the space components.
|
>
|
|
| (35) |
>
|
|
| (36) |
•
|
All the tensor predefined in the Physics package, or defined using defining equations and the Define command, accept a new keyword, definition, that returns their definition. For example:
|
| (37) |
| (38) |
Define a tensor using a tensorial equation:
| (39) |
>
|
|
Note that for consistency of free indices, if you now define the left-hand side as a tensor, in the right-hand side is also a tensor and so is automatically defined as well.
| |
| (41) |
Check the definition of :
•
|
A new keyword scalars for the Weyl and Ricci tensors, generates the Weyl and Ricci scalars of the Newman-Penrose formalism. Correspondingly, another new keyword scalarsdefinition return the definition of these scalars.
|
| (43) |
| (44) |
In the definition earlier, the tensors are the null tensors of the Newman-Penrose formalism, implemented in Maple 2015 within the new Tetrads package.
| |
| |
| |
| (45) |
In this new Tetrads package, is the tetrad (vierbein), by default an orthonormal tetrad that can be set to be a null tetrad using , are respectively the Ricci rotation coefficients and the lambda tensor defined in the "Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2" (definitions (98.9) and (98.10))
For instance, the form of the orthonormal tetrad for the metric set in is:
| (46) |
A new keyword for the tetrad is nullvectors:
| (47) |
The matrix keyword can be used with different kinds of indices, representing different objects. For example, the spacetime components of the electromagnetic tensor defined in equation (40) are:
| (48) |
The components of this tensor in the local inertial (tetrad) system of references are:
>
|
|
| (49) |
Likewise, the nonzero components of the Riemann tensor in the global (spacetime, Greek indices) and local (tetrad, lowercase roman indices from a to h) system of references are:
| (50) |
>
|
|
| (51) |
•
|
Implement automatic determination of symmetry under permutation of tensor indices when the tensor is defined as a matrix.
|
Define a tensor using a symmetric matrix on the right-hand-side:
>
|
|
>
|
|
| |
| (52) |
Check whether the system detected that is symmetric under permutation of .
>
|
|
Hence, the indices of this tensor are automatically normalized taking this symmetry into account, so that:
|
|
|
Tetrads in General Relativity
|
|
The formalism of tetrads in general relativity got implemented within Physics as a new package, Physics:-Tetrads, with 13 commands, mainly the null vectors of the Newman-Penrose formalism, the tetrad tensors , respectively: the tetrad, the tetrad metric, the Ricci rotation coefficients, and the lambda tensor, plus five algebraic manipulation commands: IsTetrad, NullTetrad, OrthonormalTetrad, SimplifyTetrad, and TransformTetrad to construct orthonormal and null tetrads of different forms and using different methods.
|
Examples
|
|
The new Tetrads package contains 13 commands for computing in a local (tetrad) frame. Tensor components in the local frame are represented with tetrad indices using a type of letter different than the one representing global spacetime indices. You can set the type of letter using Setup, or just load the new package and the type of letter will be set automatically.
>
|
|
| |
| |
| |
| (57) |
The most relevant commands are and , respectively representing the tetrad (also vierbein; by default, this is an orthonormal tetrad) and the tetrad metric (that is, the metric of the local - by default inertial - frame)
Then are the Ricci rotation coefficients and is a linear combination of them, according to the definitions in the "Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2" (definitions (98.9) and (98.10)).
| (59) |
| (60) |
The tensors are the null tensors of the Newman-Penrose formalism and the commands are for manipulating and exploring different forms of tetrads.
In a flat space, the spacetime and tetrad metrics are the same, so the orthonormal tetrad is just the identity.
| (61) |
In a curved spacetime, for instance, set a metric:
| |
| |
| |
| |
| |
>
|
|
| |
| (62) |
The default orthonormal tetrad is:
| (63) |
The following null vectors correspond to this tetrad:
| (64) |
You can compute these null vectors directly since these are also part of the Tetrads package:
>
|
|
| (65) |
>
|
|
| (66) |
You can query about their definition in the same way you can now query any other tensor:
| (67) |
Now that this definition depends on the signature:
Change the signature, both in sign and placing time in position 1:
>
|
|
So, now instead of and there is a change in the sign of the definition in terms of the metric if compared with (67).
| (70) |
You can verify these tensorial identities using TensorArray; for example, for the last equation:
| (71) |
>
|
|
| (72) |
To compute with a null tetrad instead of an orthonormal tetrad, set the tetrad or tetradmetric to null using Setup.
>
|
|
| (73) |
So, now the metric of the local (tetrad) system of references is:
Note: this form of the null tetrad metric is consistent with time in position 1, a change done in (69)- and not with time in position 4 (default). You can in any case redefine the tetrad metric in any particular way also using .
The null tetrad is now:
| (74) |
Compare this result with the orthonormal tetrad (63).
It is possible to test whether these tetrads satisfy the tetrad definition:
Using the manipulation commands of the package:
| |
or, using the TensorArray command as done in (72), by passing to it the definition directly:
>
|
|
| (78) |
You can compute different forms of an orthonormal tetrad or a null tetrad using the OrthonormalTetrad or NullTetrad command, respectively, requesting the use of different methods, or passing a starting vector. For instance, this is the default form of an orthonormal tetrad for the current spacetime metric:
| (79) |
There are two methods available for computing these tetrads: the GramSchmidt (generalization to curved spaces) and Eigenvectors (based on computing the Eigenvectors of a related matrix). By the default, the Physics package routines decide on what method is more convenient to use for the the spacetime metric set. In this case the routines used the GramSchmidt method; you can check the other method via:
>
|
|
| (80) |
If this is an orthonormal tetrad you prefer, you can set it via . To see what would be the null tetrads corresponding to (79) and (80),
| (81) |
>
|
|
| (82) |
When using the GramSchmidt you can also specify the first vector. Recalling, the method works iterating the computation of the "next" vector (line of the tetrad) starting from a first vector. For example, instead of starting from start from , compare with (79).
>
|
|
| (83) |
| |
Compare this other result with (81):
>
|
|
| (85) |
The Ricci rotation coefficients for the spacetime metric set; recalling:
| (87) |
Simpler expressions happen for the all contravariant components:
>
|
|
| (88) |
To see all the nonzero components at once, input .
The Weyl and Ricci scalars of the Newman-Penrose formalism:
| (89) |
| (90) |
| (91) |
The all spacetime, then mixed tetrad and spacetime, then all tetrad components of the Ricci tensor; for illustration purposes, use a simpler metric (Tolman), avoiding large algebraic expressions.
| |
| |
| |
| |
>
|
|
| (93) |
| (94) |
>
|
|
| (95) |
>
|
|
| (96) |
|
|
|
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, Maple 17, and Maple 18. These metrics can be searched using g_ (the Physics command representing the spacetime metric that also sets the metric to your choice in one go) or using the command DifferentialGeometry:-Library:-MetricSearch.
•
|
For Maple 2015, one hundred and four more metrics were added to the database from various Chapters of the aforementioned book entitled "Exact Solutions to Einstein's Field Equations". Among new metrics for other chapters, with this addition, the solutions found in the literature and collected in Chapters 13 and 14 of this book are all present as well in database of solutions to Einstein's equations.
|
•
|
It is now possible to manipulate algebraically the properties of these metrics, for example, computing tetrads and null vectors for them - using the 13 commands of new Physics:-Tetrads package.
|
|
Examples
|
|
As mentioned previously, the solutions found in the literature and collected in Chapters 13 and 14 of the book "Exact Solutions to Einstein's Field Equations" are all now present in the database of solutions to Einstein's equations. You can query about these solutions, and set the spacetime metric to be one of them directly from the g_ Physics command, or search them in details using the DifferentialGeometry:-Library:-MetricSearch.
List, for instance, all the metrics of chapters 13 and 14 found in the Maple database - after listing, to set the metric to be any of these, or just to give an explicit look, enter g_[index_of_metric], for example: g_[[13,2,1]]:
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| (97) |
Set the metric:
| |
| |
| |
| |
| |
Change it to another one, this time from chapter 14:
| |
| |
| |
| |
| |
List all the metrics of the literature, collected in chapter 14, found in the Maple database:
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| (98) |
Set the metric to be last one listed:
>
|
|
| |
| |
| |
| |
| |
|
|
|
Commutators, AntiCommutators, and Dirac notation in quantum mechanics
|
|
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 2015. These include:
•
|
Computing Commutators and Anticommutators between equations, or of an expression with an equation.
|
•
|
whenever A is a quantum operator and F is a commutative mapping (see Cohen-Tannoudji, Quantum Mechanics, page 171).
|
•
|
Differentiating with respect to a noncommutative variable whenever all the variables present in the derivand commute with the differentiation variable.
|
•
|
Automatic computation of , that is the automatic computation of a function of an operator applied to its eigenkets (see Cohen-Tannoudji, Quantum Mechanics, page 171).
|
•
|
Parameterized commutators; for example: when setting the rule , take as a parameter, so now returns , not
|
•
|
Automatic derivation of a commutator rule: Commutator(A, F(B)) = F '(B) when Commutator(A, C) = Commutator(B, C) = 0 and C = Commutator(A, B), as shown in (see Cohen-Tannoudji, Quantum Mechanics, page 171).
|
•
|
, including cases like for instance , or .
|
•
|
New mechanism to have more than one algebra rule related to the same function (for example, a function of two arguments that come in different order).
|
•
|
The dot product of the inverse of an operator, Inverse(A) · Ket, now returns the same as 1/A · Ket.
|
•
|
is Hermitian if is Hermitian and F is assumed to be real, via Assume, assuming, or .
|
•
|
Implement that is Hermitian if is Hermitian and F is a mathematical real function, that is, one that maps real objects into real objects; in this change only exp, the trigonometric functions and their inert forms are included.
|
•
|
Add a few previously missing Unitary and Hermitian operator cases:
|
|
a) if U and V are unitary, the U V is also unitary.
|
|
b) if A is Hermitian then is unitary.
|
|
c) if U is unitary and A is Hermitian, then is also Hermitian.
|
•
|
Make the type definition for ExtendedQuantumOperator more precise to include as such any arbitrary function of an ExtendedQuantumOperator.
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
| (100) |
>
|
|
•
|
Arbitrary commutative mappings of a quantum operator commute with .
|
>
|
|
>
|
|
•
|
Derivatives with respect to the noncommutative variable V can now proceed whenever all the operators found in the derivand commute with V.
|
>
|
|
| (107) |
When an operator is used as label for a basis of Kets, for example X, so a case where the Ket is automatically an eigenket of the operator X, the application of a function of X to its eigenkets, and with that also the Bracket of a function of X, are now automatically computed (see Cohen-Tannoudji, Quantum Mechanics, page 171).
For example:
>
|
|
| |
| |
| (108) |
From the previous Maple releases:
>
|
|
>
|
|
New in Maple 2015:
>
|
|
So, for instance, for the Bracket:
>
|
|
It works the same way for a discrete basis; set for instance X to be a label for a discrete basis.
>
|
|
| |
| (117) |
Compute again the value of (115):
Example with functions of functions: use the `*` operator in the left-hand sides and the active dot `.` operator in the right-hand sides to see the operation performed.
>
|
|
>
|
|
| (120) |
>
|
|
•
|
Implement parameterized commutators. For example, set the following algebra rule:
|
>
|
|
| |
| (122) |
As usual, you get:
>
|
|
| (123) |
New: , appearing on both the left-hand and right-hand sides of the rule in (122), is thus considered one of the variables of this rule (that is, a parameter of the rule), so for instance changing by or by the rule works as expected, (that is, parameterized by )
>
|
|
| (124) |
>
|
|
| (125) |
•
|
When A and B are quantum operators, both commute with their commutator, and let F be an arbitrary commutative mapping, you have that the commutator of A or B with F applied to the other one is computable (see Cohen-Tannoudji, Quantum Mechanics, (51), page 171). To illustrate this, redo the algebra rules:
|
>
|
|
| (126) |
>
|
|
| (127) |
Note that this turns the specification of commutator rules for known functions of quantum operators redundant. For example, there is in this moment no algebra rule for the Commutator of with the exponential and nevertheless the value of this commutator can be (now automatically) derived from the algebra rules:
>
|
|
| (128) |
>
|
|
•
|
Many algebra rules for functions with same name but different arguments.
|
>
|
|
| (130) |
The following two commutators involve the single product function, but the order of the arguments is relevant, consider a case where the left-hand sides of the commutators are not necessarily equal.
>
|
|
| (131) |
>
|
|
| (132) |
Set both commutators as algebra rules at the same time (not possible before this change).
>
|
|
| (133) |
Verify the commutators return as expected.
>
|
|
| (134) |
>
|
|
| (135) |
•
|
Handle Inverse(A) ⋅ Ket the same as 1/A ⋅ Ket
|
>
|
|
>
|
|
•
|
Add a few previously missing Unitary and Hermitian operator cases:
|
>
|
|
| (138) |
>
|
|
>
|
|
>
|
|
>
|
|
| (143) |
>
|
|
Assume now that F is a real function of its argument:
Hence is also an Hermitian operator:
>
|
|
>
|
|
For instance, sin is a real function of its argument:
>
|
|
•
|
Make more precise the definition of Physics:-Library:-PhysicsType:-ExtendedQuantumOperator to include functions of ExtendedQuantumOperators.
|
>
|
|
>
|
|
>
|
|
|
|
|
New Assume command and new enhanced Mode: automaticsimplification
|
|
One new enhanced mode was added to the Physics setup, automaticsimplification, and a new Physics:-Assume command make expressions be automatically expressed in simpler forms and allow for very flexible ways of implementing assumptions, making the Physics environment concretely more expressive.
|
Assume
|
|
In almost any mathematical formulation in Physics, there are objects that are real, positive, or just angles that have a restricted range; for example: Planck's constant, time, the mass and position of particles, and so on. When placing assumptions using the assume command, however, expressions entered before placing the assumptions and those entered with the assumptions cannot be reused in case the the assumptions are removed. Also, when using assume variables get redefined so that geometrical coordinates (spacetime, Cartesian, cylindrical, and spherical) loss their identity. These issues got addressed with a new Assume command, that does not redefine the variables, implementing the concept of an "extended assuming", allowing for reusing expressions entered before placing assumptions and also after removing them. Assume also includes the functionality of the additionally command.
|
Examples
|
|
•
|
The new Assume command implements the concept of an "extended assuming".
|
Consider a generic variable, x; nothing is known about it.
>
|
|
x:
nothing known about this object
| |
Each variable has an associated number that depends on the session, and the computer (internally) uses this number to refer to the variable.
| (152) |
When using the assume command to place assumptions on a variable, this number associated to it changes, for example:
| (153) |
Indeed, the variable x got redefined and renamed, it is not anymore the variable x referenced in (152).
Originally x, renamed x~:
is assumed to be: RealRange(Open(0),Open(1/2*Pi))
| |
To undo assumptions placed using the assume command one reassigns the variable x to itself:
Check the numerical address: it is again equal to (152).
| (155) |
The key observation is that variables that receive assumptions using assume get redefined at each assumption, and this means two things:
1) all the equations or expressions, entered before placing the assumptions on x using assume, involve a variable x that is different than the one that exists after placing the assumptions, and so these previous expressions cannot be reused. They involve a different variable.
2) Also, because, after placing the assumptions using assume, x refers to a different object, programs that depend on the x that existed before placing the assumptions will not recognize the new x redefined by assume
.
For example, if x was part of a coordinate system and the spacetime metric depends on it, the new variable x, redefined within assume, being a different symbol, will not be recognized as part of the dependency of . This posed obstacles to working with curved spacetimes that depend on parameters or on coordinates that have a restricted range. Likewise, all the Physics:-Vectors commands look for the Cartesian, cylindrical, or spherical coordinates sets , respectively, in order to determine how to proceed, but these variables disappear if you use assume to place assumptions on them. For that reason, only assuming was fully compatible with Physics, not assume. A similar situation happens with the VectorCalculus package.
These issues get resolved with the new Assume command that uses all the implementation of the existing assume command but with a different approach: the variables being assumed do not get redefined, and hence:
a) you can reuse expressions or equations entered before placing the assumptions, and
b) you can also undo the assumptions and reuse results obtained with assumptions.
This is the concept of an extended assuming. Also, commands that depend on these assumed variables will all continue to work normally, before, during, or after placing the assumption, because the variables never get redefined.
For example, before placing assumptions this simplification attempt accomplishes nothing:
Assume now that :
The new command echoes the assumption placed.
a) The address of x is still the same as in (152) before placing the assumption.
| (158) |
So, the variable did not get redefined. The system, however, knows about the assumption - all the machinery of the assume command is being used.
x:
is assumed to be: RealRange(Open(0),Open(1/2*Pi))
| |
Hence, expressions entered before placing assumptions can be reused. For example, you can reuse (156) now and get:
To clear the assumptions on x, you can use either or in the case of many variables being cleared in one go, or in the case of a single variable being cleared:
x:
nothing known about this object
| |
In summary, the new Assume command implements the concept of an extended assuming, that can be turned ON and OFF at will and at any moment without changing the variables involved.
The implementation also includes the functionality of the additionally command. For that purpose add the keyword additionally anywhere in the calling sequence. For example:
x:
is assumed to be: RealRange(Open(0),infinity)
| |
>
|
|
x:
is assumed to be: RealRange(Open(0),Open(1))
| |
|
|
|
Automatic simplification
|
|
This new Physics mode of computation means that, after you enter , the output corresponding to every single input (not just related to Physics) gets automatically simplified in size before being returned to the screen. This is fantastically convenient for interactive work in most situations.
|
Examples
|
|
>
|
|
•
|
By default, automaticsimplification is turned OFF; you can query about that via:
|
>
|
|
| (163) |
Hence, for instance, if you input the following expressions the computer just echoes your input:
>
|
|
| (165) |
There is however some structure behind (164) and (165) and, in most situations, it is convenient to have these structures apparent, in part because they frequently provide hints on how to proceed ahead, but also because a more compact expression is, roughly speaking, simpler to understand. To see this automaticsimplification in action, turn it ON:
>
|
|
| (166) |
Recall these same expression (you could input it with the equation label (164) as well) ...
| (168) |
What happened is that this output, as everything else after you set and with no exceptions, is now further processed with simplify/size before being returned. You can now enjoy computing with frankly shorter expressions all around.
You can turn automaticsimplification OFF the same way:
>
|
|
| (169) |
| (171) |
|
|
|
|
Vectors Package
|
|
A number of changes were performed in the Vectors subpackage to make the computations more natural and versatile:
•
|
Enhancement in the algebraic manipulations of inert vectorial differential operators.
|
•
|
Improvements in the manipulation of of scalar products of vector or scalar functions (to the left) with vectorial differential operators (to the right), that result in vectorial or scalar differential operators.
|
•
|
Several improvements in the use of trigonometric simplifications when changing the basis or the coordinates in vectorial expressions.
|
•
|
Add new functionality mapping Vectors:-Component over equations, automatically changing basis if the two sides are not projected over the same base.
|
•
|
Implement the expansion of the square of a vectorial expression as the scalar (dot) product of the expression with itself, including the case of a vectorial quantum operator expression.
|
•
|
Allow multiplying equations also when the product operator is in scalar and vector products (Vectors:-`.` and Vectors:-`&x`).
|
•
|
ChangeBasis: allow changing coordinates between sets of orthogonal coordinates also when the expression is not vectorial.
|
•
|
New command: ChangeCoordinates, to rewrite an algebraic expression, using Cartesian, cylindrical, and spherical coordinates, an expression that involves these coordinates, either a scalar expression, or vectorial one but then not changing the orthonormal basis.
|
|
Examples
|
|
•
|
Enhance the capabilities for manipulating inert vectorial differential operations on projected vectors constructed with non-projected vectors.
|
>
|
|
>
|
|
| (172) |
Consider the vector projected in the Cartesian basis, constructed with the non-projected vector :
>
|
|
| (173) |
Take its divergence but not computing the operation, that is, using the inert %Divergence operator:
| (174) |
Evaluate and expand, also switching the order of these operations:
| (175) |
| (176) |
Take the %Curl instead of the %Divergence:
| (177) |
| (178) |
| (179) |
Compare this result with evaluating first the inert operation:
| (180) |
Verify that (179) and (180) are mathematically equal by projecting , so using:
>
|
|
| (181) |
>
|
|
| (182) |
Substitute in (179) and (180)
| (183) |
| (184) |
Collecting unit vectors the two expressions are identical.
>
|
|
| (185) |
•
|
Better handling of scalar products of vectors and vectorial differential operators. Consider:
|
>
|
|
| (186) |
So is actually not a vector but a differential operator, hence, for instance:
>
|
|
| (187) |
•
|
Several improvements in the use of trigonometric simplifications when changing the orthogonal basis or the coordinates in vectorial expressions. Consider:
|
>
|
|
| (188) |
New:
With that and similar relationships in mind, consider the following vectorial expressions
>
|
|
| (192) |
>
|
|
| (193) |
Reverse now this transformation, arriving back at (191).
>
|
|
Compare the output of ChangeBasis with the one of the new ChangeCoordinates; when using the new command, the unit vectors remain unchanged:
>
|
|
| (195) |
>
|
|
| (196) |
For spherical coordinates, consider for instance:
>
|
|
| (198) |
>
|
|
>
|
|
| (201) |
>
|
|
•
|
Map Vectors:-Component over equations, automatically changing basis if the two sides are not projected over the same base.
|
>
|
|
| (203) |
When the sides of the equation are projected onto different basis, Component maps both sides onto the basis of the left-hand side.
>
|
|
| (208) |
| (209) |
•
|
The square of a vectorial expression as the scalar (dot) product of the expression with itself.
|
Example with quantum vectorial non-commutative operators:
>
|
|
| |
| (212) |
| (214) |
>
|
|
| |
| (215) |
| (216) |
•
|
Allow multiplying equations by multiplying their left-hand sides and equating the result to the product of the right-hand sides also for vectorial scalar and vector products (Vectors:-`.` and Vectors:-`&x`)
|
To enter the · and × vector products you can use the palette of 'Common Symbols', or directly type the dot and &x for the cross product:
|
|
|
The Physics Library
|
|
Twenty-six new commands, useful for programming and interactive computation, have been added to the Physics:-Library package. These are:
•
|
ExpandProductsInExpression
|
•
|
FlipCharacterOfFreeIndices
|
•
|
FromMinkowskiKindToSignature
|
•
|
FromSignatureToMinkowskiKind
|
•
|
FromTetradToTetradMetric
|
•
|
HasOriginalTypeOfIndices
|
•
|
IsOrthonormalTetradMetric
|
•
|
RepositionRepeatedIndicesAsIn
|
Additionally, several improvements in the previously existing Physics:-Library commands have been implemented:
•
|
Add the types spacetimeindex, spaceindex, spinorindex, gaugeindex, and tetradindex to the exports of the Library:-PhysicsType package.
|
•
|
Add new options changefreeindices and flipcharacterofindices to the Library:-ToCovariant and Library:-ToContravariant commands, to actually lower and raise the free indices as necessary, instead of the default behavior of returning an expression that is mathematically equivalent to the given one.
|
•
|
Add functionality to the Library command GetSymbolsWithSameType so that when the input is a list of objects, it returns a list with new symbols of the corresponding types, automatically taking into account the vectorial (Y/N) kind of the symbols.
|
|
Examples
|
|
>
|
|
| (221) |
•
|
ExpandProductsInExpression is a new Library routine, to perform the equivalent to frontend@expand but including now noncommutative products, powers, and vectorial sums. This routine also has the potential of substituting all the calls to frontend, difficult to use in user-written Physics programs due to not handling noncommutative operations.
|
•
|
FlipCharacterOfFreeIndices is a new Library routine for flipping the free indices of a tensorial expression.
|
| |
| (222) |
An example of a tensorial expression:
>
|
|
| (223) |
The free indices of this expression are covariant:
| |
Flip all the free indices (the resulting expression is not mathematically equal, so this is different - complementary - to what you can achieve with Library:-ToCovariant and Library:-ToContravariant and their new option flipcharacterofindices):
>
|
|
| (225) |
| |
| (226) |
Flip only nu:
>
|
|
| (227) |
| |
| (228) |
•
|
RepositionRepeatedIndicesAsIn is a new Library routine for repositioning repeated indices following a pattern. Consider a tensor T with one index repeated.
|
>
|
|
| |
| (229) |
>
|
|
Rewrite this tensor such that the repeated indices appear in the first and third positions, so following a pattern as:
>
|
|
| (231) |
>
|
|
•
|
RestoreRepeatedIndices is a new routine to use, in a given expression, the same repeated indices used in another expression.
|
| |
| (233) |
Consider these two tensorial expressions:
In (234), you want to use the repeated indices used in (235): indicate the two expressions, the indices in and the indices out.
>
|
|
•
|
RewriteTypeOfIndices rewrites a tensor in terms of the type of indices used when it got defined (for example, via , where is spacetime and is tetradic).
|
| |
| |
| (237) |
Consider a tensor where the first index is tetradic and the second index is spacetime.
>
|
|
| |
| (238) |
How can the components of , that is the first index spacetime and the second index tetrad be expressed in terms of the components of ?
>
|
|
| (239) |
•
|
New dedicated Physics types added to the Physics:-Library:-PhysicsType package: CommutativeMapping, ExpandableProduct, gaugeindex, spaceindex, spacetimeindex, spinorindex, and tetradindex.
|
>
|
|
| (240) |
A CommutativeMapping is one performed using a commutative function (regardless of whether its arguments are or are not commutative).
>
|
|
| |
>
|
|
>
|
|
Indices of different kinds can now be identified as being of different types.
>
|
|
| (245) |
>
|
|
| (247) |
>
|
|
| (248) |
>
|
|
| (249) |
•
|
Improvements in Library:-ToCovariant and Library:-ToContravariant when the spacetime is curved and the expression being transformed is not actually a tensor in curved spaces.
|
For example, set the spacetime to something not Galilean for experimentation purposes:
| |
| |
| |
| |
| (250) |
| (251) |
In a curved spacetime as the one just set, this derivative (252) is not a tensor. Rewriting it in terms of its Covariant components, then in terms of its Contravariant components:
| (253) |
>
|
|
| (256) |
>
|
|
| (257) |
•
|
The default behavior in Maple 18 for Library:-ToCovariant and Library:-ToContravariant is to return an expression that is mathematically equal to the given one, and where the tensors in it (all of them, or just those indicated) appear with all of their indices covariant or all contravariant.
|
New functionality: return an expression that is not mathematically equal to the given one but, instead, it has all (or part) of its free indices respectively covariant or contravariant. For that purpose, pass the new option flipcharacterofindices
| |
| (258) |
>
|
|
>
|
|
| |
Default behavior: the returned expression is mathematically equal, but the tensors appear with all of their indices covariant (Library:-ToCovariant) or contravariant (Library:-ToContravariant), by means of introducing contractions with the metric.
| (261) |
The aforementioned G and F have only covariant indices. This result simplifies to the given (259).
New: lower or raise only the free indices in the departing expression.
>
|
|
New: flip character of free indices, to all free indices covariant (Library:-ToCovariant) or all free indices contravariant (Library:-ToContravariant). In (259), the free indices are (contravariant) and (covariant), so in the following we have first covariant, then contravariant.
>
|
|
| (264) |
>
|
|
| |
>
|
|
| (266) |
>
|
|
| |
|
|
|
Miscellaneous
|
|
•
|
Add several fields to the Physics:-Setup() applet in order to allow for manipulating all the Physics settings from within the applet.
|
•
|
New Physics:-Setup options: automaticsimplification and normusesconjugate.
|
•
|
When any of Physics or Physics:-Vectors are loaded, dtheta, dphi, etc. are now displayed as , , etc.
|
•
|
Implement, within the `*` operator, both the global and the Physics one, the product of equations as the product of left-hand sides equal the product of right-hand sides, eliminating the frequently tedious typing "". You can now just enter "".
|
•
|
Automatically distribute dot products over lists, as in .
|
•
|
Allow (A = B) - C also when A, B, and C are Matrices.
|
•
|
Add and to convert Physics:-Vectors, Matrices of equations, etc. into sets or lists of equations.
|
•
|
It is now possible to use equation labels to copy and paste expressions involving Annihilation and Creation operators.
|
•
|
Implement the ability in Fundiff to compute functional derivatives by passing only a function name as second argument. This works okay when the derivand contains this function with only one dependency (perhaps with many variables), say X, permitting varying a function quite like that done using paper and pencil.
|
•
|
The determination of symmetries and antisymmetries of tensorial expressions got enhanced.
|
•
|
The metric as well as the tetrad and tetrad metric can now be (re)defined using the standard Physics:-Define command for defining tensors. Also, the definition can now be given directly in terms of a tensorial expression.
|
•
|
Add keyword option attemptzerorecognition in TensorArray, so that each component of the array is tested for 0.
|
•
|
Allow to sum over a list of objects, or over `in` structures like '' when redefining sum, and also in Physics:-Library:-Add.
|
•
|
Harmonize the use of simplify/siderels with Physics, so that anticommutative and noncommutative objects, whether they are vectorial or not, are respected as such and not transformed into commutative objects when the simplification is performed.
|
a.
|
The output of KillingVectors has now the format of a vector solution by default, that is, a 4-D vector on the left-hand side and a list with its components on the right-hand side and as such can be repassed to the Define command for posterior use as a tensor. To recover the old format of a set of equation solutions for each vector component, a new optional argument, output = componentsolutions, got implemented.
|
b.
|
Vectors:-Norm now returns the Euclidean real norm by default, that is: , and only return using conjugate, as in , when the option conjugate is passed, or the setting normusesconjugate is set using Physics:-Setup.
|
c.
|
The output of FeynmanDiagrams now discards, by default, all terms that include tadpoles. Also, an option, includetadpoles, to have these terms included as in previous releases, got implemented.
|
d.
|
When Physics is loaded, does not return , in view that, in Maple, returns 1.
|
e.
|
The dot product of quantum operators and now returns as a (noncommutative) product when neither nor involve Bras or Kets.
|
f.
|
If is a quantum operator and Vectors is loaded, then is also a quantum operator; likewise, if is a noncommutative prefix and Vectors is loaded then is also a noncommutative object.
|
g.
|
When Vectors is loaded, the Hermitian and Unitary properties of operators set using the Setup command are now propagated to "the name under the arrow" and vice versa, so that if is a Hermitian Operator, or Unitary, then is too.
|
h.
|
The SpaceTimeVector can now have dependency other than a coordinate system.
|
i.
|
It is now possible to enter even when the index is repeated twice, considering that in is actually a dummy, so that a collision with in can be programmatically avoided.
|
j.
|
Diminish the use of KroneckerDelta as a tensor, using the metric g_ instead in the output of Physics commands, reserving KroneckerDelta to be used as the standard corresponding symbol in quantum mechanics, so not as a tensor.
|
|
Examples
|
|
>
|
|
| (268) |
•
|
Add several fields to the Physics:-Setup() applet, including Tetrad settings and the new automaticsimplification, in order to permit manipulating all the Physics settings directly from the applet.
|
•
|
dtheta, dphi, etc. are now displayed as , , etc. when Physics or Physics:-Vectors are loaded. This is particularly convenient when entering the spacetime metrics by giving the square of the line element and using dtheta, dphi, etc.to represent differentials of the coordinates. This is the square of the line element for the Schwarzschild metric in coordinates
|
>
|
|
| (269) |
•
|
The product of equations as the product of left-hand sides equal to the product of right-hand sides.
|
•
|
Distribute a dot product over the elements of a list.
|
| (276) |
•
|
More flexible input notation: allow direct addition or subtraction of a Matrix to a Matrix equation.
|
>
|
|
| (277) |
| (278) |
•
|
New: convert/setofequations and convert/listofequations, useful to transform matrix and vectorial equations into sets or lists of equations.
|
| (279) |
>
|
|
| (280) |
>
|
|
| (281) |
When a single matrix is passed, each element is equated to 0 and the related set or list is returned.
>
|
|
| (282) |
Vectorial equations are also handled:
>
|
|
| (283) |
>
|
|
| (284) |
>
|
|
| (285) |
•
|
The display of Annihilation and Creation operators is now with the minus and plus symbols as superscripts.
|
•
|
It is possible to use equation labels to refer to these operators.
|
>
|
|
>
|
|
•
|
Fundiff: when computing functional differentiation, you can indicate the functionality of the differentiation variable, as in:
|
Frequently, however, x is an integration dummy variable, as in:
| (292) |
The standard way of computing the functional derivative, indicating the functionality of the differentiation function, continues to work, as in:
It is now possible to not indicate the functionality of the differentiation variable, so that the output comes directly expressed using the originally dummy variable, in this case x. Here you can delay the operation:
>
|
|
| (294) |
•
|
The determination of symmetries and antisymmetries of tensorial expressions got enhanced. Define a tensor H with the symmetries of the Riemann tensor
|
>
|
|
| |
| (295) |
Consider now the tensorial derivative, in inert form (use %diff, not diff)
>
|
|
This inert derivative is antisymmetric with respect to permutations of the indices of each of the pairs .
>
|
|
Now replace the last pair, by .
>
|
|
Test the antisymmetry with respect to each pair of indices.
>
|
|
| (299) |
•
|
The metric can be defined in terms of a tensorial expression and using the standard Physics command for defining tensors, that is, Define. Consider, for instance, the following definition of the metric in terms of a tensor and a Minkowski metric .
|
| |
| |
| (301) |
Define first and .
>
|
|
>
|
|
| |
| (302) |
Define now the metric in terms of the following tensorial expression, directly using Define.
>
|
|
| (303) |
| |
| (304) |
Verify the resulting metric:
| (305) |
| (306) |
>
|
|
>
|
|
| (309) |
>
|
|
| (310) |
| (311) |
•
|
New: summing over a list of objects.
|
Consider the following summation:
So, you want to sum a piecewise function where one of the conditions assume the value true, then false. The input would be the following and you see an error interruption.
>
|
|
This happens because of a premature evaluation of piecewise before the summation index c assumes a value, but even delaying the evaluation of piecewise with quotes you also receive (another kind of) error interruption
>
|
|
The problem is that the sum command does not accept a list of values for the summation index like the add command does.
These two issues get resolved when redefining the sum command as explained in Physics:-Setup (subsection on redefinesum) - the novelty in Maple 2015 is in accepting a list of values for the summation index as add does. Note you do not need to load Physics for this purpose; just enter:
>
|
|
Also, after redefining sum, you do not need to use delay evaluation quotes: the premature evaluation of the summand before the summation index assumes values do not happen anymore, so just enter:
>
|
|
Structures using `in`, as for instance '' are now also allowed:
>
|
|
| (314) |
•
|
Change in FeynmanDiagrams: discard tadpoles by default.
(This section is updated according to developments in FeynmanDiagrams for the Maple 2020 release)
|
| (316) |
The interaction Lagrangian of the model.
The default is to compute with three vertices, to compute with only one vertex use
>
|
|
| (318) |
The corresponding graph:
>
|
|
| (319) |
The previous default included terms that involve tadpoles, that is, internal (loop) lines that start and end in the same vertex; to recover that behavior use the new keyword includetadpoles.
>
|
|
| (320) |
Only the term with a tadpole and as a graph:
>
|
|
| |
| (321) |
The terms of the scattering matrix up to order 2 (two vertices). Set a new system of coordinates and turn OFF the PDEtools:-declare mechanism to see both X and Y in the output.
| |
| |
>
|
|
| (323) |
The graph corresponding to the term (process) with two external legs, each one in a different vertex; new: you can specify the legs using the _NP(leg 1, leg2, ...) or directly as a list with the legs, possibly indicating the vertices.
>
|
|
| (324) |
|
|
|
|
|
|
|