Lesson 10: Tensor Analysis - Maple Help

DifferentialGeometry Lessons

Lesson 10: Tensor Analysis

Overview

In this lesson, you will learn to do the following:

 – Construct a connection and compute its torsion.
 – Compute the Christoffel connection from a metric.
 – Calculate the covariant derivative of a tensor.
 – Calculate the Riemann curvature tensor of a connection.
 – Calculate the Ricci tensor, the scalar curvature, the Einstein tensor.
 – Calculate the Weyl tensor.

Connections and Christoffel symbols, Torsion tensors

To create an affine connection, first construct a tensor with the desired components and then use the Connection command.  The torsion of the connection is computed with the TorsionTensor command.

 > with(DifferentialGeometry): with(Tensor):
 > DGsetup([x, y], E2):
 E2 > T := evalDG(y*dx &t D_y &t dy);
 ${T}{≔}{y}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}$ (2.1)
 E2 > C := Connection(T);
 ${C}{≔}{y}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}$ (2.2)
 E2 > S := TorsionTensor(C);
 ${S}{≔}{-}{y}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{+}{y}{}{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dx}}$ (2.3)

Remark 1.  Although the display for the tensor T and the connection C are the same, the internal representations are different.

 E2 > Tools:-DGinfo(T, "ObjectType");
 ${"tensor"}$ (2.4)
 E2 > Tools:-DGinfo(C, "ObjectType");
 ${"connection"}$ (2.5)

Remark 2.  We illustrate the fact that the rules for transforming and Lie differentiating the tensor T and the connection C are different.

 E2 > X := evalDG(x^3*D_x);
 ${X}{≔}{{x}}^{{3}}{}{\mathrm{D_x}}$ (2.6)

Here are the Lie derivatives of T and C.

 E2 > LieDerivative(X, T);
 ${3}{}{{x}}^{{2}}{}{y}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}$ (2.7)
 E2 > LieDerivative(X, C);
 ${6}{}{x}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dx}}{+}{3}{}{{x}}^{{2}}{}{y}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}$ (2.8)
 E2 > Phi := Transformation(E2, E2, [x = 1/x, y = 1/y]);
 ${\mathrm{Φ}}{≔}\left[{x}{=}\frac{{1}}{{x}}{,}{y}{=}\frac{{1}}{{y}}\right]$ (2.9)
 E2 > InvPhi := InverseTransformation(Phi);
 ${\mathrm{InvPhi}}{≔}\left[{x}{=}\frac{{1}}{{x}}{,}{y}{=}\frac{{1}}{{y}}\right]$ (2.10)

