LeviCivita - Maple Help

Physics[LeviCivita] - The LeviCivita tensor

 Calling Sequence LeviCivita[alpha, beta, mu, nu, ...]

Parameters

 alpha, beta, mu, nu, ... - the indices, as names representing integer numbers between 0 and the dimension (number of indices); they can also be the numbers themselves

Description

 • LeviCivita[alpha, beta, mu, nu, ...], displayed as ${\mathrm{\epsilon }}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu },\mathrm{...}}$ or ${\mathrm{Ε}}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu },\mathrm{...}}$, respectively for the galilean and nongalilean case, is a computational representation for the totally antisymmetric LeviCivita pseudo-tensor.
 • The number of indices in LeviCivita is not restricted to the spacetime dimension. It can be used as well as a totally antisymmetric tensor in arbitrary dimensions (minimum = 2).
 • The generic antisymmetric symbol, also called galilean LeviCivita, is equal to 1 when all its indices are integers, ordered from 0 to the dimension or any even permutation of that ordering, -1 for any odd permutation of that ordering, and 0 when any of the indices is repeated.
 • In the nongalilean case, that is the generalization of the galilean case to curvilinear coordinates, say in 4 dimensions, the all-contravariant LeviCivita[alpha, beta, mu, nu] is defined in terms of the galilean case by

${\mathrm{Ε}}^{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}=\frac{1}{\sqrt{-g}}{\mathrm{ϵ}}^{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}$

 where $g$ is the determinant of the spacetime metric. Using the formula

${\mathrm{ϵ}}^{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}{g}_{\mathrm{\alpha },\mathrm{\gamma }}{g}_{\mathrm{\beta },\mathrm{\rho }}{g}_{\mathrm{\mu },\mathrm{\sigma }}{g}_{\mathrm{\nu },\mathrm{\tau }}=-g{\mathrm{ϵ}}_{\mathrm{\gamma },\mathrm{\rho },\mathrm{\sigma },\mathrm{\tau }}$

 and taking into account the definition for the all-contravariant case given above, the all-covariant case is given by

${\mathrm{Ε}}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}=\sqrt{-g}{\mathrm{ϵ}}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}$

 • In the Maple worksheet, by default, LeviCivita represents the galilean case, even when working in curvilinear coordinates, with a nongalilean spacetime metric. To set LeviCivita to represent the nongalilean case enter Setup(levicivita = nongalilean).
 • When the indices of LeviCivita assume integer values they are expected to be between 0 and the dimension (number of indices), and the corresponding value of LeviCivita is returned. The values 0 and 4, or for the case any dimension set for the spacetime, represent the same object. When the indices have symbolic values LeviCivita returns unevaluated after normalizing its indices taking into account its totally antisymmetric property.
 • Computations performed with the Physics package commands take into account Einstein's sum rule for repeated indices - see . and Simplify. The distinction between covariant and contravariant indices in the input of tensors is done by prefixing contravariant ones with ~, say as in ~mu; in the output, contravariant indices are displayed as superscripts. For contracted indices, you can enter them one covariant and one contravariant. Note however that - provided that the spacetime metric is galilean (Euclidean or Minkowski), or the object is a tensor also in curvilinear coordinates - this distinction in the input is not relevant, and so contracted indices can be entered as both covariant or both contravariant, in which case they will be automatically rewritten as one covariant and one contravariant. Tensors can have spacetime and space indices at the same time. To change the type of letter used to represent spacetime or space indices see Setup.
 • When Physics is loaded, the default spacetime is galilean, of Minkowski type. To set the spacetime metric to something different use Setup. During a Maple session, the value of the components of the general relativity tensors of Physics, that is: Christoffel, the covariant derivative D_, Einstein, the nongalilean LeviCivita, Ricci, Riemann and Weyl, automatically follows the value or any changes introduced in the components of the spacetime metric.
 • Besides being indexed with two indices, LeviCivita accepts the following keywords as an index:
 – array: (synonym: matrix, Matrix, Array, or no indices whatsoever, as in LeviCivita[]) returns an Array that when indexed with numerical values from 1 to the dimension (number of indices in LeviCivita[mu, nu, ...]) it returns the value of each of the components of LeviCivita. If this keyword is passed together with indices, that can be covariant or contravariant, the resulting Matrix takes into account the character of the indices. If only two of these indices are names, the rest have numerical values (if contravariant then preceded by ~), the returned object is the corresponding 2 x 2 Matrix.
 – nonzero: returns a set of equations, with the left-hand-side as a sequence of two positive numbers identifying the element of LeviCivita and the corresponding value on the right-hand-side. Note that this set is actually the output of the ArrayElems command when passing to it the Array obtained with the keyword array.
 • Some automatic checking and normalization are carried out each time you enter LeviCivita[...]. The checking is concerned with possible unexpected values of the indices. The automatic normalization takes into account the symmetry of LeviCivita[mu,nu] with respect to interchanging the positions of the indices mu and nu.
 • The %LeviCivita command is the inert form of LeviCivita, so it represents the same tensor but entering it does not result in performing any computation. To perform the related computations as if %LeviCivita were LeviCivita, use value.

