Physics for Maple 18 - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Physics : Updates : Physics for Maple 18

Physics

 

Maple provides a state-of-the-art 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 Physics-specific 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 physics-related 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

4-Vectors, Substituting Tensors

Functional Differentiation

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

Commutators, AntiCommutators

Expand and Combine

New Enhanced Modes in Physics Setup

Dagger

Vectors Package

Library

Miscellaneous

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 right-hand 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)

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. In Maple 18, 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

(38)

Define a contravariant 4-vector 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 left-hand side of the substitution equation is a tensor function, the functionality is also taken as a parameter,

(50)

SubstituteTensor can also substitute sub-expressions 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 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).

• 

For Maple 18, fifty more metrics were added to the database from Chapter 28 of the aforementioned 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:

You can query about metrics directly from the metric command g_

Warning, found more than one match for the keyword 'Bajer', as seen above. Please refine your 'keyword' or re-enter the metric 'g_[...]' with the list of three numbers identifying the metric, for example as in g_[[28, 58.2, 1]] or Setup(metric = [28, 58.2, 1])

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

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

Warning, found more than one match for the keyword '28', as seen above. Please refine your 'keyword' or re-enter the metric 'g_[...]' with the list of three numbers identifying the metric, for example as in g_[[28, 16, 1]] or Setup(metric = [28, 16, 1])

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

• 

If two noncommutative operators  and   satisfy  , then the commutator   is automatically taken equal to 0; if in addition  is Hermitian, then  is also automatically taken equal to zero.

Examples

(65)

Commutator and AntiCommutator now also operate on matrices:

(66)

(67)

(68)

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

(69)

(70)

Define 4 pairs of annihilation/creation operators for fermionic particles:

(71)

(72)

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.

(73)

Using that information, the system now also knows about the anticommutator of products of these fermionic operators. For example, on the left-hand side: inert, on the right-hand side: computed.

(74)

This new functionality is automatically used when sorting products of non-commutative operators according to a specified ordering using the new Library:-SortProducts routine; let P be a product:

(75)

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

(76)

(77)

Changes in design:

• 

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

• 

 automatically commutes with  whenever  is a known mathematical function (understanding that in these cases  can be represented as a combination of sums and products of its arguments)

• 

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:

(78)

(79)

(80)

(81)

(82)

(83)

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. In Maple 18, many of these algebraic operations were reviewed and related special formulas (such as Glauber's and Hausdorff's) were implemented.

Examples

(84)

Set three quantum operators to illustrate ideas:

(85)
• 

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

(86)

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

(87)

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:

(88)

 

Now,

(89)
• 

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

You can recombine back the right-hand side using combine:

(90)
• 

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 Hausdorff'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 right-hand side remain. Clear C from the set of quantum operators:

(91)

(92)

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

(93)

Assuming they are real:

(94)

Alternatively, setting A and B as real objects, using the new realobjects option of Setup, this operation can soon after be performed without using assuming:

(95)

(96)
• 

Powers of the same noncommutative base can be combined when the exponents commute, but not otherwise.

(97)

(98)

(99)

So, this product cannot be combined as "powers of the same base":

(100)

However, if the exponents commute:

(101)

(102)

The combined exponential can then be expanded:

(103)

Also  is expanded into  whenever  commutes with , even if none of  and  are commutative (they may commute through user-defined algebra rules).

(104)

From the algebra rules already set:

(105)

The product  commutes with

(106)

Hence, when  is a nonnegative integer, the product  can be rewritten as .  As a result:  

(107)

(108)
• 

A new option in Expand is to not sort noncommutative operands in products. This permits an expansion without further automatic simplifications, which therefore allows more control over the steps.

Suppose there are two objects, A and B, both noncommutative, which commute between themselves:

(109)

By default, Expand will expand products and normalize noncommutative products by rewriting them in a unique way. For instance, because  and  commute, then the product  is automatically rewritten as

(110)

(111)

It is sometimes preferred to keep the ordering visible. That is, to not perform this sorting of operands in noncommutative products taking into account their commutability. The new option, sortnoncommutative, (the same option described in the help page of Physics:-Normal) allows for that:

(112)
• 

Expansion of inert brackets.

For convenience, brackets are automatically expanded:

(113)

(114)

However, inert brackets are not automatically expanded. An expansion rule for the inert case is now available. This allows one to take more control over the operations when computing with brackets and only perform the expansion when desired.

(115)

(116)

It is now possible to re-combine inert brackets.

(117)
• 

Algebraic vectorial expressions can also be expanded in different ways.

(118)

You can use expand, Expand, or – in the case of Vectors expandable commands as this one – Simplify.

