New Features in Maple 16: Physics

Next Feature


Maple has the most comprehensive support for physics of any mathematical software package.
Read more…

The Maple Physics package delivers world-leading tools for performing calculations in theoretical physics. It works naturally with a large class of physics constructs, including:

  • Spacetime metrics
  • Kronecker and Levi-Civita symmetric and antisymmetric symbols
  • Pauli and Dirac matrices
  • Spacetime differentiation operators
  • d'Alembertian, an n-dimensional Dirac function
  • Christoffel, Einstein, Ricci, Riemann, and Weyl tensors
  • Bras, Kets, and commands for performing vector calculus in a
    space of quantum states

physics

Maple's capabilities in this area are unmatched. Maple supports the widest breadth of concepts that can be represented and operated on. Maple supports conventional notation for physics objects and computations, so that your work in Maple matches how you would write the problems and solutions by hand.

This release provides the most significant evolution of the Physics package since its introduction in Maple 11, underscoring Maple's goal of having a state-of-the-art environment for algebraic computations in physics. The Physics package in Maple 16 includes 17 new commands that extend its functionality in vector and tensor analysis, general relativity, and quantum fields. In addition, a vast number of changes were introduced to support the goal of making the computational experience as natural as possible, resembling the paper-and-pencil way of doing computations and providing textbook-quality display of results.

New Features in Tensors for Special and General Relativity (See examples)

  • Maple 16 introduces a simple method to denote contravariant indices: in input, use a ~ prefix for contravariant indices; in output, they are displayed as superscripts, without the ~.
  • In a tensorial expression, you can enter any pair of contracted indices as a covariant/contravariant pair. It does not matter which one is of which kind, so you can also enter both as covariants or both as contravariants, and the system will automatically rewrite them so one is covariant and the other is contravariant.
  • A complete set of general relativity tensors were added, including the covariant derivative, Christoffel, LeviCivita in curvilinear coordinates, Einstein, Ricci, Riemann, and Weyl, all displayed using standard physics textbook notation.
  • You can compute with these tensors algebraically, as done with paper and pencil, automatically taking into account their symmetry properties, checking tensor indices in expressions, and differentiating or simplifying them using Einstein's sum rule for repeated indices.
  • A new set of working tools for general relativity include commands to perform transformations of coordinates in an arbitrary tensorial expression, create a tensor array to compute each of its tensorial components, expand the summation in expressions written using Einstein's sum rule for repeated indices, and substitute covariant and/or contravariant indices in tensorial expressions.
  • You can now use the Physics `.` product operator instead of * in order to "multiply and simplify" - in one step - contracted products of tensors. This allows you to simplify only the product sub-expressions you want while keeping the remaining products unsimplified.
  • A set of conversion routines allows you to rewrite expressions in terms of Christoffel symbols or derivatives of the metric, and to expand covariant derivatives.
  • The d_ indexed differential operator was extended to work also without indices, the same way as the new covariant D_, in order to compute differentials.
  • When working in curvilinear coordinates, the LeviCivita tensor can optionally be set to galilean or nongalilean, with its display automatically changing from
    to .
  • The new general relativity tensors update the values of their components automatically, on the fly, according to the changes you introduce in the spacetime metric. When the indices are integer numbers these tensors automatically return the corresponding value, taking into account the indices' character (covariant/contravariant), or return the whole set of nonzero values if requested.
  • When all but two of the indices of the relativity tensors are numeric (covariant or contravariant), you can see the corresponding 2 x 2 matrix by passing the keyword matrix in as an additional index. When no indices are passed, all the new tensors return an Array with all their covariant components. In the case of tensors of 2 indices, the corresponding Matrix is returned/displayed.
  • It is now possible to set the spacetime metric explicitly, or take it directly from a database of metrics having special properties known in the literature. The metric can be entered with Setup as a matrix, as a set with its nonzero components, or directly as the line element. Alternatively, you can simply pass the corresponding database keyword directly to the spacetime metric g_ command.
  • You can list all the database' metrics matches in order to refine a search and choose the desired one.
  • To represent a spacetime coordinate, it is now possible to use any desired list of names, including predefined cartesian, cylindrical, and spherical lists as in the Physics:-Vectors subpackage, using t to represent time. You can work with many systems of coordinates at the same time.
  • In galilean or nongalilean systems of references, spacetime tensors can simultaneously have spacetime and/or only space indices.
  • A new MetricSearch assistant in the DifferentialGeometry package permits searching a database of solutions to the Einstein equations.