Here are the transformations of T and C.

 E2 > PushPullTensor(Phi, InvPhi, T);
 ${-}\frac{{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{y}{}{{x}}^{{2}}}$ (2.11)
 E2 > PushPullTensor(Phi, InvPhi, C);
 ${-}\frac{{2}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dx}}}{{x}}{-}\frac{{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{y}{}{{x}}^{{2}}}{-}\frac{{2}{}{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{y}}$ (2.12)

The command Christoffel is used to construct the Christoffel connection for a metric g.  With the optional argument "FirstKind", the Christoffel symbols of the first kind are computed.

 E2 > g := evalDG((1/y^2)*(dx &t dy + dy &t dx));
 ${g}{≔}\frac{{\mathrm{dx}}{}{\mathrm{dy}}}{{{y}}^{{2}}}{+}\frac{{\mathrm{dy}}{}{\mathrm{dx}}}{{{y}}^{{2}}}$ (2.13)
 E2 > Christoffel(g);
 ${-}\frac{{2}{}{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{y}}$ (2.14)
 E2 > C2 := Christoffel(g, "FirstKind");
 ${\mathrm{C2}}{≔}{-}\frac{{2}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{{y}}^{{3}}}$ (2.15)
 E2 > type(g1, DGmetric);
 ${\mathrm{false}}$ (2.16)

Covariant derivatives

Let T be a tensor of type (r, s) (r = number of contravariant (upper) indices = number of 1-form arguments, s = number of covariant (lower) indices = number of vector arguments).  The command DirectionalCovariantDerivative calculates the covariant derivative of T in the direction of a given vector field and with respect to a given connection -- a tensor of type (r, s) is returned.  The command CovariantDerivative returns the covariant derivative of T as an (r, s + 1) tensor.

 E2 > with(DifferentialGeometry): with(Tensor):
 E2 > DGsetup([x, y], E2):

Define a vector field X, a connection C, and tensors T1 and T2.

 E2 > X := evalDG(a*D_x + b*D_y);
 ${X}{≔}{a}{}{\mathrm{D_x}}{+}{b}{}{\mathrm{D_y}}$ (3.1)
 E2 > C := Connection(alpha*dx &t D_y &t dy + beta*dy &t D_x &t dx);
 ${C}{≔}{\mathrm{α}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{+}{\mathrm{β}}{}{\mathrm{dy}}{}{\mathrm{D_x}}{}{\mathrm{dx}}$ (3.2)
 E2 > T1 := evalDG(dx &t D_x);
 ${\mathrm{T1}}{≔}{\mathrm{dx}}{}{\mathrm{D_x}}$ (3.3)
 E2 > T2 := evalDG(f(x, y)*dy &t D_y);
 ${\mathrm{T2}}{≔}{f}{}\left({x}{,}{y}\right){}{\mathrm{dy}}{}{\mathrm{D_y}}$ (3.4)

Calculate the covariant derivative of T1.

 E2 > dT1 := CovariantDerivative(T1, C);
 ${\mathrm{dT1}}{≔}{\mathrm{α}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{-}{\mathrm{β}}{}{\mathrm{dy}}{}{\mathrm{D_x}}{}{\mathrm{dx}}$ (3.5)

Calculate the directional derivative of T1.

 E2 > DirectionalCovariantDerivative(X, T1, C);
 ${\mathrm{α}}{}{b}{}{\mathrm{dx}}{}{\mathrm{D_y}}{-}{\mathrm{β}}{}{a}{}{\mathrm{dy}}{}{\mathrm{D_x}}$ (3.6)

Show that the directional covariant derivative is the contraction of the vector field X with the covariant derivative dT1.

 E2 > ContractIndices(X, dT1, [[1, 3]]);
 ${\mathrm{α}}{}{b}{}{\mathrm{dx}}{}{\mathrm{D_y}}{-}{\mathrm{β}}{}{a}{}{\mathrm{dy}}{}{\mathrm{D_x}}$ (3.7)

Conversely, calculate the covariant derivative dT1 from the directional covariant derivatives of T1 in the coordinate directions.

 E2 > evalDG((DirectionalCovariantDerivative(D_x, T1, C) &t dx) + (DirectionalCovariantDerivative(D_y, T1, C) &t dy));
 ${\mathrm{α}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{-}{\mathrm{β}}{}{\mathrm{dy}}{}{\mathrm{D_x}}{}{\mathrm{dx}}$ (3.8)

Calculate the covariant derivative of T2.

 E2 > CovariantDerivative(T2, C);
 ${-}{\mathrm{α}}{}{f}{}\left({x}{,}{y}\right){}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{+}{\mathrm{β}}{}{f}{}\left({x}{,}{y}\right){}{\mathrm{dy}}{}{\mathrm{D_x}}{}{\mathrm{dx}}{+}\left(\frac{{\partial }}{{\partial }{x}}{}{f}{}\left({x}{,}{y}\right)\right){}{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{+}\left(\frac{{\partial }}{{\partial }{y}}{}{f}{}\left({x}{,}{y}\right)\right){}{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dy}}$ (3.9)

Connections on vector bundles can also be defined.

 E2 > DGsetup([x, y ,z], [u, v], E);
 ${\mathrm{frame name: E}}$ (3.10)
 E > C1 := Connection(alpha*dv &t D_v &t dx + beta*du &t D_u &t dy);
 ${\mathrm{C1}}{≔}{\mathrm{β}}{}{\mathrm{du}}{}{\mathrm{D_u}}{}{\mathrm{dy}}{+}{\mathrm{α}}{}{\mathrm{dv}}{}{\mathrm{D_v}}{}{\mathrm{dx}}$ (3.11)

Define a tensor field T3 on the vector bundle E and take its covariant derivative.

 E > T3 := evalDG(y*du &t D_v);
 ${\mathrm{T3}}{≔}{y}{}{\mathrm{du}}{}{\mathrm{D_v}}$ (3.12)
 E > dT3 := CovariantDerivative(T3, C1);
 ${\mathrm{dT3}}{≔}{\mathrm{α}}{}{y}{}{\mathrm{du}}{}{\mathrm{D_v}}{}{\mathrm{dx}}{+}\left({-}{\mathrm{β}}{}{y}{+}{1}\right){}{\mathrm{du}}{}{\mathrm{D_v}}{}{\mathrm{dy}}$ (3.13)

Define a mixed tensor T4 -- i.e. a tensor product of tensors on the vector bundle and tensors on the tangent bundle.  To covariantly differentiateT4, a connection C2 on the tangent bundle is also required.

 E > T4 := evalDG(x*dx &t D_v);
 ${\mathrm{T4}}{≔}{x}{}{\mathrm{dx}}{}{\mathrm{D_v}}$ (3.14)
 E > C2 := Connection(gamma*dx &t D_x &t dx);
 ${\mathrm{C2}}{≔}{\mathrm{γ}}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dx}}$ (3.15)
 E > dT4 := CovariantDerivative(T4, C1, C2);
 ${\mathrm{dT4}}{≔}\left({\mathrm{α}}{}{x}{-}{\mathrm{γ}}{}{x}{+}{1}\right){}{\mathrm{dx}}{}{\mathrm{D_v}}{}{\mathrm{dx}}$ (3.16)

The order in which the connections are specified does not matter.

 E > CovariantDerivative(T4, C2, C1);
 $\left({\mathrm{α}}{}{x}{-}{\mathrm{γ}}{}{x}{+}{1}\right){}{\mathrm{dx}}{}{\mathrm{D_v}}{}{\mathrm{dx}}$ (3.17)

Curvature tensors, Ricci tensor, Ricci scalar, Einstein tensor, Weyl tensor, Cotton tensor

These tensors are readily computed using the CurvatureTensor, RicciTensor, RicciScalar, EinsteinTensor, WeylTensor and CottonTensor commands.  The CurvatureTensor command accepts either an arbitrary affine connection (connection on the tangent bundle),  a connection on a vector bundle or a metric.  The RicciTensor command computes the Ricci tensor for an arbitrary affine connection.  The RicciScalar, EinsteinTensor, WeylTensor, and Cotton tensor commands may only be computed for metric connections.

 E > with(DifferentialGeometry): with(Tensor):

Example 1.

 > DGsetup([x, y, z], M):

Define a metric g.

 M > g := (1/(k^2 + x^2 + y^2 + z^2)^2) &mult evalDG((dx &t dx + dy &t dy + dz &t dz ));
 ${g}{≔}\frac{{\mathrm{dx}}{}{\mathrm{dx}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{\mathrm{dy}}{}{\mathrm{dy}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{\mathrm{dz}}{}{\mathrm{dz}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}$ (4.1)

Calculate the Christoffel connection of g.

 M > C := Christoffel(g);
 ${C}{≔}{-}\frac{{2}{}{x}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dx}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{-}\frac{{2}{}{y}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dy}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{-}\frac{{2}{}{z}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dz}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{+}\frac{{2}{}{y}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dx}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{-}\frac{{2}{}{x}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{+}\frac{{2}{}{z}{}{\mathrm{dx}}{}{\mathrm{D_z}}{}{\mathrm{dx}}}{{{k}}^{{2}}{+}{{x}}^{{2}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{2}}}{+}\frac{{2}{}{x}{}{\mathrm{dz}}{}{\mathrm{D_x}}{}{\mathrm{dz}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{-}\frac{{2}{}{z}{}{\mathrm{dz}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{+}\frac{{2}{}{y}{}{\mathrm{dz}}{}{\mathrm{D_y}}{}{\mathrm{dz}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{-}\frac{{2}{}{x}{}{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{dx}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{-}\frac{{2}{}{y}{}{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{dy}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{-}\frac{{2}{}{z}{}{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{dz}}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}$ (4.2)

Calculate the curvature tensor for the metric g from its Christoffel symbol C.

 M > R := CurvatureTensor(C);
 ${R}{≔}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_y}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_y}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{4}{}{{k}}^{{2}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}$ (4.3)

Calculate the Ricci tensor from the curvature tensor.

 M > RicciTensor(R);
 $\frac{{8}{}{{k}}^{{2}}{}{\mathrm{dx}}{}{\mathrm{dx}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{8}{}{{k}}^{{2}}{}{\mathrm{dy}}{}{\mathrm{dy}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{+}\frac{{8}{}{{k}}^{{2}}{}{\mathrm{dz}}{}{\mathrm{dz}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}$ (4.4)

Calculate the Ricci scalar from the metric and its curvature tensor.

 M > RicciScalar(g, R);
 ${24}{}{{k}}^{{2}}$ (4.5)

Calculate the Einstein tensor from the metric and its curvature tensor.

 M > EinsteinTensor(g, R);
 ${-}{4}{}{{k}}^{{2}}{}{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_x}}{-}{4}{}{{k}}^{{2}}{}{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_y}}{-}{4}{}{{k}}^{{2}}{}{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_z}}$ (4.6)

Calculate the Cotton tensor from the metric, its Christoffel connection and its curvature.  The Cotton tensor vanishes because the metric is conformally flat.

 M > CottonTensor(g, C, R);
 ${0}{}{\mathrm{D_x}}{}{\mathrm{D_x}}$ (4.7)

Example 2.

For a general affine connection, we can still compute the curvature and Ricci tensors.  Note that the Ricci tensor is no longer symmetric.

 M > C := Connection(z^2*dz &t D_y &t dx - x^2*dy &t D_x &t dz);
 ${C}{≔}{-}{{x}}^{{2}}{}{\mathrm{dy}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{+}{{z}}^{{2}}{}{\mathrm{dz}}{}{\mathrm{D_y}}{}{\mathrm{dx}}$ (4.8)
 M > R := CurvatureTensor(C);
 ${R}{≔}{-}{2}{}{x}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dz}}{+}{2}{}{x}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dx}}{+}{{x}}^{{2}}{}{{z}}^{{2}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dz}}{-}{{x}}^{{2}}{}{{z}}^{{2}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dx}}{-}{2}{}{z}{}{\mathrm{D_y}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dz}}{+}{2}{}{z}{}{\mathrm{D_y}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dx}}$ (4.9)
 M > RicciTensor(R);
 ${-}{2}{}{x}{}{\mathrm{dy}}{}{\mathrm{dz}}{+}{{x}}^{{2}}{}{{z}}^{{2}}{}{\mathrm{dz}}{}{\mathrm{dz}}$ (4.10)

Example 3.

The CurvatureTensor command also computes the curvature tensor of a connection on a vector bundle.

 M > DGsetup([x, y, z], [u, v], E);
 ${\mathrm{frame name: E}}$ (4.11)
 E > C := Connection(z^2*du &t D_v &t dx);
 ${C}{≔}{{z}}^{{2}}{}{\mathrm{du}}{}{\mathrm{D_v}}{}{\mathrm{dx}}$ (4.12)
 E > CurvatureTensor(C);
 ${-}{2}{}{z}{}{\mathrm{D_v}}{}{\mathrm{du}}{}{\mathrm{dx}}{}{\mathrm{dz}}{+}{2}{}{z}{}{\mathrm{D_v}}{}{\mathrm{du}}{}{\mathrm{dz}}{}{\mathrm{dx}}$ (4.13)

Exercises

Exercise 1

Let g be a metric.  Then the Laplacian of a function f with respect to the metric g is defined as the trace of the second covariant derivative of f (that is, the contraction of the second covariant derivative with the inverse of the metric).  Use this definition to calculate the Laplacian of a function in spherical coordinates.

Hint: Use the PushPullTensor command to transform the standard metric on Euclidean space to spherical coordinates.

 E > with(DifferentialGeometry): with(Tensor):

Solution

Define Cartesian and spherical coordinate systems.

 E > DGsetup([x, y, z], Euc):
 Euc > DGsetup([rho, theta, phi], Sph):

Define the Euclidean metric on Euc and use the PushPullTensor command to  rewrite this metric in spherical coordinates.

 Sph > gEuc := evalDG(dx &t dx + dy &t dy + dz &t dz);
 ${\mathrm{gEuc}}{≔}{\mathrm{dx}}{}{\mathrm{dx}}{+}{\mathrm{dy}}{}{\mathrm{dy}}{+}{\mathrm{dz}}{}{\mathrm{dz}}$ (5.1.1.1)
 Euc > T := Transformation(Sph, Euc, [x = rho*cos(theta)*sin(phi), y = rho*sin(theta)*sin(phi), z = rho*cos(phi)]);
 ${T}{≔}\left[{x}{=}{\mathrm{ρ}}{}{\mathrm{cos}}{}\left({\mathrm{θ}}\right){}{\mathrm{sin}}{}\left({\mathrm{φ}}\right){,}{y}{=}{\mathrm{ρ}}{}{\mathrm{sin}}{}\left({\mathrm{θ}}\right){}{\mathrm{sin}}{}\left({\mathrm{φ}}\right){,}{z}{=}{\mathrm{ρ}}{}{\mathrm{cos}}{}\left({\mathrm{φ}}\right)\right]$ (5.1.1.2)
 Sph > gSph := Pullback(T, gEuc);
 ${\mathrm{gSph}}{≔}{\mathrm{drho}}{}{\mathrm{drho}}{+}{{\mathrm{ρ}}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}^{{2}}{}{\mathrm{dtheta}}{}{\mathrm{dtheta}}{+}{{\mathrm{ρ}}}^{{2}}{}{\mathrm{dphi}}{}{\mathrm{dphi}}$ (5.1.1.3)

Calculate the inverse of the metric gSph.

 Sph > h := InverseMetric(gSph);
 ${h}{≔}{\mathrm{D_rho}}{}{\mathrm{D_rho}}{+}\frac{{\mathrm{D_theta}}{}{\mathrm{D_theta}}}{{{\mathrm{ρ}}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}^{{2}}}{+}\frac{{\mathrm{D_phi}}{}{\mathrm{D_phi}}}{{{\mathrm{ρ}}}^{{2}}}$ (5.1.1.4)

Calculate the Christoffel connection for the metric gSph.

 Sph > C := Christoffel(gSph);
 ${C}{≔}\frac{{\mathrm{drho}}{}{\mathrm{D_theta}}{}{\mathrm{dtheta}}}{{\mathrm{ρ}}}{+}\frac{{\mathrm{drho}}{}{\mathrm{D_phi}}{}{\mathrm{dphi}}}{{\mathrm{ρ}}}{-}{\mathrm{ρ}}{}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}^{{2}}{}{\mathrm{dtheta}}{}{\mathrm{D_rho}}{}{\mathrm{dtheta}}{+}\frac{{\mathrm{dtheta}}{}{\mathrm{D_theta}}{}{\mathrm{drho}}}{{\mathrm{ρ}}}{+}\frac{{\mathrm{cos}}{}\left({\mathrm{φ}}\right){}{\mathrm{dtheta}}{}{\mathrm{D_theta}}{}{\mathrm{dphi}}}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}{-}{\mathrm{sin}}{}\left({\mathrm{φ}}\right){}{\mathrm{cos}}{}\left({\mathrm{φ}}\right){}{\mathrm{dtheta}}{}{\mathrm{D_phi}}{}{\mathrm{dtheta}}{-}{\mathrm{ρ}}{}{\mathrm{dphi}}{}{\mathrm{D_rho}}{}{\mathrm{dphi}}{+}\frac{{\mathrm{cos}}{}\left({\mathrm{φ}}\right){}{\mathrm{dphi}}{}{\mathrm{D_theta}}{}{\mathrm{dtheta}}}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}{+}\frac{{\mathrm{dphi}}{}{\mathrm{D_phi}}{}{\mathrm{drho}}}{{\mathrm{ρ}}}$ (5.1.1.5)

Calculate the covariant derivative of the function f.

 Sph > PDEtools:-declare(f(rho, theta, phi));
 ${f}{}\left({\mathrm{ρ}}{,}{\mathrm{θ}}{,}{\mathrm{φ}}\right){}{\mathrm{will now be displayed as}}{}{f}$ (5.1.1.6)
 Sph > df := CovariantDerivative(f(rho, theta, phi), C);
 ${\mathrm{df}}{≔}{{f}}_{{\mathrm{ρ}}}{}{\mathrm{drho}}{+}{{f}}_{{\mathrm{θ}}}{}{\mathrm{dtheta}}{+}{{f}}_{{\mathrm{φ}}}{}{\mathrm{dphi}}$ (5.1.1.7)

Calculate the 2nd covariant derivative of the function f.

 Sph > d2f := CovariantDerivative(df, C);
 ${\mathrm{d2f}}{≔}{{f}}_{{\mathrm{ρ}}{,}{\mathrm{ρ}}}{}{\mathrm{drho}}{}{\mathrm{drho}}{+}\frac{\left({-}{{f}}_{{\mathrm{θ}}}{+}{{f}}_{{\mathrm{ρ}}{,}{\mathrm{θ}}}{}{\mathrm{ρ}}\right){}{\mathrm{drho}}{}{\mathrm{dtheta}}}{{\mathrm{ρ}}}{-}\frac{\left({{f}}_{{\mathrm{φ}}}{-}{{f}}_{{\mathrm{φ}}{,}{\mathrm{ρ}}}{}{\mathrm{ρ}}\right){}{\mathrm{drho}}{}{\mathrm{dphi}}}{{\mathrm{ρ}}}{+}\frac{\left({-}{{f}}_{{\mathrm{θ}}}{+}{{f}}_{{\mathrm{ρ}}{,}{\mathrm{θ}}}{}{\mathrm{ρ}}\right){}{\mathrm{dtheta}}{}{\mathrm{drho}}}{{\mathrm{ρ}}}{+}\left({\mathrm{sin}}{}\left({\mathrm{φ}}\right){}{\mathrm{cos}}{}\left({\mathrm{φ}}\right){}{{f}}_{{\mathrm{φ}}}{+}{\mathrm{ρ}}{}{{f}}_{{\mathrm{ρ}}}{-}{\mathrm{ρ}}{}{{f}}_{{\mathrm{ρ}}}{}{{\mathrm{cos}}{}\left({\mathrm{φ}}\right)}^{{2}}{+}{{f}}_{{\mathrm{θ}}{,}{\mathrm{θ}}}\right){}{\mathrm{dtheta}}{}{\mathrm{dtheta}}{+}\frac{\left({-}{\mathrm{cos}}{}\left({\mathrm{φ}}\right){}{{f}}_{{\mathrm{θ}}}{+}{{f}}_{{\mathrm{φ}}{,}{\mathrm{θ}}}{}{\mathrm{sin}}{}\left({\mathrm{φ}}\right)\right){}{\mathrm{dtheta}}{}{\mathrm{dphi}}}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}{-}\frac{\left({{f}}_{{\mathrm{φ}}}{-}{{f}}_{{\mathrm{φ}}{,}{\mathrm{ρ}}}{}{\mathrm{ρ}}\right){}{\mathrm{dphi}}{}{\mathrm{drho}}}{{\mathrm{ρ}}}{+}\frac{\left({-}{\mathrm{cos}}{}\left({\mathrm{φ}}\right){}{{f}}_{{\mathrm{θ}}}{+}{{f}}_{{\mathrm{φ}}{,}{\mathrm{θ}}}{}{\mathrm{sin}}{}\left({\mathrm{φ}}\right)\right){}{\mathrm{dphi}}{}{\mathrm{dtheta}}}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}{+}\left({\mathrm{ρ}}{}{{f}}_{{\mathrm{ρ}}}{+}{{f}}_{{\mathrm{φ}}{,}{\mathrm{φ}}}\right){}{\mathrm{dphi}}{}{\mathrm{dphi}}$ (5.1.1.8)

Calculate the Laplacian of f.

 Sph > Lap := ContractIndices(h, d2f, [[1, 1], [2, 2]]);
 ${\mathrm{Lap}}{≔}{-}\frac{{-}{2}{}{\mathrm{ρ}}{}{{f}}_{{\mathrm{ρ}}}{+}{2}{}{\mathrm{ρ}}{}{{f}}_{{\mathrm{ρ}}}{}{{\mathrm{cos}}{}\left({\mathrm{φ}}\right)}^{{2}}{-}{{f}}_{{\mathrm{φ}}{,}{\mathrm{φ}}}{+}{{f}}_{{\mathrm{φ}}{,}{\mathrm{φ}}}{}{{\mathrm{cos}}{}\left({\mathrm{φ}}\right)}^{{2}}{-}{\mathrm{sin}}{}\left({\mathrm{φ}}\right){}{\mathrm{cos}}{}\left({\mathrm{φ}}\right){}{{f}}_{{\mathrm{φ}}}{-}{{f}}_{{\mathrm{θ}}{,}{\mathrm{θ}}}{-}{{f}}_{{\mathrm{ρ}}{,}{\mathrm{ρ}}}{}{{\mathrm{ρ}}}^{{2}}{+}{{f}}_{{\mathrm{ρ}}{,}{\mathrm{ρ}}}{}{{\mathrm{ρ}}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{φ}}\right)}^{{2}}}{{{\mathrm{ρ}}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}^{{2}}}$ (5.1.1.9)
 Sph > simplify(Lap, [cos(phi)^2 = 1 - sin(phi)^2]);
 $\frac{{{f}}_{{\mathrm{θ}}{,}{\mathrm{θ}}}{+}\left({2}{}{\mathrm{ρ}}{}{{f}}_{{\mathrm{ρ}}}{+}{{f}}_{{\mathrm{φ}}{,}{\mathrm{φ}}}{+}{{f}}_{{\mathrm{ρ}}{,}{\mathrm{ρ}}}{}{{\mathrm{ρ}}}^{{2}}\right){}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}^{{2}}{+}{\mathrm{sin}}{}\left({\mathrm{φ}}\right){}{\mathrm{cos}}{}\left({\mathrm{φ}}\right){}{{f}}_{{\mathrm{φ}}}}{{{\mathrm{ρ}}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{φ}}\right)}^{{2}}}$ (5.1.1.10)