Examples

 > $\mathrm{with}\left(\mathrm{Physics}\right):$
 > $\mathrm{Setup}\left(\mathrm{mathematicalnotation}=\mathrm{true}\right)$
 $\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$ (1)

When Physics is initialized, the spacetime is 4-dimensional and galilean with signature (-, -, -, +). You can see the metric querying Setup, as in Setup(metric), or directly entering the metric as g_[], with no indices

 > $\mathrm{g_}\left[\right]$
 ${{\mathrm{g_}}}_{{\mathrm{μ}}{,}{\mathrm{ν}}}{=}\left(\left[\begin{array}{rrrr}-1& 0& 0& 0\\ 0& -1& 0& 0\\ 0& 0& -1& 0\\ 0& 0& 0& 1\end{array}\right]\right)$ (2)

The values 0 and 4 of the indices represent the same, and the convention for the galilean all-contravariant LeviCivita is

 > $\mathrm{LeviCivita}\left[\mathrm{~0},\mathrm{~1},\mathrm{~2},\mathrm{~3}\right]=\mathrm{LeviCivita}\left[\mathrm{~4},\mathrm{~1},\mathrm{~2},\mathrm{~3}\right]$
 ${1}{=}{1}$ (3)

As usual, lowering or raising the time-like index 0 does not change the sign. Enter the index 0 without ~

 > $\mathrm{LeviCivita}\left[0,\mathrm{~1},\mathrm{~2},\mathrm{~3}\right]$
 ${1}$ (4)

and so, for the galilean all-covariant LeviCivita,

 > $\mathrm{LeviCivita}\left[0,1,2,3\right]$
 ${-1}$ (5)

When two indices are equal, LeviCivita returns 0

 > $\mathrm{LeviCivita}\left[0,0,2,3\right]$
 ${0}$ (6)

The symmetry property of LeviCivita is automatically taken into account when the indices have symbolic values

 > $\mathrm{LeviCivita}\left[\mathrm{\mu },\mathrm{\nu },\mathrm{\alpha },\mathrm{\beta }\right]$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (7)
 > $\mathrm{LeviCivita}\left[\mathrm{\beta },\mathrm{\alpha },\mathrm{\nu },\mathrm{\mu }\right]$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (8)
 > $-$
 ${0}$ (9)