New commands for Working with Expressions Involving Anticommutative Variables and Functions (See examples)

  • Gtaylor computes Taylor series with respect to anticommutative variables of expressions involving anticommutative variables.
  • ToFieldComponents and ToSuperfields provide core functionality needed to implement supermultiplets and supersymmetry.
  • PerformOnAnticommutativeSystem extends the capabilities of Maple commands outside the Physics package, making it possible for commands that were designed to solve problems involving commutative variables to now handle the corresponding generalized problems involving anticommutative variables.
  • The new Normal command is equivalent to a generalization of the standard normal command. Normal works on expressions simultaneously involving commutative, anticommutative, and noncommutative variables.
  • The new Coefficients command computes the coefficients of variables or functions in algebraic expressions involving anticommutative and noncommutative objects.
  • GrassmannParity returns 0, 1 or undefined according to whether the given object is commutative, anticommutative, or noncommutative.
  • Most of the symmetry commands of PDEtools were extended to handle anticommutative variables, including all of the PDEtools:-Library, so that all that functionality can now be used in Physics problems together with Physics commands.

New Commands for Vector Analysis

  • All the vector analysis routines of Physics:-Vectors can now compute with unit vectors and geometrical coordinates that have functional dependency, as in
    or the unit vector , enlarging their mathematical representation capabilities.
  • The knowledge about relationships between cartesian, cylindrical, and spherical coordinates was increased and then merged into Physics:-diff, so that now there is a unified differentiation command able to perform differentiation that automatically takes into account physics or geometrical contexts.
    Examples


Examples:


> with(Physics);