Exercise 2

An affine connection nabla on a manifold M is abstractly defined as a mapping (X,Y) -> nabla_X(Y) -- the directional covariant derivative of a vector field Y in the direction of the vector field X.  In terms of this definition, the curvature tensor R is defined by

R(X, Y)(Z) = nabla_X(nabla_Y(Z)) - nabla_Y(nabla_X(Z)) - nabla_[X, Y](Z).

Here X, Y and Z are vector fields on M and R(X, Y)(Z)  denotes the contraction of R against the vector fields X, Y, Z  over the 3rd ,4th and 1st indices respectively. Also, [X, Y] is the Lie bracket of X and Y.

Write a program CheckCurvatureDefinition whose arguments are a connection, its curvature and 3 vector fields and which checks the validity of this definition.  Test your program on the following example.

 Sph > with(DifferentialGeometry): with(Tensor):
 Sph > DGsetup([x, y, z], M):
 M > C := Connection(x^2*dx &t D_y &t dz - y*z*dz &t D_z &t dy);
 ${C}{≔}{{x}}^{{2}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dz}}{-}{y}{}{z}{}{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{dy}}$ (5.2.1)
 M > X1, Y1, Z1 := evalDG(x*D_y - y^2*D_z), evalDG(z^2*D_x + x*y*D_y), evalDG(y*z*D_x + z^2*D_z);
 ${\mathrm{X1}}{,}{\mathrm{Y1}}{,}{\mathrm{Z1}}{≔}{x}{}{\mathrm{D_y}}{-}{{y}}^{{2}}{}{\mathrm{D_z}}{,}{{z}}^{{2}}{}{\mathrm{D_x}}{+}{x}{}{y}{}{\mathrm{D_y}}{,}{y}{}{z}{}{\mathrm{D_x}}{+}{{z}}^{{2}}{}{\mathrm{D_z}}$ (5.2.2)

