tensor(deprecated)/invert - Maple Help

tensor

 invert
 form the inverse of any second rank tensor_type

 Calling Sequence invert(T, detT)

Parameters

 T - second rank tensor the determinant of which is nonzero detT - unassigned name as an output parameter (for holding the determinant of T, which is a by-product of this routine)

Description

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][InverseMetric] and Physics[Inverse] instead.

 • This procedure computes the determinant of the second rank tensor T, and whenever the T determinant does not vanish, it constructs the inverse tensor of T.
 • In the case of a purely covariant or contravariant tensor T, the inverse T~ of T is defined in the usual way, corresponding to matrix algebra

${T}^{\mathrm{ij}}{T}_{\mathrm{jk}}={\mathrm{\delta }}_{k}^{i}$

${T}_{\mathrm{ij}}{T}^{\mathrm{jk}}={\mathrm{\delta }}_{i}^{k}$

 where delta is the Kronecker delta.
 • In the case of a mixed tensor T, the inverse T~ of T is defined so that it satisfies

${T}_{j}^{i}{T}_{k}^{j}={\mathrm{\delta }}_{k}^{i}$

${T}_{i}^{j}{T}_{j}^{k}={\mathrm{\delta }}_{i}^{k}$

 Thus, for the mixed case, T~ is the transpose of the matrix inverse of T.  Define the inverse for the mixed case this way so that tensor[invert] can be used to compute inverses of the components of tetrads and frames.  In the case of the natural basis, tensor[invert] is well suited for determining the contravariant metric tensor components from the covariant ones (and vice versa).
 • Indexing function:  The invert routine preserves the use of the symmetric indexing function.  That is, if the input tensor_type uses the symmetric indexing function for its component arrays, then the result also uses the symmetric indexing function.
 • Simplification:  This routine uses the tensor/invert/simp routine for simplification purposes.  The simplification routine is applied to each component of result after it is computed.  By default, tensor/invert/simp is initialized to the tensor/simp routine.  It is recommended that the tensor/invert/simp routine be customized to suit the needs of the particular problem.
 • This function is part of the tensor package, and so can be used in the form invert(..) only after performing the command with(tensor) or with(tensor, invert).  The function can always be accessed in the long form tensor[invert](..).

Examples

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][InverseMetric] and Physics[Inverse] instead.

 > $\mathrm{with}\left(\mathrm{tensor}\right):$
 > $t≔\mathrm{array}\left(1..3,1..3,\left[\left[x,y,y\right],\left[y,0,0\right],\left[0,0,x\right]\right]\right):$
 > $T≔\mathrm{create}\left(\left[-1,1\right],\mathrm{op}\left(t\right)\right)$
 ${T}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{ccc}{x}& {y}& {y}\\ {y}& {0}& {0}\\ {0}& {0}& {x}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{1}\right]\right]\right)$ (1)

Compute the inverse of the mixed tensor_type T.  Note that the result is the transpose of the matrix inverse:

 > $\mathrm{invT}≔\mathrm{invert}\left(T,'\mathrm{detT}'\right)$
 ${\mathrm{invT}}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{ccc}{0}& \frac{{1}}{{y}}& {0}\\ \frac{{1}}{{y}}& {-}\frac{{x}}{{{y}}^{{2}}}& {0}\\ {0}& {-}\frac{{1}}{{x}}& \frac{{1}}{{x}}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{1}{,}{-1}\right]\right]\right)$ (2)

