Maple has the most comprehensive support for physics of any mathematical software package.
Read more… 
The Maple Physics package delivers worldleading tools for performing calculations in theoretical physics. It works naturally with a large class of physics constructs, including:

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


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 stateoftheart 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 paperandpencil way of doing computations and providing textbookquality 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 subexpressions 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:
> 
Setup(mathematicalnotation = true); 

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

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


(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]; 

(5) 
Define some spacetime tensors for exploration


(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.

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

(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(, all); 


(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(); 

(10) 
The simplification and differentiation of tensorial expressions automatically uses Einstein's summation rule.
> 
diff(, A[rho]); 

(11) 
> 
Simplify(); 

(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]); 

(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_
A coordinate transformation taking the metric g_
to a conformal euclidean form, i.e. with line element proportional to
> 
TR := r = (1+2*m/(4*rho))^2*rho; 

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

(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); 

(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]; 

(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]; 

(19) 
> 
Riemann[nu, mu, beta, alpha]  Riemann[alpha, beta, nu, mu]; 

(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 and
> 
Christoffel[~1, 2, 2], Christoffel[1, 2, 2]; 

(21) 
The 2 x 2 matrix corresponding to (the first index is contravariant) is displayed when you pass the keyword matrix as an extra index
> 
Christoffel[~1, alpha, mu, matrix]; 

(22) 
Compare with the matrix for (so the first index is covariant and then not prefixed with ~)
> 
Christoffel[1, alpha, mu, matrix]; 

(23) 
The nonzero components of
> 
Christoffel[~mu, alpha, beta, nonzero]; 
For the all covariant you can pass all the indices covariant, or simpler: pass the keyword nonzero alone
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

(26) 
The Ricci tensor is defined in terms of the Riemann tensor as 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]; 

(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]; 

(28) 

(29) 
Alternatively, to save entering all the terms being added ( where is the number of contracted indices), you can use SumOverRepeatedIndices, optionally indicating the simplifier
> 
SumOverRepeatedIndices('Riemann[~alpha, beta, alpha, nu, matrix]', simplifier = simplify); 

(30) 
The Riemann
scalars
and for the current metric

(31) 
Rewrite the Riemann tensor with all its indices covariant in terms of Christoffel
symbols and their derivatives and construct a tensorarray for the resulting tensorial expression;in view of the presence of trigonometric functions, use the simplifier option
> 
Riemann[mu,nu,alpha,beta]; 

(32) 
> 
convert(, Christoffel); 

(33) 
> 
R := TensorArray(, simplifier = simplify); 

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

(35) 

(36) 
Compare all the nonzero values of the two arrays: for Riemann
, pass the option nonzero, for use ArrayElems
; the nonzero components are same:
> 
evalb(simplify(rhs((37)) = (38))); 

(39) 
The covariant derivative of

(40) 
> 
expand(); 

(41) 
The divergence of

(42) 
> 
expand(); 

(43) 
> 
simplify() assuming positive; 

(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 use PDEtools:declare
> 
PDEtools:declare(B(X)); 

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

(46) 
> 
convert(, d_); 

(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_)); 
> 
convert((48), Christoffel); 

(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}); 


(51) 
> 
a*theta[1]*theta[2] + b; 

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

(53) 
The coefficients of entering this series can be computed with the new Coefficients
> 
Coefficients(, theta[1]); 

(54) 
The series expansion of a mathematical function

(55) 
> 
Gtaylor(, theta); 

(56) 
The expansion of an arbitrary function
> 
F(x, y, theta[1], theta[2]); 

(57) 
> 
Gtaylor(, theta[1]); 

(58) 
Compare with the exact expansion performed with the new ToFieldComponents
> 
ToFieldComponents(, useonly); 


(59) 
Computing the Coefficients helps comparing more precisely
> 
Coefficients( = , theta[1], 0); 

(60) 
> 
Coefficients( = , theta[1], 1); 

(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(); 

(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 of commutative and anticommutative variables
> 
diff(Q(x, y, theta), x, theta) = 0; 

(63) 
Its solution using pdsolve, originally written to handle problems in a commutative domain
> 
PerformOnAnticommutativeSystem(pdsolve, []); 

(64) 
Note the presence of the anticommutative arbitrary constant , 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(); 

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