Solution

 M > CheckCurvatureDefinition := proc(C, R, X, Y, Z)
 M > local LHS, RHS1, RHS2, RHS3, W, Ans;
 M > LHS := ContractIndices(Z &tensor X &tensor Y, R, [[1, 2], [2, 3], [3, 4]]);
 M > RHS1 := DirectionalCovariantDerivative(X, DirectionalCovariantDerivative(Y, Z, C), C);
 M > RHS2 := DirectionalCovariantDerivative(Y, DirectionalCovariantDerivative(X, Z, C), C);
 M > W := LieBracket(X, Y);
 M > RHS3 := DirectionalCovariantDerivative(W, Z, C);
 M > Ans := evalDG(LHS - (RHS1 - RHS2 - RHS3));
 M > simplify(Ans):
 M > end:
 M > R := CurvatureTensor(C);
 ${R}{≔}{2}{}{x}{}{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dz}}{-}{2}{}{x}{}{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}{+}{y}{}{\mathrm{D_z}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dz}}{-}{y}{}{\mathrm{D_z}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dy}}$ (5.2.1.1)
 M > CheckCurvatureDefinition(C, R, X1, Y1, Z1);
 ${0}{}{\mathrm{D_x}}$ (5.2.1.2)

Exercise 3

Check that the curvature tensor (as a rank 4 covariant tensor) for the metric g satisfies the following identities:

[i]  skew-symmetric in the indices 1, 2.

[ii]  skew-symmetric in the indices 3, 4.

[iii]  cyclic permutation of the indices 2, 3, 4 vanishes.

[iv]  symmetric under interchange of the indices 1 <--> 3 and 2 <--> 4.

[v]  cyclic permutation of the indices 3, 4, 5 of the covariant derivative of R vanishes.

 M > with(DifferentialGeometry): with(Tensor):
 M > DGsetup([x, y, z, w], M):
 M > g := evalDG(exp(z)*dx &t dx + exp(x)*dy &t dy + exp(w)*dz &t dz + dw &t dw);
 ${g}{≔}{{ⅇ}}^{{z}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{{ⅇ}}^{{x}}{}{\mathrm{dy}}{}{\mathrm{dy}}{+}{{ⅇ}}^{{w}}{}{\mathrm{dz}}{}{\mathrm{dz}}{+}{\mathrm{dw}}{}{\mathrm{dw}}$ (5.3.1)

Solution

 M > C := Christoffel(g);
 ${C}{≔}\frac{{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dz}}}{{2}}{+}\frac{{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{2}}{-}\frac{{1}}{{2}}{}{{ⅇ}}^{{-}{w}{+}{z}}{}{\mathrm{dx}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{-}\frac{{1}}{{2}}{}{{ⅇ}}^{{-}{z}{+}{x}}{}{\mathrm{dy}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{+}\frac{{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dx}}}{{2}}{+}\frac{{\mathrm{dz}}{}{\mathrm{D_x}}{}{\mathrm{dx}}}{{2}}{+}\frac{{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{dw}}}{{2}}{-}\frac{{1}}{{2}}{}{{ⅇ}}^{{w}}{}{\mathrm{dz}}{}{\mathrm{D_w}}{}{\mathrm{dz}}{+}\frac{{\mathrm{dw}}{}{\mathrm{D_z}}{}{\mathrm{dz}}}{{2}}$ (5.3.1.1)
 M > R0 := CurvatureTensor(C);
 ${\mathrm{R0}}{≔}{-}\frac{{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dw}}{}{\mathrm{dx}}}{{4}}{+}\frac{{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{4}}{+}\frac{{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{4}}{-}\frac{{1}}{{4}}{}{{ⅇ}}^{{z}}{}{\mathrm{D_w}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dz}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{z}}{}{\mathrm{D_w}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}{+}\frac{{\mathrm{D_y}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{4}}{-}\frac{{\mathrm{D_z}}{}{\mathrm{dw}}{}{\mathrm{dz}}{}{\mathrm{dw}}}{{4}}{-}\frac{{\mathrm{D_x}}{}{\mathrm{dw}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{4}}{+}\frac{{\mathrm{D_x}}{}{\mathrm{dw}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{4}}{-}\frac{{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{4}}{-}\frac{{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{4}}{-}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{w}{+}{x}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}{-}\frac{{\mathrm{D_y}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{4}}{+}\frac{{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dw}}}{{4}}{-}\frac{{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{4}}{+}\frac{{\mathrm{D_z}}{}{\mathrm{dw}}{}{\mathrm{dw}}{}{\mathrm{dz}}}{{4}}{+}\frac{{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{4}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{w}}{}{\mathrm{D_w}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dw}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}{+}{x}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}{-}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}{+}{x}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dy}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mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dy}}{-}\frac{{1}}{{4}}{}{{ⅇ}}^{{z}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dz}}$ (5.3.1.3)

Part [i]

 M > SymmetrizeIndices(R, [1, 2], "Symmetric");
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.3.1.4)

Part [ii]

 M > SymmetrizeIndices(R, [3, 4], "Symmetric");
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.3.1.5)

Part [iii]

 M > SymmetrizeIndices(R, [2, 3, 4], "SkewSymmetric");
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.3.1.6)

Part [iv]

 M > R &minus RearrangeIndices(R, [[1, 3], [2, 4]]);
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.3.1.7)

Part [v]

 M > R1 := CovariantDerivative(R, C):
 M > SymmetrizeIndices(R1, [3, 4, 5], "SkewSymmetric");
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.3.1.8)

Exercise 4

The covariant divergence of the Einstein tensor is identically zero.  Check this identity for the metric in Exercise 3.

 M > with(DifferentialGeometry): with(Tensor):
 M > DGsetup([x, y, z, w], M):
 M > g := evalDG(exp(z)*dx &t dx + exp(x)*dy &t dy + exp(w)*dz &t dz + dw &t dw);
 ${g}{≔}{{ⅇ}}^{{z}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{{ⅇ}}^{{x}}{}{\mathrm{dy}}{}{\mathrm{dy}}{+}{{ⅇ}}^{{w}}{}{\mathrm{dz}}{}{\mathrm{dz}}{+}{\mathrm{dw}}{}{\mathrm{dw}}$ (5.4.1)

Solution

Calculate the Christoffel connection.

 M > C := Christoffel(g):

Calculate the curvature tensor.

 M > R0 := CurvatureTensor(C):

Calculate the Einstein tensor.

 M > E := EinsteinTensor(g, R0);
 ${E}{≔}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}}{}{\mathrm{D_x}}{}{\mathrm{D_x}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}{-}{w}}{}{\mathrm{D_x}}{}{\mathrm{D_z}}{+}\left(\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{x}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{x}{-}{w}}\right){}{\mathrm{D_y}}{}{\mathrm{D_y}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}{-}{w}}{}{\mathrm{D_z}}{}{\mathrm{D_x}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}{-}{w}}{}{\mathrm{D_z}}{}{\mathrm{D_z}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{w}}{}{\mathrm{D_z}}{}{\mathrm{D_w}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{w}}{}{\mathrm{D_w}}{}{\mathrm{D_z}}{+}\left(\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{w}}{+}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}}\right){}{\mathrm{D_w}}{}{\mathrm{D_w}}$ (5.4.1.1)