(119)

Expansion of inert vectorial operators:

(120)

(121)

(122)

(123)

(124)

(125)

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,  as independent variables and in equal footing; this is Wirtinger calculus.

4. 

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

In Maple 18, these options combined provide flexibility, subsequently making the Physics environment more expressive.

Real Objects

In almost any mathematical formulation in Physics, there are objects that are real; for example: Planck's constant, time, the mass and position of particles, etc. Independent of the Physics package, there are two standard ways to indicate that a variable is real. First, by using assuming, where the real character is valid only for one computation. Second, by using assume, where the real character is taken into account only after the assumption is placed, and so you cannot reuse previous expressions with the new assumption meaning.

 

In Maple 18, there is now a third way, so that:

• 

You can turn the real character of selected variables ON and OFF at any moment, without restarting.

• 

You can reuse computations found anywhere on the worksheet, which take the indicated real character of variables and functions into account (including expressions entered before saying which are the real objects).

• 

You can query about the real objects set at any moment.

• 

You can indicate algebraic non-projected vectors to be real.

• 

All of the geometrical coordinates, Cartesian, cylindrical and spherical, including the related unit vectors, as well as any 4-D coordinate system defined using Coordinates or Setup are automatically taken as real.

• 

The real variables and functions that you set to be real are automatically recognized by the is  and coulditbe commands and through them, by the rest of the Maple library.

As with everything else in Physics, you set the realobjects involved in your computation in Physics:-Setup, either entering the information in the Maple worksheet or using the Physics setup visual-applet.

Examples

This development is integrated with the commands is and coulditbe, and by extension, with the whole Maple library (conjugate, simplify, int, series, etc.), such that the real objects specified using Physics:-Setup are considered real by the whole system.

(126)

To query about the real objects at any moment,

(127)

Define a coordinate system:

(128)

(129)

(130)

(131)

(132)

(133)

Load the vector package:

(134)

The norm of the sum of two vectors:

(135)

(136)

Above, we see the norm computed in a general domain where vectors are complex. Frequently, however, vectors in Physics assume real values:

(137)

Expand now (135) 

(138)

You can unset real objects the same way as every other Physics setting, using the clear keyword of Setup:

(139)

(140)

(141)

Combining Powers of the Same Base

In Maple, if you enter , in order to receive , you need to use the combine command and the same happens with products of exponentials. The idea is to give you more control over the steps. On the other hand, depending on your problem, this level of control may be too elementary and an automatic combination of powers of the same base may be preferred. This combination of powers, for example, , is invalid when the exponents A and B do not commute (if A and B are matrices); unless A and B commute with their commutator . In this case, the combination can be done using Glauber's formula, which is related to Hausdorff's formula. These have both been implemented in Physics for Maple 18.

 

To address this situation and its nuances, Maple 18 allows you to turn the automatic combination of powers of the same base ON and OFF. This can be done without having to restart and includes the correct combination rules for noncommutative bases or exponents.

Examples

The starting value of combinepowersofsamebase is false:

(142)

Activate the feature:

(143)

From here on, powers of the same base are automatically combined when it is mathematically correct:

(144)

The combination is valid for noncommutative  provided that  and  commute:

(145)

(146)

(147)

You can turn this feature ON and OFF at any moment and continue computing:

(148)

(149)

(150)

(151)

(152)

(153)

Now, the combination cannot be performed.

(154)

(155)

(156)

For exponentials, Glauber's formula is automatically taken into account. For instance, set  and  to be noncommutative operators,  and  to commute with  ,  and  equal to the commutator of  and

(157)

Automatic combination of exponentials using Glauber's formula:

(158)

Turn the feature OFF and expand the previous result:

(159)

(160)

You can recombine this result as usual using combine:

(161)

Complex variables: z and  in equal footing

Generally speaking, there are two contexts for differentiating complex functions with respect to complex variables. In the first context, called the classical complex analysis, the derivatives of the complex components (abs, argument, conjugate, Im, Re, signum) with respect to complex variables do not exist (do not satisfy the Cauchy-Riemann conditions), with the exception of special cases. In the second context, first introduced by Poincare (also called Wirtinger calculus),  and its conjugate  are taken as independent variables, and all the six derivatives (Wirtinger derivatives) of the complex components are computable. In the first context, differentiation can only be performed on holomorphic functions. However, Wirtinger calculus permits extending complex differentiation to non-holomorphic functions provided that they are =-differentiable (i.e. differentiable functions of real and imaginary parts, taking  as a mapping ).  Correspondingly, Physics in Maple 18 implements:

a. 

