 WeylTensor - Maple Help

Tensor[WeylTensor] - calculate the Weyl curvature tensor of a metric

Calling Sequences

WeylTensor(g, R)

Parameters

g    - a metric on a manifold $M$

R    - (optional) the curvature tensor of the metric $g$, as computed from the Christoffel symbols of $g$ Description

 • Let ${R}_{\mathrm{ijhk}}$ be the rank 4 covariant tensor obtained from the curvature tensor of $g$ by lowering its first index with the metric $g$. Let be the Ricci tensor and $R$ the Ricci scalar. The trace-free part of ${R}_{\mathrm{ijhk}}$ is the Weyl tensor ${W}_{\mathrm{ijhk}}$ of the metric $g$. If the dimension of M is $n$, then

 • The Weyl tensor vanishes identically in dimension $n=3$. If $\stackrel{‾}{g}={f}^{*}g$, then
 • In addition to being trace-free over any index pair, the Weyl tensor also satisfies the first Bianchi identity.
 • This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form WeylTensor(...) only after executing the command with(DifferentialGeometry) and with(Tensor) in that order.  It can always be used in the long form DifferentialGeometry:-Tensor:-WeylTensor. Examples

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

Example 1.

First create a 3 dimensional manifold  and show that the Weyl tensor of a randomly defined metric $\mathrm{g1}$ is zero.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.1)
 M > $\mathrm{g1}≔\mathrm{evalDG}\left({y}^{2}\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}+xz\left(\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}+\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}\right)\right)$
 ${\mathrm{g1}}{:=}{{y}}^{{2}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{x}{}{z}{}{\mathrm{dy}}{}{\mathrm{dz}}{+}{x}{}{z}{}{\mathrm{dz}}{}{\mathrm{dy}}$ (2.2)

Calculate the Christoffel symbols.

 M > $\mathrm{C1}≔\mathrm{Christoffel}\left(\mathrm{g1}\right)$
 ${\mathrm{C1}}{:=}\frac{{\mathrm{D_x}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{y}}{+}\frac{{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{y}}{-}\frac{{1}}{{2}}{}\frac{{z}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{{y}}^{{2}}}{-}\frac{{1}}{{2}}{}\frac{{z}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{{y}}^{{2}}}{+}\frac{{1}}{{2}}{}\frac{{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{x}}{+}\frac{{1}}{{2}}{}\frac{{\mathrm{D_y}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{x}}{-}\frac{{y}{}{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dx}}}{{x}{}{z}}{+}\frac{{1}}{{2}}{}\frac{{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{x}}{+}\frac{{1}}{{2}}{}\frac{{\mathrm{D_z}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{x}}{+}\frac{{\mathrm{D_z}}{}{\mathrm{dz}}{}{\mathrm{dz}}}{{z}}$ (2.3)

Calculate the curvature tensor.

 M > $\mathrm{R1}≔\mathrm{CurvatureTensor}\left(\mathrm{C1}\right)$
 ${\mathrm{R1}}{:=}\frac{{1}}{{4}}{}\frac{{z}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{{y}}^{{2}}{}{x}}{+}\frac{{1}}{{2}}{}\frac{{z}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{{y}}^{{3}}}{-}\frac{{1}}{{4}}{}\frac{{z}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{{y}}^{{2}}{}{x}}{-}\frac{{1}}{{2}}{}\frac{{z}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{{y}}^{{3}}}{+}\frac{{1}}{{4}}{}\frac{{z}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{{y}}^{{2}}{}{x}}{-}\frac{{1}}{{4}}{}\frac{{z}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{{y}}^{{2}}{}{x}}{-}\frac{{1}}{{4}}{}\frac{{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{{x}}^{{2}}}{+}\frac{{1}}{{4}}{}\frac{{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{{x}}^{{2}}}{-}\frac{{1}}{{2}}{}\frac{{\mathrm{D_y}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{y}{}{x}}{+}\frac{{1}}{{2}}{}\frac{{\mathrm{D_y}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{y}{}{x}}{-}\frac{{1}}{{4}}{}\frac{{z}{}{\mathrm{D_y}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{{y}}^{{2}}{}{x}}{+}\frac{{1}}{{4}}{}\frac{{z}{}{\mathrm{D_y}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{{y}}^{{2}}{}{x}}{-}\frac{{1}}{{4}}{}\frac{{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{{x}}^{{2}}}{-}\frac{{1}}{{2}}{}\frac{{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{y}{}{x}}{+}\frac{{1}}{{4}}{}\frac{{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{{x}}^{{2}}}{+}\frac{{1}}{{2}}{}\frac{{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{y}{}{x}}{+}\frac{{1}}{{2}}{}\frac{{\mathrm{D_z}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{y}{}{x}}{-}\frac{{1}}{{2}}{}\frac{{\mathrm{D_z}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{y}{}{x}}{+}\frac{{1}}{{4}}{}\frac{{z}{}{\mathrm{D_z}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{{y}}^{{2}}{}{x}}{-}\frac{{1}}{{4}}{}\frac{{z}{}{\mathrm{D_z}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{{y}}^{{2}}{}{x}}$ (2.4)

Calculate the Weyl tensor.

 M > $\mathrm{W1}≔\mathrm{WeylTensor}\left(\mathrm{g1},\mathrm{R1}\right)$
 ${\mathrm{W1}}{:=}{0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (2.5)

Example 3.

Define a 4 dimensional manifold and a metric $\mathrm{g2}$.

 M > $\mathrm{DGsetup}\left(\left[x,y,z,w\right],\mathrm{M2}\right)$
 ${\mathrm{frame name: M2}}$ (2.6)
 M2 > $\mathrm{g2}≔\mathrm{evalDG}\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}+\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}\right)+xy\left(\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw}+\mathrm{dw}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}\right)\right)$
 ${\mathrm{g2}}{:=}{\mathrm{dx}}{}{\mathrm{dx}}{+}{\mathrm{dx}}{}{\mathrm{dy}}{+}{\mathrm{dy}}{}{\mathrm{dx}}{+}{y}{}{x}{}{\mathrm{dz}}{}{\mathrm{dw}}{+}{y}{}{x}{}{\mathrm{dw}}{}{\mathrm{dz}}$ (2.7)

Calculate the Weyl tensor directly from the metric g$2.$

 M2 > $\mathrm{W2}≔\mathrm{WeylTensor}\left(\mathrm{g2}\right)$
 ${\mathrm{W2}}{:=}{-}\frac{{1}}{{6}}{}\frac{{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{{y}}^{{2}}}{+}\frac{{1}}{{6}}{}\frac{{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{{y}}^{{2}}}{+}\frac{{1}}{{6}}{}\frac{{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{{y}}^{{2}}}{-}\frac{{1}}{{6}}{}\frac{{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{{y}}^{{2}}}{-}\frac{{1}}{{6}}{}{{x}}^{{2}}{}{\mathrm{dz}}{}{\mathrm{dw}}{}{\mathrm{dz}}{}{\mathrm{dw}}{+}\frac{{1}}{{6}}{}{{x}}^{{2}}{}{\mathrm{dz}}{}{\mathrm{dw}}{}{\mathrm{dw}}{}{\mathrm{dz}}{+}\frac{{1}}{{6}}{}{{x}}^{{2}}{}{\mathrm{dw}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dw}}{-}\frac{{1}}{{6}}{}{{x}}^{{2}}{}{\mathrm{dw}}{}{\mathrm{dz}}{}{\mathrm{dw}}{}{\mathrm{dz}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dw}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dw}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dw}}{}{\mathrm{dx}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dw}}{}{\mathrm{dy}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dx}}{}{\mathrm{dw}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dx}}{}{\mathrm{dw}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dx}}{}{\mathrm{dw}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dx}}{}{\mathrm{dw}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dw}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dw}}{}{\mathrm{dx}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dy}}{}{\mathrm{dw}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dy}}{}{\mathrm{dw}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dw}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dw}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dw}}{}{\mathrm{dx}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dw}}{}{\mathrm{dy}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dw}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dw}}{}{\mathrm{dx}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dw}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dw}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dw}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dw}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{y}}{+}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dw}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{y}}{-}\frac{{1}}{{12}}{}\frac{{x}{}{\mathrm{dw}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{y}}$ (2.8)

We check the various properties of the Weyl tensor. First we check that it is skew-symmetric in its 1st and 2nd indices, and also in its 3rd and 4th indices.

 M2 > $\mathrm{SymmetrizeIndices}\left(\mathrm{W2},\left[1,2\right],"Symmetric"\right)$
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (2.9)
 M2 > $\mathrm{SymmetrizeIndices}\left(\mathrm{W2},\left[3,4\right],"Symmetric"\right)$
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (2.10)

Check the 1st Bianchi identity.

 M2 > $\mathrm{SymmetrizeIndices}\left(\mathrm{W2},\left[1,3,4\right],"SkewSymmetric"\right)$
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (2.11)

Check that W2 is trace-free on the indices 1 and 3.

 M2 > $\mathrm{h2}≔\mathrm{InverseMetric}\left(\mathrm{g2}\right):$
 M2 > $\mathrm{ContractIndices}\left(\mathrm{h2},\mathrm{W2},\left[\left[1,1\right],\left[2,3\right]\right]\right)$
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (2.12)

Finally we check the conformal invariance of the Weyl tensor by computing the Weyl tensor W3 for g3 = $f\left(y,z\right)\mathrm{g2}$ and comparing W3 with $f\left(y,z\right)\mathrm{W2}$

 M2 > $\mathrm{g3}≔\mathrm{evalDG}\left(f\left(y,z\right)\mathrm{g2}\right):$
 M2 > $\mathrm{C3}≔\mathrm{Christoffel}\left(\mathrm{g3}\right):$
 M2 > $\mathrm{R3}≔\mathrm{CurvatureTensor}\left(\mathrm{C3}\right):$
 M2 > $\mathrm{W3}≔\mathrm{WeylTensor}\left(\mathrm{g3},\mathrm{R3}\right):$
 M2 > $\mathrm{evalDG}\left(\mathrm{W3}-f\left(y,z\right)\mathrm{W2}\right)$
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (2.13) See Also