Calculate the covariant derivative of the Einstein tensor.

 M > dE := CovariantDerivative(E, C);
 ${\mathrm{dE}}{≔}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}{-}{w}}{}{\mathrm{D_x}}{}{\mathrm{D_x}}{}{\mathrm{dx}}{-}\frac{{1}}{{8}}{}{{ⅇ}}^{{-}{z}{-}{w}}{}{\mathrm{D_x}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{+}\left(\frac{{1}}{{8}}{}{{ⅇ}}^{{-}{z}{-}{w}}{-}\frac{{1}}{{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{}{{ⅇ}}^{{-}{2}{}{w}}{}{\mathrm{D_z}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{+}\left(\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{w}}{-}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}{-}{w}}\right){}{\mathrm{D_z}}{}{\mathrm{D_z}}{}{\mathrm{dz}}{+}\frac{{1}}{{8}}{}{{ⅇ}}^{{-}{w}}{}{\mathrm{D_z}}{}{\mathrm{D_w}}{}{\mathrm{dz}}{-}\frac{{1}}{{8}}{}{{ⅇ}}^{{-}{w}}{}{\mathrm{D_z}}{}{\mathrm{D_w}}{}{\mathrm{dw}}{+}\frac{{1}}{{8}}{}{{ⅇ}}^{{-}{w}}{}{\mathrm{D_w}}{}{\mathrm{D_x}}{}{\mathrm{dx}}{-}\frac{{1}}{{8}}{}{{ⅇ}}^{{-}{z}}{}{\mathrm{D_w}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{+}\frac{{1}}{{8}}{}{{ⅇ}}^{{-}{w}}{}{\mathrm{D_w}}{}{\mathrm{D_z}}{}{\mathrm{dz}}{-}\frac{{1}}{{8}}{}{{ⅇ}}^{{-}{w}}{}{\mathrm{D_w}}{}{\mathrm{D_z}}{}{\mathrm{dw}}{+}\left({-}\frac{{1}}{{4}}{-}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{z}}\right){}{\mathrm{D_w}}{}{\mathrm{D_w}}{}{\mathrm{dz}}{-}\frac{{1}}{{4}}{}{{ⅇ}}^{{-}{w}}{}{\mathrm{D_w}}{}{\mathrm{D_w}}{}{\mathrm{dw}}$ (5.4.1.2)

Contract the 2nd and 3rd indices of dE.

 M > ContractIndices(dE, [[2, 3]]);
 ${0}{}{\mathrm{D_x}}$ (5.4.1.3)

Exercise 5

For what values of a1, a2, a3, a4 does the metric g have vanishing Ricci tensor.  (See Stephani, Kramer et. al., page 197.)

 M > with(DifferentialGeometry): with(Tensor):
 M > DGsetup([x1, x2, x3, x4], M):
 M > G := LinearAlgebra:-DiagonalMatrix([x4^(2*a1), x4^(2*a2), x4^(2*a3), x4^(2*a4)]);
 M > g := convert(G, DGtensor, [["cov_bas", "cov_bas"], []]);
 ${g}{≔}{{\mathrm{x4}}}^{{2}{}{\mathrm{a1}}}{}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{{\mathrm{x4}}}^{{2}{}{\mathrm{a2}}}{}{\mathrm{dx2}}{}{\mathrm{dx2}}{+}{{\mathrm{x4}}}^{{2}{}{\mathrm{a3}}}{}{\mathrm{dx3}}{}{\mathrm{dx3}}{+}{{\mathrm{x4}}}^{{2}{}{\mathrm{a4}}}{}{\mathrm{dx4}}{}{\mathrm{dx4}}$ (5.5.1)

Solution

 M > C := Christoffel(g);
 ${C}{≔}\frac{{\mathrm{a1}}{}{\mathrm{dx1}}{}{\mathrm{D_x1}}{}{\mathrm{dx4}}}{{\mathrm{x4}}}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a1}}{-}{1}}{}{\mathrm{a1}}{}{\mathrm{dx1}}{}{\mathrm{D_x4}}{}{\mathrm{dx1}}{+}\frac{{\mathrm{a2}}{}{\mathrm{dx2}}{}{\mathrm{D_x2}}{}{\mathrm{dx4}}}{{\mathrm{x4}}}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a2}}{-}{1}}{}{\mathrm{a2}}{}{\mathrm{dx2}}{}{\mathrm{D_x4}}{}{\mathrm{dx2}}{+}\frac{{\mathrm{a3}}{}{\mathrm{dx3}}{}{\mathrm{D_x3}}{}{\mathrm{dx4}}}{{\mathrm{x4}}}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a3}}{-}{1}}{}{\mathrm{a3}}{}{\mathrm{dx3}}{}{\mathrm{D_x4}}{}{\mathrm{dx3}}{+}\frac{{\mathrm{a1}}{}{\mathrm{dx4}}{}{\mathrm{D_x1}}{}{\mathrm{dx1}}}{{\mathrm{x4}}}{+}\frac{{\mathrm{a2}}{}{\mathrm{dx4}}{}{\mathrm{D_x2}}{}{\mathrm{dx2}}}{{\mathrm{x4}}}{+}\frac{{\mathrm{a3}}{}{\mathrm{dx4}}{}{\mathrm{D_x3}}{}{\mathrm{dx3}}}{{\mathrm{x4}}}{+}\frac{{\mathrm{a4}}{}{\mathrm{dx4}}{}{\mathrm{D_x4}}{}{\mathrm{dx4}}}{{\mathrm{x4}}}$ (5.5.1.1)
 M > R := CurvatureTensor(C);
 ${R}{≔}{-}{\mathrm{a1}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a2}}{-}{2}}{}{\mathrm{a2}}{}{\mathrm{D_x1}}{}{\mathrm{dx2}}{}{\mathrm{dx1}}{}{\mathrm{dx2}}{+}{\mathrm{a1}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a2}}{-}{2}}{}{\mathrm{a2}}{}{\mathrm{D_x1}}{}{\mathrm{dx2}}{}{\mathrm{dx2}}{}{\mathrm{dx1}}{-}{\mathrm{a1}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a3}}{-}{2}}{}{\mathrm{a3}}{}{\mathrm{D_x1}}{}{\mathrm{dx3}}{}{\mathrm{dx1}}{}{\mathrm{dx3}}{+}{\mathrm{a1}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a3}}{-}{2}}{}{\mathrm{a3}}{}{\mathrm{D_x1}}{}{\mathrm{dx3}}{}{\mathrm{dx3}}{}{\mathrm{dx1}}{-}\frac{{\mathrm{a1}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a1}}{-}{1}\right){}{\mathrm{D_x1}}{}{\mathrm{dx4}}{}{\mathrm{dx1}}{}{\mathrm{dx4}}}{{{\mathrm{x4}}}^{{2}}}{+}\frac{{\mathrm{a1}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a1}}{-}{1}\right){}{\mathrm{D_x1}}{}{\mathrm{dx4}}{}{\mathrm{dx4}}{}{\mathrm{dx1}}}{{{\mathrm{x4}}}^{{2}}}{+}{\mathrm{a2}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a1}}{-}{2}}{}{\mathrm{a1}}{}{\mathrm{D_x2}}{}{\mathrm{dx1}}{}{\mathrm{dx1}}{}{\mathrm{dx2}}{-}{\mathrm{a2}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a1}}{-}{2}}{}{\mathrm{a1}}{}{\mathrm{D_x2}}{}{\mathrm{dx1}}{}{\mathrm{dx2}}{}{\mathrm{dx1}}{-}{\mathrm{a2}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a3}}{-}{2}}{}{\mathrm{a3}}{}{\mathrm{D_x2}}{}{\mathrm{dx3}}{}{\mathrm{dx2}}{}{\mathrm{dx3}}{+}{\mathrm{a2}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a3}}{-}{2}}{}{\mathrm{a3}}{}{\mathrm{D_x2}}{}{\mathrm{dx3}}{}{\mathrm{dx3}}{}{\mathrm{dx2}}{-}\frac{{\mathrm{a2}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a2}}{-}{1}\right){}{\mathrm{D_x2}}{}{\mathrm{dx4}}{}{\mathrm{dx2}}{}{\mathrm{dx4}}}{{{\mathrm{x4}}}^{{2}}}{+}\frac{{\mathrm{a2}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a2}}{-}{1}\right){}{\mathrm{D_x2}}{}{\mathrm{dx4}}{}{\mathrm{dx4}}{}{\mathrm{dx2}}}{{{\mathrm{x4}}}^{{2}}}{+}{\mathrm{a3}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a1}}{-}{2}}{}{\mathrm{a1}}{}{\mathrm{D_x3}}{}{\mathrm{dx1}}{}{\mathrm{dx1}}{}{\mathrm{dx3}}{-}{\mathrm{a3}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a1}}{-}{2}}{}{\mathrm{a1}}{}{\mathrm{D_x3}}{}{\mathrm{dx1}}{}{\mathrm{dx3}}{}{\mathrm{dx1}}{+}{\mathrm{a3}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a2}}{-}{2}}{}{\mathrm{a2}}{}{\mathrm{D_x3}}{}{\mathrm{dx2}}{}{\mathrm{dx2}}{}{\mathrm{dx3}}{-}{\mathrm{a3}}{}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a2}}{-}{2}}{}{\mathrm{a2}}{}{\mathrm{D_x3}}{}{\mathrm{dx2}}{}{\mathrm{dx3}}{}{\mathrm{dx2}}{-}\frac{{\mathrm{a3}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a3}}{-}{1}\right){}{\mathrm{D_x3}}{}{\mathrm{dx4}}{}{\mathrm{dx3}}{}{\mathrm{dx4}}}{{{\mathrm{x4}}}^{{2}}}{+}\frac{{\mathrm{a3}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a3}}{-}{1}\right){}{\mathrm{D_x3}}{}{\mathrm{dx4}}{}{\mathrm{dx4}}{}{\mathrm{dx3}}}{{{\mathrm{x4}}}^{{2}}}{+}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a1}}{-}{2}}{}{\mathrm{a1}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a1}}{-}{1}\right){}{\mathrm{D_x4}}{}{\mathrm{dx1}}{}{\mathrm{dx1}}{}{\mathrm{dx4}}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a1}}{-}{2}}{}{\mathrm{a1}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a1}}{-}{1}\right){}{\mathrm{D_x4}}{}{\mathrm{dx1}}{}{\mathrm{dx4}}{}{\mathrm{dx1}}{+}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a2}}{-}{2}}{}{\mathrm{a2}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a2}}{-}{1}\right){}{\mathrm{D_x4}}{}{\mathrm{dx2}}{}{\mathrm{dx2}}{}{\mathrm{dx4}}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a2}}{-}{2}}{}{\mathrm{a2}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a2}}{-}{1}\right){}{\mathrm{D_x4}}{}{\mathrm{dx2}}{}{\mathrm{dx4}}{}{\mathrm{dx2}}{+}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a3}}{-}{2}}{}{\mathrm{a3}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a3}}{-}{1}\right){}{\mathrm{D_x4}}{}{\mathrm{dx3}}{}{\mathrm{dx3}}{}{\mathrm{dx4}}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a3}}{-}{2}}{}{\mathrm{a3}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a3}}{-}{1}\right){}{\mathrm{D_x4}}{}{\mathrm{dx3}}{}{\mathrm{dx4}}{}{\mathrm{dx3}}$ (5.5.1.2)
 M > Ric := RicciTensor(R);
 ${\mathrm{Ric}}{≔}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a1}}{-}{2}}{}{\mathrm{a1}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a1}}{-}{1}{+}{\mathrm{a3}}{+}{\mathrm{a2}}\right){}{\mathrm{dx1}}{}{\mathrm{dx1}}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a2}}{-}{2}}{}{\mathrm{a2}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a1}}{-}{1}{+}{\mathrm{a3}}{+}{\mathrm{a2}}\right){}{\mathrm{dx2}}{}{\mathrm{dx2}}{-}{{\mathrm{x4}}}^{{-}{2}{}{\mathrm{a4}}{+}{2}{}{\mathrm{a3}}{-}{2}}{}{\mathrm{a3}}{}\left({-}{\mathrm{a4}}{+}{\mathrm{a1}}{-}{1}{+}{\mathrm{a3}}{+}{\mathrm{a2}}\right){}{\mathrm{dx3}}{}{\mathrm{dx3}}{-}\frac{\left({-}{\mathrm{a3}}{}{\mathrm{a4}}{+}{{\mathrm{a3}}}^{{2}}{-}{\mathrm{a3}}{-}{\mathrm{a2}}{}{\mathrm{a4}}{+}{{\mathrm{a2}}}^{{2}}{-}{\mathrm{a2}}{-}{\mathrm{a1}}{}{\mathrm{a4}}{+}{{\mathrm{a1}}}^{{2}}{-}{\mathrm{a1}}\right){}{\mathrm{dx4}}{}{\mathrm{dx4}}}{{{\mathrm{x4}}}^{{2}}}$ (5.5.1.3)
 M > Constraints := [a1 + a2 + a3 = a4 + 1, a1^2 + a2^2 + a3^2 = (a4 + 1)^2];
 ${\mathrm{Constraints}}{≔}\left[{\mathrm{a1}}{+}{\mathrm{a2}}{+}{\mathrm{a3}}{=}{\mathrm{a4}}{+}{1}{,}{{\mathrm{a1}}}^{{2}}{+}{{\mathrm{a2}}}^{{2}}{+}{{\mathrm{a3}}}^{{2}}{=}{\left({\mathrm{a4}}{+}{1}\right)}^{{2}}\right]$ (5.5.1.4)
 M > Tools:-DGmap(1, simplify, Ric, Constraints);
 ${0}{}{\mathrm{dx1}}{}{\mathrm{dx1}}$ (5.5.1.5)