Check now the nonzero components of Christoffel, used to construct the LeviCivita tensor in curvilinear coordinates. Because the default spacetime is of Minkowski type, there are none

 > $\mathrm{Christoffel}\left[\mathrm{nonzero}\right]$
 ${{\mathrm{\Gamma }}}_{{\mathrm{\alpha }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{=}{\varnothing }$ (10)

Hence ${\mathrm{Ε}}_{\mathrm{\mu },\mathrm{\nu },\mathrm{\alpha },\mathrm{\beta }}={\mathrm{\epsilon }}_{\mathrm{\mu },\mathrm{\nu },\mathrm{\alpha },\mathrm{\beta }}$,

 > $\mathrm{Christoffel}\left[\mathrm{\mu },\mathrm{\alpha },\mathrm{\beta }\right]$
 ${0}$ (11)

and the same is valid for all the general relativity tensors defined in terms of Christoffel and derivatives of the metric g_.

To set the scenario as a curved spacetime set the metric using Setup, for instance indicating the square of the spacetime interval:

 > $\mathrm{ds2}≔{r}^{2}{\mathrm{dtheta}}^{2}+{r}^{2}{\mathrm{sin}\left(\mathrm{\theta }\right)}^{2}{\mathrm{dphi}}^{2}-2\mathrm{dt}\mathrm{dr}-2{k\left(r,t\right)}^{2}{\mathrm{dt}}^{2}$
 ${\mathrm{ds2}}{≔}{{r}}^{{2}}{}{{\mathrm{dθ}}}^{{2}}{+}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{\mathrm{dφ}}}^{{2}}{-}{2}{}{\mathrm{dt}}{}{\mathrm{dr}}{-}{2}{}{{k}{}\left({r}{,}{t}\right)}^{{2}}{}{{\mathrm{dt}}}^{{2}}$ (12)

While setting the metric set also the corresponding coordinates

 > $\mathrm{Setup}\left(\mathrm{coordinates}=\mathrm{spherical},\mathrm{metric}=\mathrm{ds2}\right)$
 ${}{}\mathrm{Systems of spacetime coordinates are:}{}{}{}\left\{X=\left(r{,}\mathrm{\theta }{,}\mathrm{\phi }{,}t\right)\right\}$
 ${}{}\mathrm{_______________________________________________________}$
 $\mathrm{Coordinates:}{}\left[r{,}\mathrm{\theta }{,}\mathrm{\phi }{,}t\right]{}\mathrm{. Signature:}{}\left(\mathrm{- - - +}\right)$
 ${}{}\mathrm{_______________________________________________________}$
 ${{\mathrm{g_}}}_{{\mathrm{μ}}{,}{\mathrm{ν}}}{=}\left(\left[\begin{array}{cccc}0& 0& 0& -1\\ 0& {r}^{2}& 0& 0\\ 0& 0& {r}^{2}{}{\mathrm{sin}{}\left(\mathrm{θ}\right)}^{2}& 0\\ -1& 0& 0& -2{}{k{}\left(r,t\right)}^{2}\end{array}\right]\right)$
 ${}{}\mathrm{_______________________________________________________}$
 $\mathrm{Setting}{}\mathrm{lowercaselatin_is}{}\mathrm{letters to represent}{}\mathrm{space}{}\mathrm{indices}$
 $\mathrm{_______________________________________________________}$
 $\left[{\mathrm{coordinatesystems}}{=}\left\{{X}\right\}{,}{\mathrm{metric}}{=}\left\{\left({1}{,}{4}\right){=}{-1}{,}\left({2}{,}{2}\right){=}{{r}}^{{2}}{,}\left({3}{,}{3}\right){=}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{,}\left({4}{,}{4}\right){=}{-}{2}{}{{k}{}\left({r}{,}{t}\right)}^{{2}}\right\}{,}{\mathrm{spaceindices}}{=}{\mathrm{lowercaselatin_is}}\right]$ (13)

At this point LeviCivita, by default, still represents the galilean ${\mathrm{\epsilon }}_{\mathrm{\mu },\mathrm{\nu },\mathrm{\alpha },\mathrm{\beta }}$.

 > $\mathrm{LeviCivita}\left[\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }\right]$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (14)
 > $\mathrm{LeviCivita}\left[1,2,3,4\right]$
 ${1}$ (15)
 > $\mathrm{LeviCivita}\left[1,1,3,4\right]$
 ${0}$ (16)
 > $\mathrm{d_}\left[\mathrm{\rho }\right]\left(\right)$
 ${0}$ (17)

To set LeviCivita as nongalilean use Setup

 > $\mathrm{Setup}\left(\mathrm{levicivita}=\mathrm{nongalilean}\right)$
 $\left[{\mathrm{levicivita}}{=}{\mathrm{nongalilean}}\right]$ (18)