Define the covariant Kerr-Newman metric tensor:

 > $g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{array}\left(\mathrm{symmetric},1..4,1..4,\left[\left(3,4\right)=\frac{\left({e}^{2}-2mr\right)a{\mathrm{sin}\left(\mathrm{\theta }\right)}^{2}}{{r}^{2}+{a}^{2}{\mathrm{cos}\left(\mathrm{\theta }\right)}^{2}},\left(3,3\right)={\mathrm{sin}\left(\mathrm{\theta }\right)}^{2}\left({r}^{2}+{a}^{2}+\frac{{a}^{2}{\mathrm{sin}\left(\mathrm{\theta }\right)}^{2}}{{r}^{2}+{a}^{2}{\mathrm{cos}\left(\mathrm{\theta }\right)}^{2}}\left(2mr-{e}^{2}\right)\right),\left(1,1\right)=\frac{{r}^{2}+{a}^{2}{\mathrm{cos}\left(\mathrm{\theta }\right)}^{2}}{{r}^{2}+{a}^{2}+{e}^{2}-2mr},\left(2,2\right)={r}^{2}+{a}^{2}{\mathrm{cos}\left(\mathrm{\theta }\right)}^{2},\left(2,3\right)=0,\left(2,4\right)=0,\left(4,4\right)=\frac{2mr-{e}^{2}}{{r}^{2}+{a}^{2}{\mathrm{cos}\left(\mathrm{\theta }\right)}^{2}}-1,\left(1,2\right)=0,\left(1,3\right)=0,\left(1,4\right)=0\right]\right)\right)$
 ${g}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cccc}\frac{{{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{{{a}}^{{2}}{+}{{e}}^{{2}}{-}{2}{}{m}{}{r}{+}{{r}}^{{2}}}& {0}& {0}& {0}\\ {0}& {{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}& {0}& {0}\\ {0}& {0}& {{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{r}}^{{2}}{+}{{a}}^{{2}}{+}\frac{{{a}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({-}{{e}}^{{2}}{+}{2}{}{m}{}{r}\right)}{{{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}}\right)& \frac{\left({{e}}^{{2}}{-}{2}{}{m}{}{r}\right){}{a}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{{{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}}\\ {0}& {0}& \frac{\left({{e}}^{{2}}{-}{2}{}{m}{}{r}\right){}{a}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{{{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}}& \frac{{-}{{e}}^{{2}}{+}{2}{}{m}{}{r}}{{{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{-}{1}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (3)
 > $\mathrm{ginv}≔\mathrm{invert}\left(g,'\mathrm{detg}'\right)$
 ${\mathrm{ginv}}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cccc}\frac{{{a}}^{{2}}{+}{{e}}^{{2}}{-}{2}{}{m}{}{r}{+}{{r}}^{{2}}}{{{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}}& {0}& {0}& {0}\\ {0}& \frac{{1}}{{{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}}& {0}& {0}\\ {0}& {0}& \frac{\left({{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}{+}{{e}}^{{2}}{-}{2}{}{m}{}{r}{+}{{r}}^{{2}}\right){}{{\mathrm{csc}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{\left({{a}}^{{2}}{+}{{e}}^{{2}}{-}{2}{}{m}{}{r}{+}{{r}}^{{2}}\right){}\left({{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}\right)}& \frac{\left({{e}}^{{2}}{-}{2}{}{m}{}{r}\right){}{a}}{\left({{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}\right){}\left({{a}}^{{2}}{+}{{e}}^{{2}}{-}{2}{}{m}{}{r}{+}{{r}}^{{2}}\right)}\\ {0}& {0}& \frac{\left({{e}}^{{2}}{-}{2}{}{m}{}{r}\right){}{a}}{\left({{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}\right){}\left({{a}}^{{2}}{+}{{e}}^{{2}}{-}{2}{}{m}{}{r}{+}{{r}}^{{2}}\right)}& \frac{{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{a}}^{{2}}{}{{e}}^{{2}}{-}{2}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{a}}^{{2}}{}{m}{}{r}{-}{{a}}^{{4}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}{-}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{r}}^{{2}}{-}{{a}}^{{2}}{}{{r}}^{{2}}{-}{{r}}^{{4}}}{\left({{a}}^{{2}}{+}{{e}}^{{2}}{-}{2}{}{m}{}{r}{+}{{r}}^{{2}}\right){}\left({{r}}^{{2}}{+}{{a}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}\right)}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{1}{,}{1}\right]\right]\right)$ (4)