Exercise 6

A vector field is parallel with respect to a connection C if  and only if covariant derivative vanishes. The integrability conditions  which insure the existence of a basis of parallel vector fields is given by the vanishing of the curvature tensor.

[i]  Check that the curvature tensor of the symmetric connection C vanishes.

[ii]  Then use the Maple pdsolve command to find a set of 3 vector fields X1, X2, X3 which are parallel with respect to C and satisfy X1(p) = D_x, X2(p) = D_y, and X3(p) = D_z, where p = [1, 1, 1].

 M > with(DifferentialGeometry): with(Tensor):
 E3 > DGsetup([x, y, z], E3):
 E3 > C := Connection((1/y)*dx &t D_x &t dy - (1/z)*dx &t D_x &t dz + (1/y)*dy &t D_x &t dx - (1/z)*dy &t D_y &t dz - (1/z)*dz &t D_x &t dx - (1/z)*dz &t D_y &t dy - (2/z)*dz &t D_z &t dz);
 ${C}{≔}\frac{{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dy}}}{{y}}{-}\frac{{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dz}}}{{z}}{+}\frac{{\mathrm{dy}}{}{\mathrm{D_x}}{}{\mathrm{dx}}}{{y}}{-}\frac{{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dz}}}{{z}}{-}\frac{{\mathrm{dz}}{}{\mathrm{D_x}}{}{\mathrm{dx}}}{{z}}{-}\frac{{\mathrm{dz}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{z}}{-}\frac{{2}{}{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{dz}}}{{z}}$ (5.6.1)

Solution

Part [i]

 E3 > CurvatureTensor(C);
 ${0}{}{\mathrm{D_x}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.6.1.1)

Part [ii]

First create a vector field on E3 with arbitrary coefficients.

 E3 > PDEtools:-declare([a, b, c](x, y, z), quiet);
 E3 > U0 := evalDG(a(x, y, z)*D_x + b(x, y, z)*D_y + c(x, y, z)*D_z);
 ${\mathrm{U0}}{≔}{a}{}{\mathrm{D_x}}{+}{b}{}{\mathrm{D_y}}{+}{c}{}{\mathrm{D_z}}$ (5.6.1.2)

Calculate the covariant derivative of the vector field U0 with respect to the connection C.

 E3 > V := CovariantDerivative(U0, C);
 ${V}{≔}\frac{\left({-}{c}{}{y}{+}{z}{}{b}{+}{z}{}{{a}}_{{x}}{}{y}\right){}{\mathrm{D_x}}{}{\mathrm{dx}}}{{y}{}{z}}{+}\frac{\left({a}{+}{{a}}_{{y}}{}{y}\right){}{\mathrm{D_x}}{}{\mathrm{dy}}}{{y}}{-}\frac{\left({a}{-}{{a}}_{{z}}{}{z}\right){}{\mathrm{D_x}}{}{\mathrm{dz}}}{{z}}{+}{{b}}_{{x}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{+}\frac{\left({-}{c}{+}{{b}}_{{y}}{}{z}\right){}{\mathrm{D_y}}{}{\mathrm{dy}}}{{z}}{-}\frac{\left({b}{-}{{b}}_{{z}}{}{z}\right){}{\mathrm{D_y}}{}{\mathrm{dz}}}{{z}}{+}{{c}}_{{x}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{+}{{c}}_{{y}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{-}\frac{\left({2}{}{c}{-}{{c}}_{{z}}{}{z}\right){}{\mathrm{D_z}}{}{\mathrm{dz}}}{{z}}$ (5.6.1.3)

Solve the partial differential equations obtained by setting the coefficients of the covariant derivatives to 0.

 E3 > Eq := Tools:-DGinfo(V, "CoefficientSet");
 ${\mathrm{Eq}}{≔}\left\{{{b}}_{{x}}{,}{{c}}_{{x}}{,}{{c}}_{{y}}{,}\frac{{a}{+}{{a}}_{{y}}{}{y}}{{y}}{,}\frac{{-}{c}{+}{{b}}_{{y}}{}{z}}{{z}}{,}\frac{{-}{c}{}{y}{+}{z}{}{b}{+}{z}{}{{a}}_{{x}}{}{y}}{{y}{}{z}}{,}{-}\frac{{a}{-}{{a}}_{{z}}{}{z}}{{z}}{,}{-}\frac{{b}{-}{{b}}_{{z}}{}{z}}{{z}}{,}{-}\frac{{2}{}{c}{-}{{c}}_{{z}}{}{z}}{{z}}\right\}$ (5.6.1.4)
 E3 > soln := pdsolve(Eq);
 ${\mathrm{soln}}{≔}\left\{{a}{=}\frac{\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}\right){}{z}}{{y}}{,}{b}{=}{z}{}\left({\mathrm{_C1}}{}{y}{-}{\mathrm{_C2}}\right){,}{c}{=}{\mathrm{_C1}}{}{{z}}^{{2}}\right\}$ (5.6.1.5)

Back substitute the solution to the equations Eq into the vector field U0.

 E3 > U1 := eval(U0, soln);
 ${\mathrm{U1}}{≔}\frac{\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}\right){}{z}{}{\mathrm{D_x}}}{{y}}{+}{z}{}\left({\mathrm{_C1}}{}{y}{-}{\mathrm{_C2}}\right){}{\mathrm{D_y}}{+}{\mathrm{_C1}}{}{{z}}^{{2}}{}{\mathrm{D_z}}$ (5.6.1.6)
 E3 > U2 := eval(U1, [x = 1, y = 1, z = 1]);
 ${\mathrm{U2}}{≔}\left({\mathrm{_C2}}{+}{\mathrm{_C3}}\right){}{\mathrm{D_x}}{+}\left({\mathrm{_C1}}{-}{\mathrm{_C2}}\right){}{\mathrm{D_y}}{+}{\mathrm{_C1}}{}{\mathrm{D_z}}$ (5.6.1.7)

Determine the values for _C1, _C2, _C3 to match the initial values specified in the problem.

 E3 > X := Tools:-DGsimplify(eval(U1, {_C1 = 0, _C2 = 0, _C3 = 1}));
 ${X}{≔}\frac{{z}{}{\mathrm{D_x}}}{{y}}$ (5.6.1.8)
 E3 > Y := Tools:-DGsimplify(eval(U1, {_C1 = 0, _C2 = -1, _C3 = 1}));
 ${Y}{≔}{-}\frac{\left({x}{-}{1}\right){}{z}{}{\mathrm{D_x}}}{{y}}{+}{z}{}{\mathrm{D_y}}$ (5.6.1.9)
 E3 > Z := Tools:-DGsimplify(eval(U1, {_C1 = 1, _C2 = 1, _C3 = -1}));
 ${Z}{≔}\frac{\left({x}{-}{1}\right){}{z}{}{\mathrm{D_x}}}{{y}}{+}{z}{}\left({y}{-}{1}\right){}{\mathrm{D_y}}{+}{{z}}^{{2}}{}{\mathrm{D_z}}$ (5.6.1.10)

Remark. The Lie brackets of X, Y, and Z all vanish.

 E3 > LieBracket(X, Y), LieBracket(X, Z), LieBracket(Y, Z);
 ${0}{}{\mathrm{D_x}}{,}{0}{}{\mathrm{D_x}}{,}{0}{}{\mathrm{D_x}}$ (5.6.1.11)

Exercise 7