Redefinition of the differentiation rules of the complex components: without loading Physics, these six derivatives are returned expressed in terms of the uncomputed higher order derivatives of abs and signum, as in previous Maple releases. After loading Physics, they return uncomputed, but the derivative of each complex component is expressed in terms of itself instead of abs and signum. This permits working with complex functions and their derivatives in a more natural way.

b. 

A new set of conversion routines allows for the six complex components and their derivatives in terms of any of the other components to be rewritten.

c. 

Optional work with d/dz and d/d as classical complex analysis differentiation operators (context 1), or Wirtinger differentiation operators (context 2), depending on the value of a new Physics Setup setting: usewirtingerderivatives.

Examples

(162)

The six complex components are:

(163)

New conversion routines to express any complex component in terms of the other ones:

(164)

(165)

(166)

The derivatives of these complex components return unevaluated. However, after loading Physics, they are expressed in terms of themselves (not in terms of unevaluated derivatives of abs and signum). The left-hand side is the inert representation for the derivative and the right-hand side is the actual derivative after being computed:

(167)

New: the same way we have  we now also have

(168)

With these changes, it is possible to compute field equations naturally. For instance, consider the following Lagrangian of a complex scalar field. For readability, make  have a compact display and derivatives be displayed indexed (see PDEtools:-declare)

(169)

The Lagrangian:

(170)

The corresponding action:

(171)

The field equation is computed in a natural way, taking the functional derivative of the action with respect to the field

(172)


Higher derivatives of signum are not anymore equal to  for all differentiation orders. They now also take into account the chain rule.

(173)

(174)

This is relevant in connection with the relationship between the derivative of signum and the Dirac delta function.

The derivative of  is now computable when

(175)

Derivatives of complex components can also be converted using the new convert routines.

(176)

(177)

(178)

(179)

Wirtinger calculus, with  and  in equal footing: this is perhaps the most important part of the changes performed regarding complex components. You can switch between using or not using Wirtinger derivatives in the middle of a worksheet without restarting Maple 18. Simply use the usewirtingerderivatives keyword of Setup.

(180)

In this Wirtinger context, the six derivatives of the non-holomorphic complex components are now computed as: (compare with (167))

(181)

Note that in this context  (this is the third derivative in the list (181)). Likewise, when ,

(182)

Redefine Sum for Multi-Index Summation

A new option, redefinesum, permits redefining the sum command, such that:

a. 

 The sum command can now perform multi-index summation. For example,  

b. 

 The sum command avoids premature evaluation of its arguments.


Without redefining the sum command, both features are also available by using the new Add command of the Physics:-Library.

Examples

By default, the sum command is not redefined. Therefore, the value of redefinesum is:

(183)

Multi-index summation is a summation performed over various indices at the same time for a pre-established value of the sum of these indices (lower and upper values).  The multi-index summation functionality is new in Maple 18 and available through the Physics:-Library:-Add command:

(184)

For instance, for n = 2,

(185)

This functionality can be plugged directly into the sum command. For that purpose, set redefinesum to true:

(186)

You can now perform multi-index summation directly from sum. The left-hand side is inert while the right-hand side is computed:

(187)

(188)

Indicate a lower value for the sum of the indices:

(189)

The formula for the integer power of a sum:

(190)

(191)

(192)

Verify whether this equation is true

(193)

Besides this new function, the redefined sum accomplishes a more modern/convenient handling of its arguments, consider:

(194)

In the following summation, j is a dummy summation index. As a result, the value assigned above, , is not expected to interfere with the summation. This is the case with the redefined sum:

(195)

Without redefining sum, the input above is interrupted with an error message due to the premature evaluation of the summation index. Similarly, in this other case:

(196)

The following two summations can be performed after having a redefined sum:

(197)

(198)

For the summation (197), without redefining sum, it returns 0 instead of unevaluated. This is because of a premature evaluation of the function  with an unassigned index i, before performing the summation. Returning unevaluated as (197) permits evaluating the sum at a later moment, for instance attributing a value to f as in (198).

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

(199)

(200)

Handling Vector structures, Matrices and equations:

(201)

Indicate that t is real:

(202)

Computing the Dagger (Hermitian conjugate) automatically maps Dagger on both sides of the equation:

(203)

A new shortcut notation is available: V^* for :

(204)

Load the Vectors package to compute with algebraic vectors instead of Matrix structures:

Dagger recognizes Vectorial differential operators from Physics:-Vectors, and because the differentiation variables of these operators are always real, it automatically maps over the operands.

(205)

(206)

(207)

(208)

Set two vectorial quantum operators:

(209)

(210)

(211)

Set an anticommutative prefix to eta,

(212)

(213)

(214)