Note the change in the display, reflecting the nongalilean character of LeviCivita

 > $\mathrm{LeviCivita}\left[\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }\right]$
 ${{\mathrm{Ε}}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (19)
 > $\mathrm{LeviCivita}\left[1,1,3,4\right]$
 ${0}$ (20)
 > $\mathrm{%LeviCivita}\left[1,2,3,4\right]=\mathrm{LeviCivita}\left[1,2,3,4\right]$
 ${{\mathrm{%LeviCivita}}}_{{1}{,}{2}{,}{3}{,}{4}}{=}{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)$ (21)
 > $\mathrm{%LeviCivita}\left[\mathrm{~1},\mathrm{~2},\mathrm{~3},\mathrm{~4}\right]=\mathrm{LeviCivita}\left[\mathrm{~1},\mathrm{~2},\mathrm{~3},\mathrm{~4}\right]$
 ${{\mathrm{%LeviCivita}}}_{\phantom{{}}\phantom{{1}}\phantom{{,}}\phantom{{2}}\phantom{{,}}\phantom{{3}}\phantom{{,}}\phantom{{4}}}^{\phantom{{}}{1}{,}{2}{,}{3}{,}{4}}{=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}$ (22)

In view of ${Ε}^{\alpha ,\beta ,\mu ,\nu }=\frac{1}{\sqrt{-g}}{ϵ}^{\alpha ,\beta ,\mu ,\nu }$ and ${Ε}_{\alpha ,\beta ,\mu ,\nu }=\sqrt{-g}{ϵ}_{\alpha ,\beta ,\mu ,\nu }$, we have

 > 
 ${{\mathrm{%LeviCivita}}}_{{1}{,}{2}{,}{3}{,}{4}}{}{{\mathrm{%LeviCivita}}}_{\phantom{{}}\phantom{{1}}\phantom{{,}}\phantom{{2}}\phantom{{,}}\phantom{{3}}\phantom{{,}}\phantom{{4}}}^{\phantom{{}}{1}{,}{2}{,}{3}{,}{4}}{=}{-1}$ (23)
 > $\mathrm{d_}\left[\mathrm{\rho }\right]\left(\right)$
 ${{\partial }}_{{\mathrm{\rho }}}{}\left({{\mathrm{Ε}}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right)$ (24)

For the contravariant components (note you indicate the contravariant character of index prefixing with ~)

 > $\mathrm{LeviCivita}\left[\mathrm{~1},2,3,4\right]$
 ${2}{}{{k}{}\left({r}{,}{t}\right)}^{{2}}{}{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)$ (25)
 > $\mathrm{LeviCivita}\left[\mathrm{~1},\mathrm{~2},3,4\right]$
 ${2}{}{{k}{}\left({r}{,}{t}\right)}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)$ (26)

Shortcut notation for computing an Array for the all-covariant LeviCivita

 > $\mathrm{LeviCivita}\left[\right]$
 ${{\mathrm{LeviCivita}}}_{{\mathrm{α}}{,}{\mathrm{β}}{,}{\mathrm{μ}}{,}{\mathrm{ν}}}{=}{{\mathrm{_rtable}}}_{{36893628239030424148}}$ (27)

An Array with the values of the nongalilean all-contravariant LeviCivita

 > $\mathrm{LeviCivita}\left[\mathrm{~alpha},\mathrm{~beta},\mathrm{~mu},\mathrm{~nu},\mathrm{array}\right]$
 ${{\mathrm{LeviCivita}}}_{{\mathrm{~alpha}}{,}{\mathrm{~beta}}{,}{\mathrm{~mu}}{,}{\mathrm{~nu}}}{=}{{\mathrm{_rtable}}}_{{36893628239030420292}}$ (28)

The nonzero components of the Array just computed

 > $\mathrm{LeviCivita}\left[\mathrm{~mu},\mathrm{~nu},\mathrm{~alpha},\mathrm{~beta},\mathrm{nonzero}\right]$
 ${{\mathrm{Ε}}}_{\phantom{{}}\phantom{{\mathrm{\mu }}}\phantom{{,}}\phantom{{\mathrm{\nu }}}\phantom{{,}}\phantom{{\mathrm{\alpha }}}\phantom{{,}}\phantom{{\mathrm{\beta }}}}^{\phantom{{}}{\mathrm{\mu }}{,}{\mathrm{\nu }}{,}{\mathrm{\alpha }}{,}{\mathrm{\beta }}}{=}\left\{\left({1}{,}{2}{,}{3}{,}{4}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({1}{,}{2}{,}{4}{,}{3}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({1}{,}{3}{,}{2}{,}{4}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({1}{,}{3}{,}{4}{,}{2}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({1}{,}{4}{,}{2}{,}{3}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({1}{,}{4}{,}{3}{,}{2}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({2}{,}{1}{,}{3}{,}{4}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({2}{,}{1}{,}{4}{,}{3}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({2}{,}{3}{,}{1}{,}{4}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({2}{,}{3}{,}{4}{,}{1}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({2}{,}{4}{,}{1}{,}{3}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({2}{,}{4}{,}{3}{,}{1}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({3}{,}{1}{,}{2}{,}{4}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({3}{,}{1}{,}{4}{,}{2}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({3}{,}{2}{,}{1}{,}{4}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({3}{,}{2}{,}{4}{,}{1}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({3}{,}{4}{,}{1}{,}{2}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({3}{,}{4}{,}{2}{,}{1}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({4}{,}{1}{,}{2}{,}{3}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({4}{,}{1}{,}{3}{,}{2}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({4}{,}{2}{,}{1}{,}{3}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({4}{,}{2}{,}{3}{,}{1}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({4}{,}{3}{,}{1}{,}{2}\right){=}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{,}\left({4}{,}{3}{,}{2}{,}{1}\right){=}{-}\frac{{1}}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}\right\}$ (29)
 > 

References

 Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2, fourth revised English edition. Elsevier, 1975.

Compatibility

 • The Physics[LeviCivita] command was introduced in Maple 16.