The following exercise appears in Lovelock and Rund, page 178, and also Spivak, page 320.

Let A be a symmetric rank 2 covariant tensor on R^n.  Let nabla denote covariant differentiation with respect to the zero connection on R^n and consider the system of  PDEs

A = SymmetrizeIndices(nabla(U), [1, 2], symmetric)  (*)

The integrability conditions for the equations (*) are

SymmetrizeIndices(nabla(nabla(A), [[1, 3], [2, 4]], skewsymmetric) = 0  (**)

[i]  Write a program which checks these integrability conditions.

[ii]  Integrate the equations (*) by using two applications of the homotopy operator for the exterior derivative operator.

Use the following tensors to check your programs.

 E3 > with(DifferentialGeometry): with(Tensor):
 E3 > DGsetup([x, y, z], M3):
 M3 > DGsetup([x, y, z, w], M4):
 M4 > ChangeFrame(M3):
 M3 > A1 := evalDG((y + z)*dx &t dz + x*dy &t dz + (y + z)*dz &t dx + x*dz &t dy);
 ${\mathrm{A1}}{≔}\left({y}{+}{z}\right){}{\mathrm{dx}}{}{\mathrm{dz}}{+}{x}{}{\mathrm{dy}}{}{\mathrm{dz}}{+}\left({y}{+}{z}\right){}{\mathrm{dz}}{}{\mathrm{dx}}{+}{x}{}{\mathrm{dz}}{}{\mathrm{dy}}$ (5.7.1)
 M3 > A2 := evalDG(-2/(x^2 + y^2 + z^2)^2*x*dx &t dx - 1/(x^2 + y^2 + z^2)^2*y*dx &t dy - 1/(x^2 + y^2 + z^2)^2*z*dx &t dz - 1/(x^2 + y^2 + z^2)^2*y*dy &t dx - 1/(x^2 + y^2 + z^2)^2*z*dz &t dx);
 ${\mathrm{A2}}{≔}{-}\frac{{2}{}{x}{}{\mathrm{dx}}{}{\mathrm{dx}}}{{\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{y}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{z}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{y}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{-}\frac{{z}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}$ (5.7.2)
 M3 > ChangeFrame(M4):
 M4 > A3 := evalDG(1/2*cos(x)*sin(y)*sin(z)*dx &t dw + 1/2*sin(x)*cos(y)*sin(z)*dy &t dw + 1/2*sin(x)*sin(y)*cos(z)*dz &t dw + 1/2*cos(x)*sin(y)*sin(z)*dw &t dx + 1/2*sin(x)*cos(y)*sin(z)*dw &t dy + 1/2*sin(x)*sin(y)*cos(z)*dw &t dz);
 ${\mathrm{A3}}{≔}\frac{{1}}{{2}}{}{\mathrm{cos}}{}\left({x}\right){}{\mathrm{sin}}{}\left({y}\right){}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{dx}}{}{\mathrm{dw}}{+}\frac{{1}}{{2}}{}{\mathrm{sin}}{}\left({x}\right){}{\mathrm{cos}}{}\left({y}\right){}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{dy}}{}{\mathrm{dw}}{+}\frac{{1}}{{2}}{}{\mathrm{sin}}{}\left({x}\right){}{\mathrm{sin}}{}\left({y}\right){}{\mathrm{cos}}{}\left({z}\right){}{\mathrm{dz}}{}{\mathrm{dw}}{+}\frac{{1}}{{2}}{}{\mathrm{cos}}{}\left({x}\right){}{\mathrm{sin}}{}\left({y}\right){}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{dw}}{}{\mathrm{dx}}{+}\frac{{1}}{{2}}{}{\mathrm{sin}}{}\left({x}\right){}{\mathrm{cos}}{}\left({y}\right){}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{dw}}{}{\mathrm{dy}}{+}\frac{{1}}{{2}}{}{\mathrm{sin}}{}\left({x}\right){}{\mathrm{sin}}{}\left({y}\right){}{\mathrm{cos}}{}\left({z}\right){}{\mathrm{dw}}{}{\mathrm{dz}}$ (5.7.3)

Hint: Here is a program which computes the right-hand side of (*).

 M4 > Delta:= (U,C) -> SymmetrizeIndices(CovariantDerivative(U, C), [1, 2], "Symmetric"):

Solution

 M3 > CheckIntegrability := proc(A, C)
 M3 > local T;
 M3 > T := CovariantDerivative(CovariantDerivative(A, C), C):
 M3 > SymmetrizeIndices(SymmetrizeIndices(T, [1, 3], "SkewSymmetric"), [2, 4], "SkewSymmetric");
 M4 > end:
 M4 >
 M3 > Solve := proc(A, C)
 M3 > local Fr, n, B, Omega, T, i, j, alpha, beta, omega, theta, S, U;
 M3 > Fr := Tools:-DGinfo(A, "ObjectFrame");
 M3 > n := Tools:-DGinfo(Fr, "FrameBaseDimension");
 M3 > B := Tools:-DGinfo(Fr, "FrameBaseVectors");
 M3 > Omega := Tools:-DGinfo(Fr, "FrameBaseForms");
 M3 > T := CovariantDerivative(A, C);
 M3 > omega := Tools:-DGzero("form", 2);
 M3 > for i to n do for j to n do
 M3 > alpha := ContractIndices(B[i] &tensor B[j], T, [[1, 2], [2, 3]]) &minus ContractIndices(B[j] &tensor B[i], T, [[1, 2], [2, 3]]);
 M3 > beta := convert(alpha, DGform);
 M3 > theta := DeRhamHomotopy(beta, args[3 .. -1]);
 M3 > omega := omega &plus (theta &mult (Omega[i] &wedge Omega[j]));
 M3 > od;
 M3 > od;
 M3 > S := A &plus ((1/2) &mult (convert(omega, DGtensor)));
 M3 > U := Tools:-DGzero("form", 1);
 M3 > for i to n do
 M3 > alpha := ContractIndices(convert(B[i], DGtensor), S, [[1, 1]]);
 M3 > beta := convert(alpha, DGform);
 M3 > theta := DeRhamHomotopy(beta, args[3 .. -1]);
 M3 > U := U &plus (theta &mult (Omega[i]));
 M3 > od:
 M3 > convert(U, DGtensor):
 M4 > end:

Part [i]

 M4 > ChangeFrame(M3):
 M3 > C := Connection(0 &mult dx &t D_x &t dx);
 ${C}{≔}{0}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dx}}$ (5.7.1.1)
 M3 > CheckIntegrability(A1, C);
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.7.1.2)
 M3 > U1 := Solve(A1, C);
 ${\mathrm{U1}}{≔}{{z}}^{{2}}{}{\mathrm{dx}}{+}{2}{}{x}{}{y}{}{\mathrm{dz}}$ (5.7.1.3)
 M3 > A1 &minus Delta(U1, C);
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.7.1.4)

Part [ii]

 M3 > CheckIntegrability(A2, C);
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.7.1.5)
 M3 > U2 := Solve(A2, C, integrationlimits = [infinity, 1]);
 ${\mathrm{U2}}{≔}\frac{{\mathrm{dx}}}{{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}$ (5.7.1.6)
 M3 > A2 &minus Delta(U2, C);
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.7.1.7)

Part [iii]

 M3 > ChangeFrame(M4):
 M4 > C := Connection(0 &mult dx &t D_x &t dx);
 ${C}{≔}{0}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dx}}$ (5.7.1.8)
 M4 > U3 := Solve(A3, C);
 ${\mathrm{U3}}{≔}\left(\frac{{1}}{{4}}{}{\mathrm{sin}}{}\left({-}{z}{+}{x}{+}{y}\right){+}\frac{{1}}{{4}}{}{\mathrm{sin}}{}\left({z}{+}{x}{-}{y}\right){-}\frac{{1}}{{4}}{}{\mathrm{sin}}{}\left({-}{z}{+}{x}{-}{y}\right){-}\frac{{1}}{{4}}{}{\mathrm{sin}}{}\left({z}{+}{x}{+}{y}\right)\right){}{\mathrm{dw}}$ (5.7.1.9)
 M4 > U3 := map(expand, U3);
 ${\mathrm{U3}}{≔}{\mathrm{sin}}{}\left({x}\right){}{\mathrm{sin}}{}\left({y}\right){}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{dw}}$ (5.7.1.10)
 M4 > A3 &minus Delta(U3, C);
 ${0}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.7.1.11)

Exercise 8

Use the Maple pdsolve command to determine which of the following connections C1, C2, C3 are the Christoffel symbols of a metric.

 M4 > with(DifferentialGeometry): with(Tensor):
 M4 > DGsetup([x, y], E2);
 ${\mathrm{frame name: E2}}$ (5.8.1)
 E2 > C1 := Connection(x*dx &t D_y &t dx);
 ${\mathrm{C1}}{≔}{x}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dx}}$ (5.8.2)
 E2 > C2 := Connection(y^2*dx &t D_y &t dx);
 ${\mathrm{C2}}{≔}{{y}}^{{2}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dx}}$ (5.8.3)
 E2 > DGsetup([x, y, z], E3);
 ${\mathrm{frame name: E3}}$ (5.8.4)
 E3 > C3 := Connection((-1/x)*dx &t D_x &t dx - (1/2/x)*dx &t D_y &t dy - (1/2/z)*dy &t D_x &t dy - (1/2/x)*dy &t D_y &t dx - (1/2/z)*dy &t D_y &t dz - (1/2/x)*dy &t D_z &t dy - (1/2/z)*dz &t D_y &t dy - (1/z)*dz &t D_z &t dz);
 ${\mathrm{C3}}{≔}{-}\frac{{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{dx}}}{{x}}{-}\frac{{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{2}{}{x}}{-}\frac{{\mathrm{dy}}{}{\mathrm{D_x}}{}{\mathrm{dy}}}{{2}{}{z}}{-}\frac{{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dx}}}{{2}{}{x}}{-}\frac{{\mathrm{dy}}{}{\mathrm{D_y}}{}{\mathrm{dz}}}{{2}{}{z}}{-}\frac{{\mathrm{dy}}{}{\mathrm{D_z}}{}{\mathrm{dy}}}{{2}{}{x}}{-}\frac{{\mathrm{dz}}{}{\mathrm{D_y}}{}{\mathrm{dy}}}{{2}{}{z}}{-}\frac{{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{dz}}}{{z}}$ (5.8.5)