Indicate that these anticommutative objects are scalars; set the system to display assumed variables without trailing tilde:

(215)

Compute the dagger of the product (213) again:

(216)

Furthermore, indicate that these numbers are real and compute the Dagger again:

(217)

(218)

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 , 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 , compute automatically using Physics:-Vectors:-Norm

• 

For an arbitrary vector  , make its Norm  =  and introduce a new option  to Norm, to specify whether to use  or  when computing .

• 

When  is a quantum operator, Norm returns using Dagger instead of conjugate.

• 

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

• 

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

(219)

In previous releases, the geometrical coordinates, Cartesian (), cylindrical () or spherical () could not be used or indexed to represent anything other than geometrical coordinates. In Maple 18, that restriction is removed. For example, you can use ,  and  to represent the components of a vector in the directions

(220)

(221)

(222)

(223)

(224)

When Vectors is loaded, all geometrical coordinates and related unit vectors are automatically considered real. New in Maple 18, you can also query about the real objects directly from Setup:

(225)

(226)

Dagger recognizes Vectorial differential operators from Physics:-Vectors, and because the differentiation variables of these operators are always real, it automatically maps over the operands:

(227)

(228)

(229)

(230)

The component of a vector is now automatically considered a tensor:

(231)

(232)

The absolute value of a vector is now automatically interpreted as its norm (on the left-hand side, the inert form of the absolute value; on the right-hand side, the active form)

(233)

The Norm of an arbitrary vector is now computed as its scalar product with its conjugate, so for instance for  in (220),

(234)

You can specify that you are working with real vectors (and want to compute the Norm without using conjugate) in two different ways:

1. 

Using the new optional argument of Norm.

(235)
2. 

Indicating that the components are real.

(236)

(237)

The same applies for vectorial quantum operators, but in that case Norm uses Dagger instead of conjugate, and the expression is symmetrized with respect to the Dagger operation. Consider,

(238)

and compare the following four different situations:

(239)

(240)

Now, set A_ and B_ to be quantum operators:

(241)

(242)

(243)

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

(244)

(245)

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

(246)

(247)

(248)

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

Examples for all these new routines are provided in the corresponding sections of the Physics Library help page.

Miscellaneous

• 

Implement formulas for abstract k, n both nonnegint entering  and , where  and  are Creation and Annihilation operators, respectively, acting on the 1st quantum number of the space of quantum states labeled .

• 

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,  

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

(249)

Construct Annihilation and Creation operators related to a quantum operator

(250)

(251)

(252)

Consider the action of  on the ket

(253)

(254)

However, if both k and n are nonnegative integers,

(255)

The action of the annihilation operator am can also be expressed using an exact formula for arbitrary nonnegative k.

(256)

The expression above is expressed using Pochhammer symbols to handle the case where  .  It can, however, be expressed in more familiar form using factorial:

(257)

New rules for changing variables in Bras, Kets and Brackets were implemented:

(258)

(259)

Library:-Degree can now operate on noncommutative dot and star products when the operation is not ambiguous.

(260)

(261)

You can also, formally, compute the degree "with respect to a vector" in a vector scalar product.

(262)

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. To illustrate this, define a couple of tensors

(263)

The default metric is not Euclidean.

Correspondingly, as distinction between covariant and contravariant indices is relevant, and although in algebraic contracted products of tensors it is not relevant which tensor is contravariant, the display shows one contracted index covariant, the other one contravariant:

(264)

Now set the spacetime metric to be Euclidean:

Contracted indices are now shown all covariant.

(265)

The "scalar" (dot) product of two operators,  and , is now represented with the noncommutative product operator `*` when neither  nor  involve Bras or Kets.

(266)

(267)

When A is a quantum operator (generic, Hermitian or unitary) the literal subscript object A__x for any x is now considered an operator of the same kind. The same happens when using anticommutative and noncommutative prefixes, or tensor indices - although in these cases the subscript should be an integer. So now this convention regarding the literal subscripted variables applies in general in the Physics package .

(268)

 

[A, A__1, A__x, A__operator]

(269)

(270)

(271)

[Z, Z__1]

(272)

The Normal command now automatically combines powers of the same base when normalizing expressions:

(273)

(274)

The normalization of noncommutative products when some of their operands commute and involve Dagger or conjugate is performed, such that these involving Dagger or conjugate are located to the left, more aligned with normal ordering in quantum field theories.

(275)

For an arbitrary operator nothing is known about  so the normal form of the product (275) is the product itself.

(276)

However, if these two operands commute, that is   then the product is normalized putting  to the left.

(277)

(278)

See Also

Index of New Maple 18 Features

Physics

The Physics project

 


Download Help Document