tensor(deprecated)/dual - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : tensor(deprecated)/dual

tensor

 dual
 perform the dual operation on the indices of a tensor

 Calling Sequence dual(LC, T, index_list)

Parameters

 LC - Levi-Civita pseudo-tensor T - tensor to dual index_list - list of indices of T to dual

Description

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 • The function dual(LC, T, [i1, i2, ... ]) computes the dual of the tensor T on indices i1, i2, ... of T using the components of the Levi-Civita pseudo-tensor LC. This is done by forming the inner product of LC with T, contracting over the appropriate indices of T and dividing by the appropriate normalizing factor.
 • The index_list must contain indices of T which are all of the same covariant / contravariant character and in which T is skew-symmetric.  The number of indices to dual cannot exceed the dimension of the space (which equals the rank of LC) and must be greater than zero.  At this time, the routine does not check if T is really antisymmetric in the given indices -- it is a precondition.
 • All of the indices of the LC tensor must have character opposite to that of the indices of T of which the dual is to be taken. No mixed-type LC tensors are permitted.  Thus, the dual of indices of T of opposite character must be computed separately by calling the function twice.  The LC tensor can be obtained by using tensor[Levi_Civita].
 • The result is a tensor type of rank equal to:

$\mathrm{dimension}+\mathrm{rank}\left(T\right)-2\mathrm{size}\left(\mathrm{index_list}\right)$

 • The normalizing factor is equal to factorial(size(index_list)).
 • If the number of indices being dualed equals the rank of the input tensor, then the components of the result will be completely skew-symmetric (since their indices are the free indices of the Levi-Civita tensor).  In this case, the result uses the antisymmetric indexing function for its component array.
 • Simplification:  This routine uses the tensor/prod/simp routine for simplification purposes.  The simplification routine is applied to each component of result after it is computed.  By default, tensor/prod/simp is initialized to the tensor/simp routine.  It is recommended that the tensor/prod/simp routine be customized to suit the needs of the particular problem.

Examples

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 > $\mathrm{with}\left(\mathrm{tensor}\right):$

Define the coordinates and metric of Minkowski space-time:

 > $\mathrm{coord}≔\left[t,x,y,z\right]$
 ${\mathrm{coord}}{≔}\left[{t}{,}{x}{,}{y}{,}{z}\right]$ (1)
 > $g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{array}\left(\mathrm{symmetric},\mathrm{sparse},1..4,1..4,\left[\left(4,4\right)=1,\left(1,1\right)=-1,\left(2,2\right)=1,\left(3,3\right)=1\right]\right)\right)$
 ${g}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cccc}{-1}& {0}& {0}& {0}\\ {0}& {1}& {0}& {0}\\ {0}& {0}& {1}& {0}\\ {0}& {0}& {0}& {1}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (2)
 > $\mathrm{ginv}≔\mathrm{invert}\left(g,\mathrm{detg}\right):$

Use the Levi_Civita routine to generate the Levi-Civita pseudo-tensor:

 > $\mathrm{Levi_Civita}\left(\mathrm{detg},4,\mathrm{cov_LC},\mathrm{con_LC}\right)$

Define the contravariant components of the Electromagnetic Field tensor:

 > $F≔\mathrm{create}\left(\left[1,1\right],\mathrm{array}\left(\mathrm{antisymmetric},1..4,1..4,\left[\left(1,2\right)=\mathrm{E1},\left(1,3\right)=\mathrm{E2},\left(1,4\right)=\mathrm{E3},\left(3,4\right)=\mathrm{H1},\left(2,4\right)=-\mathrm{H2},\left(2,3\right)=\mathrm{H3}\right]\right)\right)$
 ${F}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cccc}{0}& {\mathrm{E1}}& {\mathrm{E2}}& {\mathrm{E3}}\\ {-}{\mathrm{E1}}& {0}& {\mathrm{H3}}& {-}{\mathrm{H2}}\\ {-}{\mathrm{E2}}& {-}{\mathrm{H3}}& {0}& {\mathrm{H1}}\\ {-}{\mathrm{E3}}& {\mathrm{H2}}& {-}{\mathrm{H1}}& {0}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{1}{,}{1}\right]\right]\right)$ (3)

Compute the dual of F:

 > $\mathrm{F_star}≔\mathrm{dual}\left(\mathrm{cov_LC},F,\left[1,2\right]\right)$
 ${\mathrm{F_star}}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cccc}{0}& {\mathrm{H1}}& {\mathrm{H2}}& {\mathrm{H3}}\\ {-}{\mathrm{H1}}& {0}& {\mathrm{E3}}& {-}{\mathrm{E2}}\\ {-}{\mathrm{H2}}& {-}{\mathrm{E3}}& {0}& {\mathrm{E1}}\\ {-}{\mathrm{H3}}& {\mathrm{E2}}& {-}{\mathrm{E1}}& {0}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (4)

Compute the dual of the dual of F:

 > $\mathrm{F_star_star}≔\mathrm{dual}\left(\mathrm{con_LC},\mathrm{F_star},\left[1,2\right]\right)$
 ${\mathrm{F_star_star}}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cccc}{0}& {-}{\mathrm{E1}}& {-}{\mathrm{E2}}& {-}{\mathrm{E3}}\\ {\mathrm{E1}}& {0}& {-}{\mathrm{H3}}& {\mathrm{H2}}\\ {\mathrm{E2}}& {\mathrm{H3}}& {0}& {-}{\mathrm{H1}}\\ {\mathrm{E3}}& {-}{\mathrm{H2}}& {\mathrm{H1}}& {0}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{1}{,}{1}\right]\right]\right)$ (5)
 > $\mathrm{lin_com}\left(F,\mathrm{F_star_star}\right)$
 ${table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cccc}{0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{1}{,}{1}\right]\right]\right)$ (6)

 See Also