[`*`, `.`, Annihilation, AntiCommutator, Bra, Bracket, Check, Christoffel, Coefficients, Commutator, Coordinates, Creation, D_, Dagger, Define, Dgamma, Einstein, Expand, FeynmanDiagrams, Fundiff, Gras...
[`*`, `.`, Annihilation, AntiCommutator, Bra, Bracket, Check, Christoffel, Coefficients, Commutator, Coordinates, Creation, D_, Dagger, Define, Dgamma, Einstein, Expand, FeynmanDiagrams, Fundiff, Gras...
[`*`, `.`, Annihilation, AntiCommutator, Bra, Bracket, Check, Christoffel, Coefficients, Commutator, Coordinates, Creation, D_, Dagger, Define, Dgamma, Einstein, Expand, FeynmanDiagrams, Fundiff, Gras...
[`*`, `.`, Annihilation, AntiCommutator, Bra, Bracket, Check, Christoffel, Coefficients, Commutator, Coordinates, Creation, D_, Dagger, Define, Dgamma, Einstein, Expand, FeynmanDiagrams, Fundiff, Gras...
[`*`, `.`, Annihilation, AntiCommutator, Bra, Bracket, Check, Christoffel, Coefficients, Commutator, Coordinates, Creation, D_, Dagger, Define, Dgamma, Einstein, Expand, FeynmanDiagrams, Fundiff, Gras...
[`*`, `.`, Annihilation, AntiCommutator, Bra, Bracket, Check, Christoffel, Coefficients, Commutator, Coordinates, Creation, D_, Dagger, Define, Dgamma, Einstein, Expand, FeynmanDiagrams, Fundiff, Gras...
[`*`, `.`, Annihilation, AntiCommutator, Bra, Bracket, Check, Christoffel, Coefficients, Commutator, Coordinates, Creation, D_, Dagger, Define, Dgamma, Einstein, Expand, FeynmanDiagrams, Fundiff, Gras...
(1)

> Setup(mathematicalnotation = true);

[mathematicalnotation = true] (2)

When you load Physics the spacetime is set to Minkowski type. To see the current spacetime metric, enter it without indices

> g_[];

g_[mu, nu] = Matrix(%id = 18446744078138799158) (3)

To see the corresponding line element, pass in the keyword line_element; the differentials are expressed using d_

> g_[line_element];

`*`(`Systems of spacetime Coordinates are: `, `*`({X = (x1, x2, x3, x4)}))
Typesetting:-mprintslash([`+`(`-`(`*`(`^`(Physics:-d_(x1), 2))), `-`(`*`(`^`(Physics:-d_(x2), 2))), `-`(`*`(`^`(Physics:-d_(x3), 2))), `*`(`^`(Physics:-d_(x4), 2)))], [`+`(`-`(`*`(`^`(Physics:-d_(x1),... (4)

For algebraic computing with tensors, Maple 16 introduces contravariant indices in a simple way: to indicate that an index is contravariant, prefix it with ~ (tilde)

> g_[mu, nu], g_[mu, ~nu], g_[~mu, ~nu];

Physics:-g_[mu, nu], Physics:-g_[mu, `~nu`], Physics:-g_[`~mu`, `~nu`] (5)

Define some spacetime tensors for exploration

> Define(A, B);

`Defined objects with tensor properties`
Typesetting:-mprintslash([{A, B, Physics:-D_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], X[mu], Ph... (6)

For all the tensors defined, the Physics commands will use the Einstein sum rule for repeated indices when manipulating them (simplification, differentiation, etc.). You can enter any pair of contracted indices: one covariant and the other contravariant, both covariant, or both contravariant. The system will automatically rewrite them as one covariant and the other contravariant.

> g_[mu, nu]^2;

`*`(Physics:-g_[mu, nu], `*`(Physics:-g_[`~mu`, `~nu`])) (7)

> g_[alpha, mu] * A[mu] * g_[alpha, nu] * B[nu, sigma, sigma];

`*`(B[nu, sigma, `~sigma`], `*`(Physics:-g_[alpha, mu], `*`(Physics:-g_[`~alpha`, `~nu`], `*`(A[`~mu`])))) (8)

In this way you do not need to focus your attention on the covariant/contravariant character of repeated indices when entering expressions. To check and determine the repeated and free indices use Check.

> Check(`*`(B[nu, sigma, `~sigma`], `*`(Physics:-g_[alpha, mu], `*`(Physics:-g_[`~alpha`, `~nu`], `*`(A[`~mu`])))), all);

`*`(`The repeated indices per term are: `[{`...`}, {`...`}, `...`], `*`(`;</span> the free indices are: `, `*`({`...`})))
[{alpha, mu, nu, sigma}], {} (9)

To expand the summation over repeated indices implied in Einstein's summation convention, taking into account the covariant and contravariant character of the indices, use SumOverRepeatedIndices.

> SumOverRepeatedIndices(`*`(B[nu, sigma, `~sigma`], `*`(Physics:-g_[alpha, mu], `*`(Physics:-g_[`~alpha`, `~nu`], `*`(A[`~mu`])))));

`+`(`*`(`+`(B[1, 1, `~1`], B[1, 2, `~2`], B[1, 3, `~3`], B[1, 4, `~4`]), `*`(A[`~1`])), `*`(`+`(B[2, 1, `~1`], B[2, 2, `~2`], B[2, 3, `~3`], B[2, 4, `~4`]), `*`(A[`~2`])), `*`(`+`(B[3, 1, `~1`], B[3, ...
`+`(`*`(`+`(B[1, 1, `~1`], B[1, 2, `~2`], B[1, 3, `~3`], B[1, 4, `~4`]), `*`(A[`~1`])), `*`(`+`(B[2, 1, `~1`], B[2, 2, `~2`], B[2, 3, `~3`], B[2, 4, `~4`]), `*`(A[`~2`])), `*`(`+`(B[3, 1, `~1`], B[3, ...
(10)

The simplification and differentiation of tensorial expressions automatically uses Einstein's summation rule.

> diff(`*`(B[nu, sigma, `~sigma`], `*`(Physics:-g_[alpha, mu], `*`(Physics:-g_[`~alpha`, `~nu`], `*`(A[`~mu`])))), A[rho]);

`*`(B[nu, sigma, `~sigma`], `*`(Physics:-g_[alpha, mu], `*`(Physics:-g_[`~alpha`, `~nu`], `*`(Physics:-g_[rho, `~mu`])))) (11)

> Simplify(`*`(B[nu, sigma, `~sigma`], `*`(Physics:-g_[alpha, mu], `*`(Physics:-g_[`~alpha`, `~nu`], `*`(Physics:-g_[rho, `~mu`])))));

B[rho, sigma, `~sigma`] (12)

Besides its use in quantum mechanics, the Physics `.` operator is now also a handy shortcut that lets you  "multiply and simplify" contracted indices in one step. This is useful when handling expressions where you want the contraction to be simplified right away or only in some places. Recalling that multiplication is left associative, you may need to put parenthesis to get what you want. For example, replace in (6)> only the third `*` by `.`

> g_[alpha, mu] * A[mu] * (g_[alpha, nu] . B[nu, sigma, sigma]);

`*`(B[alpha, sigma, `~sigma`], `*`(Physics:-g_[mu, `~alpha`], `*`(A[`~mu`]))) (13)

Set the spacetime metric to be the Schwarzschild in spherical coordinates: you can now do that in various manners, the simplest of which is to pass part of the identifying keyword directly to the metric tensor g_

> g_[sc];

`*`(`Systems of spacetime Coordinates are: `, `*`({X = (r, theta, phi, t)}))
`The Schwarzschild metric in coordinates `[r, theta, phi, t]
`Parameters: `[m]
g_[mu, nu] = Matrix(%id = 18446744078138799278) (14)

A coordinate transformation taking the metric g_ to a conformal euclidean form, i.e. with line element proportional to `+`(`*`(`^`(`∂</span>`(rho), 2)), `*`(`^`(rho, 2), `*`(`+`(`*`(`^`(`∂</span>`(theta), 2)), `*`(`^`(sin(theta), 2), `*`(`^`(`∂</span>`(phi), 2)))))))

> TR := r = (1+2*m/(4*rho))^2*rho;

Typesetting:-mprintslash([TR := r = `*`(`^`(`+`(1, `/`(`*`(`/`(1, 2), `*`(m)), `*`(rho))), 2), `*`(rho))], [r = `*`(`^`(`+`(1, `/`(`*`(`/`(1, 2), `*`(m)), `*`(rho))), 2), `*`(rho))]) (15)

> TransformCoordinates(TR, g_[mu, nu], [rho, theta, phi, t]);

Matrix(%id = 18446744078138799638) (16)

Check the line element using the related option; the differentials of the coordinates are expressed using d_

> TransformCoordinates(TR, g_[mu, nu], [rho, theta, phi, t], output = line_element);

Typesetting:-mprintslash([`+`(`-`(`/`(`*`(`/`(1, 16), `*`(`^`(`+`(`*`(2, `*`(rho)), m), 4), `*`(`+`(`*`(`^`(Physics:-d_(rho), 2)), `*`(`+`(`*`(`^`(Physics:-d_(theta), 2)), `*`(`^`(sin(theta), 2), `*`(... (17)

TransformCoordinates does not set the metric to the result of the transformation; you can do that by passing its output to Setup.

The general relativity tensors automatically update their value when you set the metric. The contraction of all the indices of the Riemann tensor for the Schwarzschild metric:

> Riemann[alpha,beta,mu,nu] . Riemann[alpha,beta,mu,nu];

`+`(`/`(`*`(48, `*`(`^`(m, 2))), `*`(`^`(r, 6)))) (18)

The indices of these tensors are automatically sorted according to their symmetry properties when computing with them algebraically, which facilitates zero recognition:

> Riemann[mu, mu, beta, alpha];

0 (19)

> Riemann[nu, mu, beta, alpha] - Riemann[alpha, beta, nu, mu];

`+`(`*`(2, `*`(Physics:-Riemann[alpha, beta, mu, nu]))) (20)

Besides algebraic computations, it is possible to check the value of all or subsets of the tensor's components in a visual way. The values of GAMMA[2, 2] and GAMMA[1, 2, 2]

> Christoffel[~1, 2, 2], Christoffel[1, 2, 2];

`+`(`-`(r), `*`(2, `*`(m))), r (21)

The 2 x 2 matrix corresponding to GAMMA[alpha, beta] (the first index is contravariant) is displayed when you pass the keyword matrix as an extra index

> Christoffel[~1, alpha, mu, matrix];

Christoffel[`~1`, alpha, mu] = Matrix(%id = 18446744078156960342) (22)

Compare with the matrix for GAMMA[1, alpha, beta] (so the first index is covariant and then not prefixed with ~)

> Christoffel[1, alpha, mu, matrix];

Christoffel[1, alpha, mu] = Matrix(%id = 18446744078156960942) (23)

The nonzero components of `^`(GAMMA[alpha, beta], mu)

> Christoffel[~mu, alpha, beta, nonzero];

Physics:-Christoffel[`~mu`, alpha, beta] = {(1, 1, 1) = `/`(`*`(m), `*`(r, `*`(`+`(`-`(r), `*`(2, `*`(m)))))), (1, 2, 2) = `+`(`-`(r), `*`(2, `*`(m))), (1, 3, 3) = `*`(`+`(`-`(r), `*`(2, `*`(m))), `*`...
Physics:-Christoffel[`~mu`, alpha, beta] = {(1, 1, 1) = `/`(`*`(m), `*`(r, `*`(`+`(`-`(r), `*`(2, `*`(m)))))), (1, 2, 2) = `+`(`-`(r), `*`(2, `*`(m))), (1, 3, 3) = `*`(`+`(`-`(r), `*`(2, `*`(m))), `*`...
Physics:-Christoffel[`~mu`, alpha, beta] = {(1, 1, 1) = `/`(`*`(m), `*`(r, `*`(`+`(`-`(r), `*`(2, `*`(m)))))), (1, 2, 2) = `+`(`-`(r), `*`(2, `*`(m))), (1, 3, 3) = `*`(`+`(`-`(r), `*`(2, `*`(m))), `*`...
Physics:-Christoffel[`~mu`, alpha, beta] = {(1, 1, 1) = `/`(`*`(m), `*`(r, `*`(`+`(`-`(r), `*`(2, `*`(m)))))), (1, 2, 2) = `+`(`-`(r), `*`(2, `*`(m))), (1, 3, 3) = `*`(`+`(`-`(r), `*`(2, `*`(m))), `*`...
(24)

For the all covariant GAMMA[mu, alpha, beta] you can pass all the indices covariant, or simpler: pass the keyword nonzero alone

> Christoffel[nonzero];

Physics:-Christoffel[mu, nu, alpha] = {(1, 1, 1) = `/`(`*`(m), `*`(`^`(`+`(`-`(r), `*`(2, `*`(m))), 2))), (1, 2, 2) = r, (1, 3, 3) = `*`(r, `*`(`^`(sin(theta), 2))), (1, 4, 4) = `+`(`-`(`/`(`*`(m), `*...
Physics:-Christoffel[mu, nu, alpha] = {(1, 1, 1) = `/`(`*`(m), `*`(`^`(`+`(`-`(r), `*`(2, `*`(m))), 2))), (1, 2, 2) = r, (1, 3, 3) = `*`(r, `*`(`^`(sin(theta), 2))), (1, 4, 4) = `+`(`-`(`/`(`*`(m), `*...
Physics:-Christoffel[mu, nu, alpha] = {(1, 1, 1) = `/`(`*`(m), `*`(`^`(`+`(`-`(r), `*`(2, `*`(m))), 2))), (1, 2, 2) = r, (1, 3, 3) = `*`(r, `*`(`^`(sin(theta), 2))), (1, 4, 4) = `+`(`-`(`/`(`*`(m), `*...
Physics:-Christoffel[mu, nu, alpha] = {(1, 1, 1) = `/`(`*`(m), `*`(`^`(`+`(`-`(r), `*`(2, `*`(m))), 2))), (1, 2, 2) = r, (1, 3, 3) = `*`(r, `*`(`^`(sin(theta), 2))), (1, 4, 4) = `+`(`-`(`/`(`*`(m), `*...
(25)
With the Schwarzschild metric, the Ricci tensor has all its components equal to zero. To see the matrix form, either pass the keyword matrix, or simpler: pass no indices

> Ricci[];

Ricci[mu, nu] = Matrix(%id = 18446744078156963702) (26)

The Ricci tensor is defined in terms of the Riemann tensor as R[mu, nu] = `^`(R[mu, alpha, nu], alpha) You can see how the four Riemann matrices add to form the Ricci matrix; for this purpose give values to the 1st and 3rd indices and pass the extra keyword matrix. This is the first matrix

> Riemann[~1, beta, 1, nu, matrix];

Riemann[`~1`, beta, 1, nu] = Matrix(%id = 18446744078156958886) (27)

To add the four of them use +

> Riemann[~1, beta, 1, nu, matrix] + Riemann[~2, beta, 2, nu, matrix] + Riemann[~3, beta, 3, nu, matrix] + Riemann[~4, beta, 4, nu, matrix];

`+`(Riemann[`~1`, beta, 1, nu], Riemann[`~2`, beta, 2, nu], Riemann[`~3`, beta, 3, nu], Riemann[`~4`, beta, 4, nu]) = Matrix(%id = 18446744078156952750) (28)

> simplify((28));

`+`(Riemann[`~1`, beta, 1, nu], Riemann[`~2`, beta, 2, nu], Riemann[`~3`, beta, 3, nu], Riemann[`~4`, beta, 4, nu]) = Matrix(%id = 18446744078156947574) (29)

Alternatively, to save entering all the terms being added (`^`(4, n) where n is the number of contracted indices), you can use SumOverRepeatedIndices, optionally indicating the simplifier

> SumOverRepeatedIndices('Riemann[~alpha, beta, alpha, nu, matrix]', simplifier = simplify);

`+`(Riemann[`~1`, beta, 1, nu], Riemann[`~2`, beta, 2, nu], Riemann[`~3`, beta, 3, nu], Riemann[`~4`, beta, 4, nu]) = Matrix(%id = 18446744078156949494) (30)

The Riemann scalars
and for the current metric

> Riemann[scalars];

S[1] = `/`(`*`(`^`(m, 2)), `*`(`^`(r, 6))), S[2] = `+`(`-`(`/`(`*`(`^`(m, 3)), `*`(`^`(r, 9))))) (31)

Rewrite the Riemann tensor with all its indices covariant in terms of Christoffel symbols and their derivatives and construct a tensor-array for the resulting tensorial expression;in view of the presence of trigonometric functions, use the simplifier option

> Riemann[mu,nu,alpha,beta];

Physics:-Riemann[alpha, beta, mu, nu] (32)

> convert(Physics:-Riemann[alpha, beta, mu, nu], Christoffel);

Typesetting:-mprintslash([`*`(Physics:-g_[alpha, lambda], `*`(`+`(Physics:-d_[mu](Physics:-Christoffel[`~lambda`, beta, nu], [X]), `-`(Physics:-d_[nu](Physics:-Christoffel[`~lambda`, beta, mu], [X])),... (33)

> R := TensorArray(Typesetting:-mprintslash([`*`(Physics:-g_[alpha, lambda], `*`(`+`(Physics:-d_[mu](Physics:-Christoffel[`~lambda`, beta, nu], [X]), `-`(Physics:-d_[nu](Physics:-Christoffel[`~lambda`, beta, mu], [X])),..., simplifier = simplify);

R := Vector[column](%id = 18446744078156944078) (34)

Verify the result comparing R, constructed with the definition of Riemann in terms of Christoffel symbols, with the Riemann tensor itself

> R[1, 3, 1, 3];

`+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`+`(`-`(r), `*`(2, `*`(m))))))) (35)

> Riemann[1, 3, 1, 3];

`+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`+`(`-`(r), `*`(2, `*`(m))))))) (36)

Compare all the nonzero values of the two arrays: for Riemann , pass the option nonzero, for R use ArrayElems ; the nonzero components are same:

> Riemann[nonzero];

Physics:-Riemann[mu, nu, alpha, beta] = {(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/...
Physics:-Riemann[mu, nu, alpha, beta] = {(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/...
Physics:-Riemann[mu, nu, alpha, beta] = {(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/...
Physics:-Riemann[mu, nu, alpha, beta] = {(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/...
Physics:-Riemann[mu, nu, alpha, beta] = {(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/...
Physics:-Riemann[mu, nu, alpha, beta] = {(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/...
Physics:-Riemann[mu, nu, alpha, beta] = {(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/...
Physics:-Riemann[mu, nu, alpha, beta] = {(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/...
(37)

> ArrayElems(R);

{(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`...
{(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`...
{(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`...
{(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`...
{(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`...
{(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`...
{(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`...
{(1, 2, 1, 2) = `+`(`-`(`/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))))), (1, 2, 2, 1) = `/`(`*`(m), `*`(`+`(`-`(r), `*`(2, `*`(m))))), (1, 3, 1, 3) = `+`(`-`(`/`(`*`(m, `*`(`^`(sin(theta), 2))), `*`(`...
(38)

> evalb(simplify(rhs((37)) = (38)));

true (39)

The covariant derivative of A[nu](r, theta, phi, t)

> D_[mu](A[nu](X));

Typesetting:-mprintslash([Physics:-D_[mu](A[nu](X), [X])], [Physics:-D_[mu](A[nu](X), [X])]) (40)

> expand(Typesetting:-mprintslash([Physics:-D_[mu](A[nu](X), [X])], [Physics:-D_[mu](A[nu](X), [X])]));

Typesetting:-mprintslash([`+`(Physics:-d_[mu](A[nu](X), [X]), `-`(`*`(Physics:-Christoffel[`~alpha`, mu, nu], `*`(A[alpha](X)))))], [`+`(Physics:-d_[mu](A[nu](X), [X]), `-`(`*`(Physics:-Christoffel[`~... (41)

The divergence of A[mu](r, theta, phi, t)

> D_[mu](A[mu](X));

Typesetting:-mprintslash([Physics:-D_[mu](A[`~mu`](X), [X])], [Physics:-D_[mu](A[`~mu`](X), [X])]) (42)

> expand(Typesetting:-mprintslash([Physics:-D_[mu](A[`~mu`](X), [X])], [Physics:-D_[mu](A[`~mu`](X), [X])]));

Typesetting:-mprintslash([`/`(`*`(`+`(`/`(`*`(`/`(1, 2), `*`(A[`~mu`](X), `*`(`+`(`*`(4, `*`(`^`(r, 3), `*`(`^`(sin(theta), 2), `*`(Physics:-KroneckerDelta[mu, `~1`])))), `*`(2, `*`(`^`(r, 4), `*`(sin... (43)

> simplify(Typesetting:-mprintslash([`/`(`*`(`+`(`/`(`*`(`/`(1, 2), `*`(A[`~mu`](X), `*`(`+`(`*`(4, `*`(`^`(r, 3), `*`(`^`(sin(theta), 2), `*`(Physics:-KroneckerDelta[mu, `~1`])))), `*`(2, `*`(`^`(r, 4), `*`(sin...) assuming positive;

Typesetting:-mprintslash([`/`(`*`(`+`(`*`(2, `*`(A[`~mu`](X), `*`(sin(theta), `*`(Physics:-KroneckerDelta[mu, `~1`])))), `*`(A[`~mu`](X), `*`(r, `*`(cos(theta), `*`(Physics:-KroneckerDelta[mu, `~2`]))... (44)

You can simplify the remaining contracted indices using Simplify. The covariant derivative for a tensor with mixed indices; in some cases expand will expand not just the covariant derivative; you can be more selective using convert; to avoid redundant display of the functionality of B use PDEtools:-declare

> PDEtools:-declare(B(X));

Typesetting:-mprintslash([`*`(B(r, theta, phi, t), `*`(`will now be displayed as`, `*`(B)))], [`*`(B(r, theta, phi, t), `*`(`will now be displayed as`, `*`(B)))]) (45)

> D_[mu](B[~alpha, beta, ~nu](X));

Typesetting:-mprintslash([Physics:-D_[mu](B[`~alpha`, beta, `~nu`], [X])], [Physics:-D_[mu](B[`~alpha`, beta, `~nu`](X), [X])]) (46)

> convert(Typesetting:-mprintslash([Physics:-D_[mu](B[`~alpha`, beta, `~nu`], [X])], [Physics:-D_[mu](B[`~alpha`, beta, `~nu`](X), [X])]), d_);

Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(Physics:-Christoffel[`~kappa`, beta, mu], `*`(B[`~alpha`, kappa, `~nu`]))), `*`(Physics:-Christoffel[`~alpha`, kap... (47)

This expression can be rewritten in different ways. For example, rewrite Christoffel in terms of g_ and its derivatives, expand, then revert back the transformation

> expand(convert((47), g_));

Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(`/`(1, 2), `*`(Physics:-g_[`~kappa`, `~sigma`], `*`(B[`~alpha`, kappa, `~nu`], `*`(Physics:-d_[mu](Physics:-g_[bet...
Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(`/`(1, 2), `*`(Physics:-g_[`~kappa`, `~sigma`], `*`(B[`~alpha`, kappa, `~nu`], `*`(Physics:-d_[mu](Physics:-g_[bet...
Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(`/`(1, 2), `*`(Physics:-g_[`~kappa`, `~sigma`], `*`(B[`~alpha`, kappa, `~nu`], `*`(Physics:-d_[mu](Physics:-g_[bet...
(48)

> convert((48), Christoffel);

Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(`/`(1, 2), `*`(Physics:-g_[`~kappa`, `~sigma`], `*`(B[`~alpha`, kappa, `~nu`], `*`(`+`(Physics:-Christoffel[sigma,...
Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(`/`(1, 2), `*`(Physics:-g_[`~kappa`, `~sigma`], `*`(B[`~alpha`, kappa, `~nu`], `*`(`+`(Physics:-Christoffel[sigma,...
Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(`/`(1, 2), `*`(Physics:-g_[`~kappa`, `~sigma`], `*`(B[`~alpha`, kappa, `~nu`], `*`(`+`(Physics:-Christoffel[sigma,...
Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(`/`(1, 2), `*`(Physics:-g_[`~kappa`, `~sigma`], `*`(B[`~alpha`, kappa, `~nu`], `*`(`+`(Physics:-Christoffel[sigma,...
Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(`/`(1, 2), `*`(Physics:-g_[`~kappa`, `~sigma`], `*`(B[`~alpha`, kappa, `~nu`], `*`(`+`(Physics:-Christoffel[sigma,...
(49)

> Simplify((49));

Typesetting:-mprintslash([`+`(Physics:-d_[mu](B[`~alpha`, beta, `~nu`], [X]), `-`(`*`(Physics:-Christoffel[sigma, beta, mu], `*`(B[`~alpha`, `~sigma`, `~nu`]))), `*`(Physics:-Christoffel[`~alpha`, kap... (50)

New commands for working with anticommutative variables and functions

Set first theta and Q as identifiers to work with type/anticommutative variables and functions.

> Setup(anticommutativepre = {theta, Q});

`* Partial match of  'anticommutativepre' against keyword 'anticommutativeprefix'`
[anticommutativeprefix = {Q, _lambda, theta}] (51)

> a*theta[1]*theta[2] + b;

Typesetting:-mprintslash([`+`(`*`(a, `*`(Physics:-`*`(theta[1], theta[2]))), b)], [`+`(`*`(a, `*`(Physics:-`*`(theta[1], theta[2]))), b)]) (52)

The taylor series with respect to theta[1] of a polynomial in theta[1] of degree 1 is the polynomial itself; it can be computed with the new Gtaylor command

> Gtaylor(Typesetting:-mprintslash([`+`(`*`(a, `*`(Physics:-`*`(theta[1], theta[2]))), b)], [`+`(`*`(a, `*`(Physics:-`*`(theta[1], theta[2]))), b)]), theta[1]);

Typesetting:-mprintslash([`+`(`*`(a, `*`(Physics:-`*`(theta[1], theta[2]))), b)], [`+`(`*`(a, `*`(Physics:-`*`(theta[1], theta[2]))), b)]) (53)

The coefficients of theta[1] entering this series can be computed with the new Coefficients

> Coefficients(Typesetting:-mprintslash([`+`(`*`(a, `*`(Physics:-`*`(theta[1], theta[2]))), b)], [`+`(`*`(a, `*`(Physics:-`*`(theta[1], theta[2]))), b)]), theta[1]);

b, `*`(a, `*`(theta[2])) (54)

The series expansion of a mathematical function

> exp(x*theta);

exp(`*`(x, `*`(theta))) (55)

> Gtaylor(exp(`*`(x, `*`(theta))), theta);

`+`(1, `*`(x, `*`(theta))) (56)

The expansion of an arbitrary function

> F(x, y, theta[1], theta[2]);

F(x, y, theta[1], theta[2]) (57)

> Gtaylor(F(x, y, theta[1], theta[2]), theta[1]);

Typesetting:-mprintslash([`+`(F(x, y, 0, theta[2]), Physics:-`*`((D[3](F))(x, y, 0, theta[2]), theta[1]))], [`+`(F(x, y, 0, theta[2]), Physics:-`*`((D[3](F))(x, y, 0, theta[2]), theta[1]))]) (58)

Compare with the exact expansion performed with the new ToFieldComponents

> ToFieldComponents(F(x, y, theta[1], theta[2]), useonly);

`* Partial match of  'useonly' against keyword 'useonlycommutativefunctions'`
Typesetting:-mprintslash([`+`(_F1(x, y), `*`(_F2(x, y), `*`(Physics:-`*`(_lambda1, theta[1]))), `*`(_F3(x, y), `*`(Physics:-`*`(_lambda2, theta[2]))), `*`(_F4(x, y), `*`(Physics:-`*`(theta[1], theta[2... (59)

Computing the Coefficients helps comparing more precisely

> Coefficients(Typesetting:-mprintslash([`+`(F(x, y, 0, theta[2]), Physics:-`*`((D[3](F))(x, y, 0, theta[2]), theta[1]))], [`+`(F(x, y, 0, theta[2]), Physics:-`*`((D[3](F))(x, y, 0, theta[2]), theta[1]))]) = `* Partial match of  'useonly' against keyword 'useonlycommutativefunctions'`, theta[1], 0);

Typesetting:-mprintslash([F(x, y, 0, theta[2]) = `+`(_F1(x, y), `*`(_F3(x, y), `*`(Physics:-`*`(_lambda2, theta[2]))))], [F(x, y, 0, theta[2]) = `+`(_F1(x, y), `*`(_F3(x, y), `*`(Physics:-`*`(_lambda2... (60)

> Coefficients(Typesetting:-mprintslash([`+`(F(x, y, 0, theta[2]), Physics:-`*`((D[3](F))(x, y, 0, theta[2]), theta[1]))], [`+`(F(x, y, 0, theta[2]), Physics:-`*`((D[3](F))(x, y, 0, theta[2]), theta[1]))]) = `* Partial match of  'useonly' against keyword 'useonlycommutativefunctions'`, theta[1], 1);

(D[3](F))(x, y, 0, theta[2]) = `+`(`-`(`*`(_F2(x, y), `*`(_lambda1))), `*`(_F4(x, y), `*`(theta[2]))) (61)

ToFieldComponents keeps track of the expansions it performs, so there is memory of the superfield behind the field components introduced, so that it can be reconstructed from these components - the command for that purpose is ToSuperfields

> ToSuperfields(`* Partial match of  'useonly' against keyword 'useonlycommutativefunctions'`);

F(x, y, theta[1], theta[2]) (62)

ToFieldComponents and ToSuperfields provide core functionality for working with supersymmetric theories. Another new command, extending to anticommutative variables some of the existing Maple functionality for commutative variables is PerformOnAnticommutativeSystem

Consider this partial differential equation for the anticommutative function Q of commutative and anticommutative variables x, theta

> diff(Q(x, y, theta), x, theta) = 0;

Typesetting:-mprintslash([Q[x, theta] = 0], [Physics:-diff(diff(Q(x, y, theta), x), theta) = 0]) (63)

Its solution using pdsolve, originally written to handle problems in a commutative domain

> PerformOnAnticommutativeSystem(pdsolve, [Typesetting:-mprintslash([Q[x, theta] = 0], [Physics:-diff(diff(Q(x, y, theta), x), theta) = 0])]);

Q(x, y, theta) = `+`(`*`(_F5(x, y), `*`(_lambda3)), `*`(_F7(y), `*`(theta))) (64)

Note the presence of the anticommutative arbitrary  constant `_λ2`, introduced by dsolve when solving intermediate ordinary differential equations. In fact both dsolve and pdsolve in Maple 16 use this approach, calling on PerformOnAnticommutativeSystem internally so that they can tackle the problem directly:

> pdsolve(Typesetting:-mprintslash([Q[x, theta] = 0], [Physics:-diff(diff(Q(x, y, theta), x), theta) = 0]));

Q(x, y, theta) = `+`(`*`(_F5(x, y), `*`(_lambda3)), `*`(_F7(y), `*`(theta))) (65)

Various commands of the PDEtools package in Maple 16 handle anticommutative variables by means of passing the problem to PerformOnAnticommutativeSystem.


Next Feature

How to Proceed:   Pricing & Purchase Evaluate Upgrade Get Price Quote Buy Online