Solution

 E3 > PDEtools:-declare([a, b, c](x, y), quiet);
 E3 > ChangeFrame(E2):
 E2 > g := evalDG(a(x, y)*dx &t dx + 2*b(x, y)*dx &s dy + c(x, y)*dy &t dy);
 ${g}{≔}{a}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{2}{}{b}{}{\mathrm{dx}}{}{\mathrm{dy}}{+}{2}{}{b}{}{\mathrm{dy}}{}{\mathrm{dx}}{+}{c}{}{\mathrm{dy}}{}{\mathrm{dy}}$ (5.8.1.1)

Part 1.

 E2 > k1 := CovariantDerivative(g, C1);
 ${\mathrm{k1}}{≔}\left({-}{4}{}{x}{}{b}{+}{{a}}_{{x}}\right){}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{{a}}_{{y}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dy}}{+}\left({-}{x}{}{c}{+}{2}{}{{b}}_{{x}}\right){}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}{+}{2}{}{{b}}_{{y}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dy}}{+}\left({-}{x}{}{c}{+}{2}{}{{b}}_{{x}}\right){}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{2}{}{{b}}_{{y}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}{+}{{c}}_{{x}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}{+}{{c}}_{{y}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dy}}$ (5.8.1.2)
 E2 > Eq1 := Tools:-DGinfo(k1, "CoefficientSet");
 ${\mathrm{Eq1}}{≔}\left\{{{a}}_{{y}}{,}{{c}}_{{x}}{,}{{c}}_{{y}}{,}{2}{}{{b}}_{{y}}{,}{-}{4}{}{x}{}{b}{+}{{a}}_{{x}}{,}{-}{x}{}{c}{+}{2}{}{{b}}_{{x}}\right\}$ (5.8.1.3)
 E2 > soln1 := pdsolve(Eq1);
 ${\mathrm{soln1}}{≔}\left\{{a}{=}\frac{{\mathrm{_C1}}{}{{x}}^{{4}}}{{4}}{+}\frac{{\mathrm{_C2}}{}{{x}}^{{2}}}{{2}}{+}{\mathrm{_C3}}{,}{b}{=}\frac{{{x}}^{{2}}{}{\mathrm{_C1}}}{{4}}{+}\frac{{\mathrm{_C2}}}{{4}}{,}{c}{=}{\mathrm{_C1}}\right\}$ (5.8.1.4)
 E2 > g1 := eval(g, soln1);
 ${\mathrm{g1}}{≔}\left(\frac{{\mathrm{_C1}}{}{{x}}^{{4}}}{{4}}{+}\frac{{\mathrm{_C2}}{}{{x}}^{{2}}}{{2}}{+}{\mathrm{_C3}}\right){}{\mathrm{dx}}{}{\mathrm{dx}}{+}\left(\frac{{{x}}^{{2}}{}{\mathrm{_C1}}}{{2}}{+}\frac{{\mathrm{_C2}}}{{2}}\right){}{\mathrm{dx}}{}{\mathrm{dy}}{+}\left(\frac{{{x}}^{{2}}{}{\mathrm{_C1}}}{{2}}{+}\frac{{\mathrm{_C2}}}{{2}}\right){}{\mathrm{dy}}{}{\mathrm{dx}}{+}{\mathrm{_C1}}{}{\mathrm{dy}}{}{\mathrm{dy}}$ (5.8.1.5)
 E2 > Christoffel(g1);
 ${x}{}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{dx}}$ (5.8.1.6)

Part 2.

 E2 > k2 := CovariantDerivative(g, C2);
 ${\mathrm{k2}}{≔}\left({-}{4}{}{{y}}^{{2}}{}{b}{+}{{a}}_{{x}}\right){}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{{a}}_{{y}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dy}}{+}\left({-}{{y}}^{{2}}{}{c}{+}{2}{}{{b}}_{{x}}\right){}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}{+}{2}{}{{b}}_{{y}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dy}}{+}\left({-}{{y}}^{{2}}{}{c}{+}{2}{}{{b}}_{{x}}\right){}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{2}{}{{b}}_{{y}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}{+}{{c}}_{{x}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}{+}{{c}}_{{y}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dy}}$ (5.8.1.7)
 E2 > Eq2 := Tools:-DGinfo(k2, "CoefficientSet");
 ${\mathrm{Eq2}}{≔}\left\{{{a}}_{{y}}{,}{{c}}_{{x}}{,}{{c}}_{{y}}{,}{2}{}{{b}}_{{y}}{,}{-}{4}{}{{y}}^{{2}}{}{b}{+}{{a}}_{{x}}{,}{-}{{y}}^{{2}}{}{c}{+}{2}{}{{b}}_{{x}}\right\}$ (5.8.1.8)
 E2 > soln2 := pdsolve(Eq2);
 ${\mathrm{soln2}}{≔}\left\{{a}{=}{\mathrm{_C1}}{,}{b}{=}{0}{,}{c}{=}{0}\right\}$ (5.8.1.9)
 E2 > Tools:-DGsimplify(eval(g, soln2));
 ${\mathrm{_C1}}{}{\mathrm{dx}}{}{\mathrm{dx}}$ (5.8.1.10)

The metric is degenerate so that C2 is not a metric connection.

Part 3.

 E2 > vars := [seq(a||i, i = 1 .. 6)](x, y, z):
 E2 > PDEtools:-declare(vars, quiet);
 E2 > ChangeFrame(E3):
 E3 > S := GenerateSymmetricTensors([dx, dy, dz], 2);
 ${S}{≔}\left[{\mathrm{dx}}{}{\mathrm{dx}}{,}\frac{{\mathrm{dx}}{}{\mathrm{dy}}}{{2}}{+}\frac{{\mathrm{dy}}{}{\mathrm{dx}}}{{2}}{,}\frac{{\mathrm{dx}}{}{\mathrm{dz}}}{{2}}{+}\frac{{\mathrm{dz}}{}{\mathrm{dx}}}{{2}}{,}{\mathrm{dy}}{}{\mathrm{dy}}{,}\frac{{\mathrm{dy}}{}{\mathrm{dz}}}{{2}}{+}\frac{{\mathrm{dz}}{}{\mathrm{dy}}}{{2}}{,}{\mathrm{dz}}{}{\mathrm{dz}}\right]$ (5.8.1.11)
 E3 > g := DGzip(vars, S, "plus");
 ${g}{≔}{\mathrm{a1}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}\frac{{\mathrm{a2}}{}{\mathrm{dx}}{}{\mathrm{dy}}}{{2}}{+}\frac{{\mathrm{a3}}{}{\mathrm{dx}}{}{\mathrm{dz}}}{{2}}{+}\frac{{\mathrm{a2}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{2}}{+}{\mathrm{a4}}{}{\mathrm{dy}}{}{\mathrm{dy}}{+}\frac{{\mathrm{a5}}{}{\mathrm{dy}}{}{\mathrm{dz}}}{{2}}{+}\frac{{\mathrm{a3}}{}{\mathrm{dz}}{}{\mathrm{dx}}}{{2}}{+}\frac{{\mathrm{a5}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{2}}{+}{\mathrm{a6}}{}{\mathrm{dz}}{}{\mathrm{dz}}$ (5.8.1.12)
 E3 > k3 := CovariantDerivative(g, C3);
 ${\mathrm{k3}}{≔}\frac{{1}}{{2}}{}\frac{\left({\mathrm{a5}}{+}{2}{}{{\mathrm{a6}}}_{{y}}{}{z}\right){}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{z}}{+}\frac{\left({\mathrm{a4}}{+}{{\mathrm{a4}}}_{{x}}{}{x}\right){}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}}{{x}}{+}\frac{{1}}{{4}}{}\frac{\left({2}{}{\mathrm{a6}}{}{z}{+}{2}{}{x}{}{\mathrm{a4}}{+}{x}{}{\mathrm{a3}}{+}{2}{}{x}{}{{\mathrm{a5}}}_{{y}}{}{z}\right){}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dy}}}{{x}{}{z}}{+}\frac{\left({2}{}{\mathrm{a6}}{+}{{\mathrm{a6}}}_{{z}}{}{z}\right){}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dz}}}{{z}}{+}\frac{{1}}{{4}}{}\frac{\left({3}{}{\mathrm{a5}}{+}{2}{}{{\mathrm{a5}}}_{{z}}{}{z}\right){}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dz}}}{{z}}{+}\frac{{1}}{{4}}{}\frac{\left({\mathrm{a2}}{}{x}{+}{z}{}{\mathrm{a5}}{+}{2}{}{z}{}{}_{}\right)}{}$