Lesson 3: Utilities - Maple Help

DifferentialGeometry Lessons

Lesson 3: Some DifferentialGeometry Utilities

Overview

DifferentialGeometry includes a powerful set of utilities for performing linear algebra computations on spaces of vectors, differential forms, and tensors (VFT).

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

 – Extract the set of coefficients of a DifferentialGeometry VFT.
 – Extract specific coefficients of a DifferentialGeometry VFT.
 – Determine if a given VFT is a linear combination of a set of VFT.
 – Create a spanning list of independent VFT (a basis) from a list of VFT.
 – Generate a basis for the space of p-forms.
 – Generate a collection of tensors.
 – Extend a given set of independent VFT to a basis for a subspace.
 – Find the dual basis for the cotangent space from a basis for the tangent space.
 – Find the annihilator subspace for a given set of vectors or forms.

DGinfo/CoefficientSet, DGinfo/CoefficientList

The command DGinfo can be used to extract all or some of the coefficients of a vector, differential form or tensor.  Exercises 11 illustrates the use of these commands in programming differential geometry applications.

 > with(DifferentialGeometry): with(Tools):
 > DGsetup([x, y ,z], "M");
 ${\mathrm{frame name: M}}$ (2.1)

Define a vector X = aD_x + bD_y + bD_z

 M > X := evalDG(a*D_x + b*D_y + b*D_z);
 ${X}{:=}{a}{}{\mathrm{D_x}}{+}{b}{}{\mathrm{D_y}}{+}{b}{}{\mathrm{D_z}}$ (2.2)

Find the set of coefficients of X.

 M > DGinfo(X, "CoefficientSet");
 $\left\{{a}{,}{b}\right\}$ (2.3)

Find the list of all coefficients of X.

 M > DGinfo(X, "CoefficientList", "all");
 $\left[{a}{,}{b}{,}{b}\right]$ (2.4)

Find the coefficients of D_x and D_y in X (Method 1).

 M > DGinfo(X, "CoefficientList", [[1], [2]]);
 $\left[{a}{,}{b}\right]$ (2.5)

Find the coefficients of D_x and D_y in X (Method 2).

 M > DGinfo(X, "CoefficientList", [D_x, D_y]);
 $\left[{a}{,}{b}\right]$ (2.6)

Define a type (1,1) tensor T.

 M > T := evalDG(a*dx &t D_x + b*dy &t D_z + c*dz &t D_x);
 ${T}{:=}{a}{}{\mathrm{dx}}{}{\mathrm{D_x}}{+}{b}{}{\mathrm{dy}}{}{\mathrm{D_z}}{+}{c}{}{\mathrm{dz}}{}{\mathrm{D_x}}$ (2.7)

Find the coefficient of dx D_x in T.

 M > DGinfo(T, "CoefficientList", [[1, 1]]);
 $\left[{a}\right]$ (2.8)

Find the coefficients of dy D_z and dz D_z in T.

 M > DGinfo(alpha, "CoefficientList", [dy &tensor D_z, dz &tensor D_z]);
 $\left[{\mathrm{α}}\right]$ (2.9)

GetComponents

The command GetComponents provides a very useful set of procedures for determining if a given VFT or list of VFT can be expressed as a linear combination of a set of VFT.

 M > with(DifferentialGeometry): with(Tools):
 M > DGsetup([x, y ,z], "M"):

Example 1.  Express the vector X as a linear combination of the vectors in the list B.  Check the result with DGzip.

 M > X := evalDG(2*D_x + D_y - D_z);
 ${X}{:=}{2}{}{\mathrm{D_x}}{+}{\mathrm{D_y}}{-}{\mathrm{D_z}}$ (3.1)
 M > B := evalDG([D_x - D_y, D_y - D_z, D_z + D_x]);
 ${B}{:=}\left[{\mathrm{D_x}}{-}{\mathrm{D_y}}{,}{\mathrm{D_y}}{-}{\mathrm{D_z}}{,}{\mathrm{D_x}}{+}{\mathrm{D_z}}\right]$ (3.2)
 M > C := GetComponents(X, B);
 ${C}{:=}\left[{1}{,}{2}{,}{1}\right]$ (3.3)
 M > DGzip(C, B, "plus");
 ${2}{}{\mathrm{D_x}}{+}{\mathrm{D_y}}{-}{\mathrm{D_z}}$ (3.4)

Example 2.  GetComponents returns an empty list if the VFT is not a linear combination of the given list of VFT.  For example, the 2-form alpha is not a linear combination of the 2-forms in the list S.

 M > alpha := dy &wedge dz;
 ${\mathrm{α}}{:=}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$ (3.5)
 M > S := [dx &wedge dy, dx &wedge dz];
 ${S}{:=}\left[{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}\right]$ (3.6)
 M > GetComponents(alpha, S);
 $\left[{}\right]$ (3.7)

Example 3.  The first argument to GetComponents can also be a list of VFTs, in which case the list of lists of components is returned.  In this example, we find all the components C of all the vectors in the basis A as linear combinations of the vectors in the basis B.  We find the change of basis Matrix P relating the two bases A and B.

 M > A := evalDG([D_x + D_y + 2*D_z, D_y + D_z, 2*D_z]);
 ${A}{:=}\left[{\mathrm{D_x}}{+}{\mathrm{D_y}}{+}{2}{}{\mathrm{D_z}}{,}{\mathrm{D_y}}{+}{\mathrm{D_z}}{,}{2}{}{\mathrm{D_z}}\right]$ (3.8)
 M > B := evalDG([D_x - D_y, D_y - D_z, D_z + D_x]);
 ${B}{:=}\left[{\mathrm{D_x}}{-}{\mathrm{D_y}}{,}{\mathrm{D_y}}{-}{\mathrm{D_z}}{,}{\mathrm{D_x}}{+}{\mathrm{D_z}}\right]$ (3.9)
 M > C := GetComponents(A, B);
 ${C}{:=}\left[\left[{-}{1}{,}{0}{,}{2}\right]{,}\left[{-}{1}{,}{0}{,}{1}\right]{,}\left[{-}{1}{,}{-}{1}{,}{1}\right]\right]$ (3.10)
 M > P := LinearAlgebra[Transpose](Matrix(C));

Example 4.  With the optional argument method = "real", the GetComponents command will determine if the linear combination can be found with real numbers as coefficients -- (no functions allowed).  Compare the results of the following commands.

 M > GetComponents(x &mult D_x, [D_x]);
 $\left[{x}\right]$ (3.11)
 M > GetComponents(x &mult D_x, [D_x], method = "real");
 $\left[{}\right]$ (3.12)
 M > GetComponents(x &mult D_x, [D_x, x &mult D_x, (x^2) &mult D_x], method = "real");
 $\left[{0}{,}{1}{,}{0}\right]$ (3.13)

GenerateForms, GenerateTensors, GenerateSymmetricTensors

The utilities GenerateForms, GenerateTensors, GenerateSymmetricTensors are used to generate bases for different spaces of differential forms and tensors.

 M > with(DifferentialGeometry): with(Tools): with(Tensor):
 M > DGsetup([u, v, w, x, y], E5);
 ${\mathrm{frame name: E5}}$ (4.1)

Example 1. Define a list Omega of four 1-forms.

 E5 > Omega := [du, dv, dw, dx];
 ${\mathrm{Ω}}{:=}\left[{\mathrm{du}}{,}{\mathrm{dv}}{,}{\mathrm{dw}}{,}{\mathrm{dx}}\right]$ (4.2)

Find a basis for the space of all 2-forms generated by Omega.

 E5 > GenerateForms(Omega, 2);
 $\left[{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dv}}{,}{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dw}}{,}{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dx}}{,}{\mathrm{dv}}{}{\bigwedge }{}{\mathrm{dw}}{,}{\mathrm{dv}}{}{\bigwedge }{}{\mathrm{dx}}{,}{\mathrm{dw}}{}{\bigwedge }{}{\mathrm{dx}}\right]$ (4.3)

Find a basis for the space of all 4-forms generated by Omega.

 E5 > GenerateForms(Omega, 4);
 $\left[{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dv}}{}{\bigwedge }{}{\mathrm{dw}}{}{\bigwedge }{}{\mathrm{dx}}\right]$ (4.4)

Example 2.  Find a basis for the space of all rank 3 tensors whose first components are taken from the list S1, whose second components come from S2 and whose third components come from S3.

 E5 > S1 := [D_x, D_y];
 ${\mathrm{S1}}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}\right]$ (4.5)
 E5 > S2 := [du, dv];
 ${\mathrm{S2}}{:=}\left[{\mathrm{du}}{,}{\mathrm{dv}}\right]$ (4.6)
 E5 > S3 := [dw, dx];
 ${\mathrm{S3}}{:=}\left[{\mathrm{dw}}{,}{\mathrm{dx}}\right]$ (4.7)
 E5 > GenerateTensors([S1, S2, S3]);
 $\left[{\mathrm{D_x}}{}{\mathrm{du}}{}{\mathrm{dw}}{,}{\mathrm{D_x}}{}{\mathrm{du}}{}{\mathrm{dx}}{,}{\mathrm{D_x}}{}{\mathrm{dv}}{}{\mathrm{dw}}{,}{\mathrm{D_x}}{}{\mathrm{dv}}{}{\mathrm{dx}}{,}{\mathrm{D_y}}{}{\mathrm{du}}{}{\mathrm{dw}}{,}{\mathrm{D_y}}{}{\mathrm{du}}{}{\mathrm{dx}}{,}{\mathrm{D_y}}{}{\mathrm{dv}}{}{\mathrm{dw}}{,}{\mathrm{D_y}}{}{\mathrm{dv}}{}{\mathrm{dx}}\right]$ (4.8)

Example 3.  Find a basis for the space of all rank 2 symmetric tensors generated by Omega.

 E5 > GenerateSymmetricTensors(Omega, 2);
 $\left[{\mathrm{du}}{}{\mathrm{du}}{,}\frac{{1}}{{2}}{}{\mathrm{du}}{}{\mathrm{dv}}{+}\frac{{1}}{{2}}{}{\mathrm{dv}}{}{\mathrm{du}}{,}\frac{{1}}{{2}}{}{\mathrm{du}}{}{\mathrm{dw}}{+}\frac{{1}}{{2}}{}{\mathrm{dw}}{}{\mathrm{du}}{,}\frac{{1}}{{2}}{}{\mathrm{du}}{}{\mathrm{dx}}{+}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{du}}{,}{\mathrm{dv}}{}{\mathrm{dv}}{,}\frac{{1}}{{2}}{}{\mathrm{dv}}{}{\mathrm{dw}}{+}\frac{{1}}{{2}}{}{\mathrm{dw}}{}{\mathrm{dv}}{,}\frac{{1}}{{2}}{}{\mathrm{dv}}{}{\mathrm{dx}}{+}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dv}}{,}{\mathrm{dw}}{}{\mathrm{dw}}{,}\frac{{1}}{{2}}{}{\mathrm{dw}}{}{\mathrm{dx}}{+}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dw}}{,}{\mathrm{dx}}{}{\mathrm{dx}}\right]$ (4.9)

DGbasis

The utility DGbasis will select a maximal collection of independent VFT from a list of VFT.  With method = "real", the program finds a maximal collection of independent VFT over the real numbers, otherwise independence is taken with respect to the ring of functions on the manifold.

 E5 > with(DifferentialGeometry):
 E5 > DGsetup([x, y, z], E3):

Example 1.  The 2nd and 3rd vectors in S1 define a basis for the subspace spanned by the vectors in the list S1.

 E3 > S1 := evalDG([D_x, 2*D_x, D_x - D_y, D_y]);
 ${\mathrm{S1}}{:=}\left[{\mathrm{D_x}}{,}{2}{}{\mathrm{D_x}}{,}{\mathrm{D_x}}{-}{\mathrm{D_y}}{,}{\mathrm{D_y}}\right]$ (5.1)
 E3 > DGbasis(S1);
 $\left[{\mathrm{D_x}}{,}{\mathrm{D_x}}{-}{\mathrm{D_y}}\right]$ (5.2)

Example 2.  Over the ring of functions, the 2nd and 3rd vectors in the list S2 are linearly dependent on the 1st vector.  Over the real numbers, the vectors in S2 are linearly independent.

 E3 > S2 := evalDG([D_x, x*D_x, x^2*D_x]);
 ${\mathrm{S2}}{:=}\left[{\mathrm{D_x}}{,}{x}{}{\mathrm{D_x}}{,}{{x}}^{{2}}{}{\mathrm{D_x}}\right]$ (5.3)
 E3 > DGbasis(S2);
 $\left[{\mathrm{D_x}}\right]$ (5.4)
 E3 > DGbasis(S2, method = "real");
 $\left[{\mathrm{D_x}}{,}{x}{}{\mathrm{D_x}}{,}{{x}}^{{2}}{}{\mathrm{D_x}}\right]$ (5.5)

ComplementaryBasis

Let S1 be a subspace of S2 (a vector space of vectors, differential forms, or tensors) with basis B1 and B2 respectively.  The command ComplementaryBasis calculates a complementary subspace C to S1 in S2, that is, S1 + C = S2 (direct sum).  The vectors defining the basis for C are chosen from B2.

 E3 > with(DifferentialGeometry):
 E3 > DGsetup([x, y, z, w], E4):

Example 1.  To extend the set of basis vectors B1 to a basis for the span of B2, we need to include the vector D_w.

 E4 > B1 := evalDG([D_x, D_y]);
 ${\mathrm{B1}}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}\right]$ (6.1)
 E4 > B2 := [D_x, D_y, D_w];
 ${\mathrm{B2}}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{\mathrm{D_w}}\right]$ (6.2)
 E4 > ComplementaryBasis(B1, B2);
 $\left[{\mathrm{D_w}}\right]$ (6.3)

Example 2.  We calculate a complement to the subspace of 2-forms spanned by B1 in the space of all 2-forms on E4.

 E4 > B1 := [dx &wedge dy, dx &wedge dz, dx &wedge dw];
 ${\mathrm{B1}}{:=}\left[{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dw}}\right]$ (6.4)
 E4 > Omega := Tools:-DGinfo("FrameBaseForms");
 ${\mathrm{Ω}}{:=}\left[{\mathrm{dx}}{,}{\mathrm{dy}}{,}{\mathrm{dz}}{,}{\mathrm{dw}}\right]$ (6.5)
 E4 > B2 := Tools:-GenerateForms(Omega, 2);
 ${\mathrm{B2}}{:=}\left[{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dw}}{,}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dw}}{,}{\mathrm{dz}}{}{\bigwedge }{}{\mathrm{dw}}\right]$ (6.6)
 E4 > ComplementaryBasis(B1, B2);
 $\left[{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dw}}{,}{\mathrm{dz}}{}{\bigwedge }{}{\mathrm{dw}}\right]$ (6.7)

DualBasis

If X[i], i = 1 ... n is a basis for a vector space V, then the dual basis for the dual space V^* consists of the 1-forms theta[j], j = 1 ... n,  satisfying theta[j](X[i]) = delta[i, j], where delta[i, j] is the Kronecker delta.

 E4 > with(DifferentialGeometry):
 E4 > DGsetup([x, y, z], E3):

Example 1.  The vectors in the list B define a basis for the tangent space to E3 at each point.

 E3 > B := evalDG([D_x + D_y + D_z, D_y + D_z, D_z]);
 ${B}{:=}\left[{\mathrm{D_x}}{+}{\mathrm{D_y}}{+}{\mathrm{D_z}}{,}{\mathrm{D_y}}{+}{\mathrm{D_z}}{,}{\mathrm{D_z}}\right]$ (7.1)

Calculate the basis Theta for the cotangent space which is dual to B.

 E3 > Theta := DualBasis(B);
 ${\mathrm{Θ}}{:=}\left[{\mathrm{dx}}{,}{-}{\mathrm{dx}}{+}{\mathrm{dy}}{,}{-}{\mathrm{dy}}{+}{\mathrm{dz}}\right]$ (7.2)

Let us check this result using the procedure Hook.

 E3 > Matrix(3, 3, (i, j) -> Hook(B[i], Theta[j]));

Example 2.  The command DualBasis can also be applied to a list of 1-forms.  In this example, the dual basis to the 1-forms Theta are the vectors B we started with in Example 1.

 E3 > DualBasis(Theta);
 $\left[{\mathrm{D_x}}{+}{\mathrm{D_y}}{+}{\mathrm{D_z}}{,}{\mathrm{D_y}}{+}{\mathrm{D_z}}{,}{\mathrm{D_z}}\right]$ (7.3)

Annihilator

Let A be a set of vectors in a vector space V.  Then the annihilating space B is the subspace of covectors alpha in the dual space V^* such that alpha(X) = 0 for all X in A.  The dimension of B is dim(B) = dim(V) - dim(span(A)).

 E3 > with(DifferentialGeometry):
 E3 > DGsetup([x, y, z, u, v], "M"):

Example 1.  Find the annihilating subspace B to the set of vectors A and check the result.

 M > A := [D_x, D_y];
 ${A}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}\right]$ (8.1)
 M > B := Annihilator(A);
 ${B}{:=}\left[{\mathrm{dv}}{,}{\mathrm{du}}{,}{\mathrm{dz}}\right]$ (8.2)
 M > Matrix(2, 3, (i, j) -> Hook(A[i], B[j]));

Example 2. Find the annihilating subspace B to the set of 1-forms A.

 M > A := evalDG([dx + dy, dy - du]);
 ${A}{:=}\left[{\mathrm{dx}}{+}{\mathrm{dy}}{,}{\mathrm{dy}}{-}{\mathrm{du}}\right]$ (8.3)
 M > B := Annihilator(A);
 ${B}{:=}\left[{\mathrm{D_v}}{,}{-}{\mathrm{D_x}}{+}{\mathrm{D_y}}{+}{\mathrm{D_u}}{,}{\mathrm{D_z}}\right]$ (8.4)
 M > Matrix(3, 2, (i, j) -> Hook(B[i], A[j]));

Exercises

Exercise 1

For what values of the parameter a are the differential 1-forms in the set S linearly independent?

Hint: A list of 1-forms are independent if and only if the their wedge product is non-zero.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y, z, w], "M"):
 M > S := evalDG([dx + a*dy, dx - a*dy + dz, dx + dy - a*dz]);
 ${S}{:=}\left[{\mathrm{dx}}{+}{a}{}{\mathrm{dy}}{,}{\mathrm{dx}}{-}{a}{}{\mathrm{dy}}{+}{\mathrm{dz}}{,}{\mathrm{dx}}{+}{\mathrm{dy}}{-}{a}{}{\mathrm{dz}}\right]$ (9.1.1)

Solution

Compute the wedge product of the forms in S (Method 1).

 M > Omega := S[1] &wedge S[2] &wedge S[3];
 ${\mathrm{Ω}}{:=}\left({a}{-}{1}{+}{2}{}{{a}}^{{2}}\right){}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$ (9.1.1.1)

Compute the wedge product of the forms in S (Method 2).

 M > Omega := DGzip(S, "wedge");
 ${\mathrm{Ω}}{:=}\left({a}{-}{1}{+}{2}{}{{a}}^{{2}}\right){}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$ (9.1.1.2)

Get the coefficient of Omega, set it to zero, and solve for a.

 M > Eq := Tools:-DGinfo(Omega, "CoefficientSet");
 ${\mathrm{Eq}}{:=}\left\{{a}{-}{1}{+}{2}{}{{a}}^{{2}}\right\}$ (9.1.1.3)
 M > solve(Eq, {a});
 $\left\{{a}{=}\frac{{1}}{{2}}\right\}{,}\left\{{a}{=}{-}{1}\right\}$ (9.1.1.4)

The 3 1-forms in the set S are linearly independent except when a = 1/2 and a = -1.

Exercise 2

Write a program ChangeCoefficient that will change the value of a prescribed coefficient in a vector, differential form, or tensor.  Take as input for the program a VFT, a "monomial" VFT representing the term in the VFT that is to be changed, and the new value of the coefficient.  Use your program to change the coefficient of dx^dz in Omega from 2 to K.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y, z, w], "M"):
 M > Omega := evalDG(dx &w dy + 2*dx &w dz + 3*dy &w dz);
 ${\mathrm{Ω}}{:=}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{+}{2}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{+}{3}{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$ (9.2.1)

Solution

 M > ChangeCoefficient := proc(X, T, a)
 M > local b;
 M > b := DifferentialGeometry:-Tools:-DGinfo(X, "CoefficientList", [T])[1];
 M > X &plus ((a - b) &mult T);
 M > end:

Example 1.  Change the coefficient of dx^dz in Omega from 2 to K.

 M > Omega := evalDG(dx &w dy + 2*dx &w dz + 3*dy &w dz);
 M > ChangeCoefficient(Omega, dx &wedge dz, K);
 ${\mathrm{Ω}}{:=}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{+}{2}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{+}{3}{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$
 ${\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{+}{K}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{+}{3}{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$ (9.2.1.1)

Example 2.  Change the coefficient of dx dx D_y in T from 1 to 4.

 M > T := evalDG(dx &t dy &t D_z + 2*dx &t dz &t D_x + 3*dy &t dz &t D_y);
 ${T}{:=}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{D_z}}{+}{2}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{D_x}}{+}{3}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{D_y}}$ (9.2.1.2)
 M > ChangeCoefficient(T, dx &t dx &t D_y, 4);
 ${4}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{+}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{D_z}}{+}{2}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{D_x}}{+}{3}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{D_y}}$ (9.2.1.3)

Exercise 3

 M > with(DifferentialGeometry):
 M > DGsetup([x, y, z, w], "M"):

[i] Express the vector field X as a linear combination of the vector fields B1.  Check your result using DGzip.

 M > X := evalDG(D_x + 3*D_y - D_z);
 ${X}{:=}{\mathrm{D_x}}{+}{3}{}{\mathrm{D_y}}{-}{\mathrm{D_z}}$ (9.3.1)
 M > B1 := evalDG([D_x - 2*D_y, D_y + D_z, D_x - D_y + 2*D_z]);
 ${\mathrm{B1}}{:=}\left[{\mathrm{D_x}}{-}{2}{}{\mathrm{D_y}}{,}{\mathrm{D_y}}{+}{\mathrm{D_z}}{,}{\mathrm{D_x}}{-}{\mathrm{D_y}}{+}{2}{}{\mathrm{D_z}}\right]$ (9.3.2)

[ii] Express the differential 2-form alpha as a linear combination of the 2-forms B2.  Check your result using DGzip.

 M > alpha := evalDG(2*dx &w dy);
 ${\mathrm{α}}{:=}{2}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}$ (9.3.3)
 M > B2 := evalDG([dx &w dy + dz &w dw, dx &w dz + dy &w dw, dx &w dw + dy &w dz, dx &w dy + dx &w dz, dx &w dz + dy &w dz, dy &w dz + dy &w dw]);
 ${\mathrm{B2}}{:=}\left[{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{+}{\mathrm{dz}}{}{\bigwedge }{}{\mathrm{dw}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{+}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dw}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dw}}{+}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{+}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{+}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}{+}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dw}}\right]$ (9.3.4)

[iii] Express the rank 3 tensor T as a linear combination of the tensors B3.  Check your result using DGzip.

 M > T := evalDG(dx &t D_y &t D_z - dx &t D_z &t D_x + 2*dy &t D_z &t D_z - 2*dz &t D_z &t D_y);
 ${T}{:=}{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{D_z}}{-}{\mathrm{dx}}{}{\mathrm{D_z}}{}{\mathrm{D_x}}{+}{2}{}{\mathrm{dy}}{}{\mathrm{D_z}}{}{\mathrm{D_z}}{-}{2}{}{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{D_y}}$ (9.3.5)
 M > B3 := evalDG([dx &t D_y &t D_z - dz &t D_z &t D_y, dx &t D_z &t D_x + dz &t D_z &t D_y, dy &t D_z &t D_z]);
 ${\mathrm{B3}}{:=}\left[{\mathrm{dx}}{}{\mathrm{D_y}}{}{\mathrm{D_z}}{-}{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{D_y}}{,}{\mathrm{dx}}{}{\mathrm{D_z}}{}{\mathrm{D_x}}{+}{\mathrm{dz}}{}{\mathrm{D_z}}{}{\mathrm{D_y}}{,}{\mathrm{dy}}{}{\mathrm{D_z}}{}{\mathrm{D_z}}\right]$ (9.3.6)

Solution

[i] Express the vector field X as a linear combination of the vector fields B1.  Check your result using DGzip.

 M > C1 := GetComponents(X, B1);
 ${\mathrm{C1}}{:=}\left[{7}{,}{11}{,}{-}{6}\right]$ (9.3.1.1)
 M > X  &minus DGzip(C1, B1, "plus");
 ${0}{}{\mathrm{D_x}}$ (9.3.1.2)

[ii] Express the differential 2-form alpha as a linear combination of the 2-forms B2.  Check your result using DGzip.

 M > C2 := GetComponents(alpha, B2);
 ${\mathrm{C2}}{:=}\left[{0}{,}{-}{1}{,}{0}{,}{2}{,}{-}{1}{,}{1}\right]$ (9.3.1.3)
 M > alpha &minus DGzip(C2, B2, "plus");
 ${0}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}$ (9.3.1.4)

[iii] Express the rank 3 tensor T as a linear combination of the tensors B3.  Check your result using DGzip.

 M > C3 := GetComponents(T, B3);
 ${\mathrm{C3}}{:=}\left[{1}{,}{-}{1}{,}{2}\right]$ (9.3.1.5)
 M > T &minus DGzip(C3, B3, "plus");
 ${0}{}{\mathrm{dx}}{}{\mathrm{D_x}}{}{\mathrm{D_x}}$ (9.3.1.6)

Exercise 4

Show that the vector X is a linear combination of the vectors with variable coefficients but not with constant coefficients.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y, z], "M"):
 M > X := D_z;
 ${X}{:=}{\mathrm{D_z}}$ (9.4.1)
 M > B := evalDG([x*D_x + y*D_y + z*D_z, x*D_y - y*D_x, x*D_z - z*D_x, z*D_y - y*D_z]);
 ${B}{:=}\left[{x}{}{\mathrm{D_x}}{+}{y}{}{\mathrm{D_y}}{+}{z}{}{\mathrm{D_z}}{,}{-}{y}{}{\mathrm{D_x}}{+}{x}{}{\mathrm{D_y}}{,}{-}{z}{}{\mathrm{D_x}}{+}{x}{}{\mathrm{D_z}}{,}{z}{}{\mathrm{D_y}}{-}{y}{}{\mathrm{D_z}}\right]$ (9.4.2)

Solution

 M > GetComponents(X, B);
 $\left[\frac{{z}}{{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}{,}{-}\frac{\left({{\mathrm{_t15}}}_{{1}{,}{1}}{}{{x}}^{{2}}{+}{{y}}^{{2}}{}{{\mathrm{_t15}}}_{{1}{,}{1}}{+}{y}{+}{{\mathrm{_t15}}}_{{1}{,}{1}}{}{{z}}^{{2}}\right){}{z}}{{x}{}\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}{,}\frac{{{x}}^{{2}}{+}{{y}}^{{2}}{+}{y}{}{{\mathrm{_t15}}}_{{1}{,}{1}}{}{{x}}^{{2}}{+}{{y}}^{{3}}{}{{\mathrm{_t15}}}_{{1}{,}{1}}{+}{y}{}{{\mathrm{_t15}}}_{{1}{,}{1}}{}{{z}}^{{2}}}{{x}{}\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}{,}{{\mathrm{_t15}}}_{{1}{,}{1}}\right]$ (9.4.1.1)

The presence of the parameter _t[1, 1] indicates that the vectors in B are not linearly independent and that X can be expressed in terms of the vectors in B in infinitely many ways.

To see if X is a constant coefficient linear combination of the vectors in B, use GetComponents with the option method = "real".

 M > GetComponents(X, B, method = "real");
 $\left[{}\right]$ (9.4.1.2)

Exercise 5

Extend the set of 1 forms S to a basis for the cotangent space of M.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y, z, w], "M"):
 M > S := evalDG([dx - dy + dz, dy + dw]);
 ${S}{:=}\left[{\mathrm{dx}}{-}{\mathrm{dy}}{+}{\mathrm{dz}}{,}{\mathrm{dy}}{+}{\mathrm{dw}}\right]$ (9.5.1)

Solution

Use the ComplementaryBasis command with the standard basis for the cotangent space as the second argument.

 M > C := ComplementaryBasis(S, [dx, dy, dz, dw]);
 ${C}{:=}\left[{\mathrm{dx}}{,}{\mathrm{dy}}\right]$ (9.5.1.1)

The 1-forms S and C together form a basis for the cotangent space of M.

Exercise 6

Find a maximally independent set of VFT from each of the following lists of VFT.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y, z, w], "M"):

[i]

 M > B1 := evalDG([ D_x, D_y, D_z, D_z, D_y, D_w]);
 ${\mathrm{B1}}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{\mathrm{D_z}}{,}{\mathrm{D_z}}{,}{\mathrm{D_y}}{,}{\mathrm{D_w}}\right]$ (9.6.1)

[ii]

 M > B2 := evalDG([D_x &t dx, D_y &t dy, D_x &t dx + D_y &t dy, D_y &t dx]);
 ${\mathrm{B2}}{:=}\left[{\mathrm{D_x}}{}{\mathrm{dx}}{,}{\mathrm{D_y}}{}{\mathrm{dy}}{,}{\mathrm{D_x}}{}{\mathrm{dx}}{+}{\mathrm{D_y}}{}{\mathrm{dy}}{,}{\mathrm{D_y}}{}{\mathrm{dx}}\right]$ (9.6.2)

[iii] Most of the linear algebra utilities in DifferentialGeometry also work with Vectors and Matrices.

 M > B3 := [Matrix([[1, 0], [0, 1]]), Matrix([[1, 2], [0, 1]]), Matrix([[1, 1], [0, 1]]), Matrix([[1, -1], [0, -1]])];

Solution

Part [i]

 M > B1, DGbasis(B1);
 $\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{\mathrm{D_z}}{,}{\mathrm{D_z}}{,}{\mathrm{D_y}}{,}{\mathrm{D_w}}\right]{,}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{\mathrm{D_z}}{,}{\mathrm{D_w}}\right]$ (9.6.1.1)

Part[ii]

 M > B2, DGbasis(B2);
 $\left[{\mathrm{D_x}}{}{\mathrm{dx}}{,}{\mathrm{D_y}}{}{\mathrm{dy}}{,}{\mathrm{D_x}}{}{\mathrm{dx}}{+}{\mathrm{D_y}}{}{\mathrm{dy}}{,}{\mathrm{D_y}}{}{\mathrm{dx}}\right]{,}\left[{\mathrm{D_x}}{}{\mathrm{dx}}{,}{\mathrm{D_y}}{}{\mathrm{dy}}{,}{\mathrm{D_y}}{}{\mathrm{dx}}\right]$ (9.6.1.2)

Part[iii]

 M > B3, DGbasis(B3);

Exercise 7

Show that the vectors in the list B are linearly independent over the real numbers but not over the ring of real-valued functions on M.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y], "M"):
 M > B := evalDG([D_x, D_y, x*D_x, y*D_x, x*D_y, y*D_y]);
 ${B}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{x}{}{\mathrm{D_x}}{,}{y}{}{\mathrm{D_x}}{,}{x}{}{\mathrm{D_y}}{,}{y}{}{\mathrm{D_y}}\right]$ (9.7.1)

Solution

Note that there are 6 vectors in the list B.

 M > nops(B);
 ${6}$ (9.7.1.1)

We apply the DGbasis procedure with the option method = "real".

 M > C1 := DGbasis(B, method = "real");
 ${\mathrm{C1}}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{x}{}{\mathrm{D_x}}{,}{y}{}{\mathrm{D_x}}{,}{x}{}{\mathrm{D_y}}{,}{y}{}{\mathrm{D_y}}\right]$ (9.7.1.2)
 M > nops(C1);
 ${6}$ (9.7.1.3)

Since the number of vectors in B equals the number of vectors in C1, the vectors in B must be independent over the real numbers.

However, over the ring of functions, there are only two independent vectors.

 M > C2 := DGbasis(B);
 ${\mathrm{C2}}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}\right]$ (9.7.1.4)

Exercise 8

a) Generate a basis of all 3-forms for the manifold N with coordinates z1, z2, z3, z4, z5.

b) Generate all symmetric rank 4 contravariant tensors for the manifold P with coordinates u, v.

c) Generate all type (2, 1) tensors (covariant rank 2, contravariant rank 1) which are skew-symmetric in the first two arguments for the manifold Q with coordinates x, y, z.

Solution

a)

 M > with(DifferentialGeometry): with(Tools): DGsetup([z1, z2, z3, z4, z5], "N"):
 N > Omega := DGinfo("FrameBaseForms");
 ${\mathrm{Ω}}{:=}\left[{\mathrm{dz1}}{,}{\mathrm{dz2}}{,}{\mathrm{dz3}}{,}{\mathrm{dz4}}{,}{\mathrm{dz5}}\right]$ (9.8.1.1)
 N > GenerateForms(Omega, 3);
 $\left[{\mathrm{dz1}}{}{\bigwedge }{}{\mathrm{dz2}}{}{\bigwedge }{}{\mathrm{dz3}}{,}{\mathrm{dz1}}{}{\bigwedge }{}{\mathrm{dz2}}{}{\bigwedge }{}{\mathrm{dz4}}{,}{\mathrm{dz1}}{}{\bigwedge }{}{\mathrm{dz2}}{}{\bigwedge }{}{\mathrm{dz5}}{,}{\mathrm{dz1}}{}{\bigwedge }{}{\mathrm{dz3}}{}{\bigwedge }{}{\mathrm{dz4}}{,}{\mathrm{dz1}}{}{\bigwedge }{}{\mathrm{dz3}}{}{\bigwedge }{}{\mathrm{dz5}}{,}{\mathrm{dz1}}{}{\bigwedge }{}{\mathrm{dz4}}{}{\bigwedge }{}{\mathrm{dz5}}{,}{\mathrm{dz2}}{}{\bigwedge }{}{\mathrm{dz3}}{}{\bigwedge }{}{\mathrm{dz4}}{,}{\mathrm{dz2}}{}{\bigwedge }{}{\mathrm{dz3}}{}{\bigwedge }{}{\mathrm{dz5}}{,}{\mathrm{dz2}}{}{\bigwedge }{}{\mathrm{dz4}}{}{\bigwedge }{}{\mathrm{dz5}}{,}{\mathrm{dz3}}{}{\bigwedge }{}{\mathrm{dz4}}{}{\bigwedge }{}{\mathrm{dz5}}\right]$ (9.8.1.2)

b)

 N > with(DifferentialGeometry): with(Tensor): DGsetup([u, v], "P"):
 P > GenerateSymmetricTensors([D_u, D_v], 4);
 $\left[{\mathrm{D_u}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{,}\frac{{1}}{{4}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{+}\frac{{1}}{{4}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{+}\frac{{1}}{{4}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{+}\frac{{1}}{{4}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{,}\frac{{1}}{{6}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{+}\frac{{1}}{{6}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{+}\frac{{1}}{{6}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{+}\frac{{1}}{{6}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{+}\frac{{1}}{{6}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{+}\frac{{1}}{{6}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{}{\mathrm{D_u}}{,}\frac{{1}}{{4}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{+}\frac{{1}}{{4}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{+}\frac{{1}}{{4}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{}{\mathrm{D_v}}{+}\frac{{1}}{{4}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{}{\mathrm{D_u}}{,}{\mathrm{D_v}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}{}{\mathrm{D_v}}\right]$ (9.8.1.3)

c)

 P > with(DifferentialGeometry): with(Tensor): DGsetup([x, y, z], "Q"):
 P > T1 := GenerateSymmetricTensors([dx, dy, dz], 2);
 ${\mathrm{T1}}{:=}\left[{\mathrm{dx}}{}{\mathrm{dx}}{,}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dy}}{+}\frac{{1}}{{2}}{}{\mathrm{dy}}{}{\mathrm{dx}}{,}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dz}}{+}\frac{{1}}{{2}}{}{\mathrm{dz}}{}{\mathrm{dx}}{,}{\mathrm{dy}}{}{\mathrm{dy}}{,}\frac{{1}}{{2}}{}{\mathrm{dy}}{}{\mathrm{dz}}{+}\frac{{1}}{{2}}{}{\mathrm{dz}}{}{\mathrm{dy}}{,}{\mathrm{dz}}{}{\mathrm{dz}}\right]$ (9.8.1.4)
 Q > T2 := [D_x, D_y, D_z];
 ${\mathrm{T2}}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{\mathrm{D_z}}\right]$ (9.8.1.5)
 Q > GenerateTensors([T1, T2]);
 $\left[{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{D_x}}{,}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{,}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{D_z}}{,}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{D_x}}{+}\frac{{1}}{{2}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{D_x}}{,}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{D_y}}{+}\frac{{1}}{{2}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{,}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{D_z}}{+}\frac{{1}}{{2}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{D_z}}{,}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{D_x}}{+}\frac{{1}}{{2}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{D_x}}{,}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{D_y}}{+}\frac{{1}}{{2}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{D_y}}{,}\frac{{1}}{{2}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{D_z}}{+}\frac{{1}}{{2}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{D_z}}{,}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{D_x}}{,}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{D_y}}{,}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{D_z}}{,}\frac{{1}}{{2}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{D_x}}{+}\frac{{1}}{{2}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{D_x}}{,}\frac{{1}}{{2}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{D_y}}{+}\frac{{1}}{{2}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{D_y}}{,}\frac{{1}}{{2}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{D_z}}{+}\frac{{1}}{{2}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{D_z}}{,}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{D_x}}{,}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{D_y}}{,}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{D_z}}\right]$ (9.8.1.6)

Exercise 9

Find a complementary basis in the space of rank 3 contravariant tensors to the space of symmetric rank 3 contravariant tensors for the manifold P with coordinates u, v.

 Q > with(DifferentialGeometry):
 Q > with(Tensor):
 Q > DGsetup([u, v], Q):

Solution

 Q > Omega := [du, dv]:

Use the GenerateSymmetricTensors command to find a basis for the rank 3 symmetric covariant tensors.

 Q > T1 := GenerateSymmetricTensors(Omega, 3);
 ${\mathrm{T1}}{:=}\left[{\mathrm{du}}{}{\mathrm{du}}{}{\mathrm{du}}{,}\frac{{1}}{{3}}{}{\mathrm{du}}{}{\mathrm{du}}{}{\mathrm{dv}}{+}\frac{{1}}{{3}}{}{\mathrm{du}}{}{\mathrm{dv}}{}{\mathrm{du}}{+}\frac{{1}}{{3}}{}{\mathrm{dv}}{}{\mathrm{du}}{}{\mathrm{du}}{,}\frac{{1}}{{3}}{}{\mathrm{du}}{}{\mathrm{dv}}{}{\mathrm{dv}}{+}\frac{{1}}{{3}}{}{\mathrm{dv}}{}{\mathrm{du}}{}{\mathrm{dv}}{+}\frac{{1}}{{3}}{}{\mathrm{dv}}{}{\mathrm{dv}}{}{\mathrm{du}}{,}{\mathrm{dv}}{}{\mathrm{dv}}{}{\mathrm{dv}}\right]$ (9.9.1.1)

Use the GenerateTensors command to find a basis for the rank 3 covariant tensors.

 Q > T2 := GenerateTensors([Omega, Omega, Omega]);
 ${\mathrm{T2}}{:=}\left[{\mathrm{du}}{}{\mathrm{du}}{}{\mathrm{du}}{,}{\mathrm{du}}{}{\mathrm{du}}{}{\mathrm{dv}}{,}{\mathrm{du}}{}{\mathrm{dv}}{}{\mathrm{du}}{,}{\mathrm{du}}{}{\mathrm{dv}}{}{\mathrm{dv}}{,}{\mathrm{dv}}{}{\mathrm{du}}{}{\mathrm{du}}{,}{\mathrm{dv}}{}{\mathrm{du}}{}{\mathrm{dv}}{,}{\mathrm{dv}}{}{\mathrm{dv}}{}{\mathrm{du}}{,}{\mathrm{dv}}{}{\mathrm{dv}}{}{\mathrm{dv}}\right]$ (9.9.1.2)
 Q > Answer := ComplementaryBasis(T1, T2);
 ${\mathrm{Answer}}{:=}\left[{\mathrm{du}}{}{\mathrm{du}}{}{\mathrm{dv}}{,}{\mathrm{du}}{}{\mathrm{dv}}{}{\mathrm{du}}{,}{\mathrm{du}}{}{\mathrm{dv}}{}{\mathrm{dv}}{,}{\mathrm{dv}}{}{\mathrm{du}}{}{\mathrm{dv}}\right]$ (9.9.1.3)

Exercise 10

Find the dual basis for each of the following.  Check your result.

 Q > with(DifferentialGeometry):
 Q > DGsetup([x, y, u, v], M):

[i]

 M > A := evalDG([D_x + D_y + D_u + D_v, D_y + D_u + D_v, D_u + D_v, D_v]);
 ${A}{:=}\left[{\mathrm{D_x}}{+}{\mathrm{D_y}}{+}{\mathrm{D_u}}{+}{\mathrm{D_v}}{,}{\mathrm{D_y}}{+}{\mathrm{D_u}}{+}{\mathrm{D_v}}{,}{\mathrm{D_u}}{+}{\mathrm{D_v}}{,}{\mathrm{D_v}}\right]$ (9.10.1)

[ii]

 M > B := evalDG([dx + dy, dy + du, du + dv, dv - dx]);
 ${B}{:=}\left[{\mathrm{dx}}{+}{\mathrm{dy}}{,}{\mathrm{dy}}{+}{\mathrm{du}}{,}{\mathrm{du}}{+}{\mathrm{dv}}{,}{-}{\mathrm{dx}}{+}{\mathrm{dv}}\right]$ (9.10.2)

Solution

Part [i]

 ${\mathrm{Answer1}}{:=}\left[{\mathrm{dx}}{,}{-}{\mathrm{dx}}{+}{\mathrm{dy}}{,}{-}{\mathrm{dy}}{+}{\mathrm{du}}{,}{-}{\mathrm{du}}{+}{\mathrm{dv}}\right]$ (9.10.1.1)
 M > Matrix(4, 4, (i, j) -> Hook(A[i], Answer1[j]));

Part [ii]

 ${\mathrm{Answer2}}{:=}\left[\frac{{1}}{{2}}{}{\mathrm{D_x}}{+}\frac{{1}}{{2}}{}{\mathrm{D_y}}{-}\frac{{1}}{{2}}{}{\mathrm{D_u}}{+}\frac{{1}}{{2}}{}{\mathrm{D_v}}{,}{-}\frac{{1}}{{2}}{}{\mathrm{D_x}}{+}\frac{{1}}{{2}}{}{\mathrm{D_y}}{+}\frac{{1}}{{2}}{}{\mathrm{D_u}}{-}\frac{{1}}{{2}}{}{\mathrm{D_v}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{-}\frac{{1}}{{2}}{}{\mathrm{D_y}}{+}\frac{{1}}{{2}}{}{\mathrm{D_u}}{+}\frac{{1}}{{2}}{}{\mathrm{D_v}}{,}{-}\frac{{1}}{{2}}{}{\mathrm{D_x}}{+}\frac{{1}}{{2}}{}{\mathrm{D_y}}{-}\frac{{1}}{{2}}{}{\mathrm{D_u}}{+}\frac{{1}}{{2}}{}{\mathrm{D_v}}\right]$ (9.10.1.2)
 M > Matrix(4, 4, (i, j) -> Hook(Answer2[i], B[j]));

Exercise 11

Write a program TestIndependence (without using DGbasis) that will return true if a given list of VFT are linearly independent and false otherwise.

This exercise introduces some important coding techniques which are used repeatedly in the DifferentialGeometry procedures and which are often needed to create new applications.

Hint: Use DGzip to form a VFT X from the given list with unknown coefficients.  Extract the coefficients of X to obtain a set of equations Eq.  Use LinearAlgebra:-GenerateMatrix to obtain the coefficient matrix A for the system of linear equations defined by Eq.  Use LinearAlgebra:-Rank to calculate the rank of the matrix A.

Test you program on the list of vectors B1 and the list of 2-forms B2.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y, z], M);
 ${\mathrm{frame name: M}}$ (9.11.1)
 M > B1 := evalDG([D_x - D_y, D_y + D_z, D_x - 2*D_y + 3*D_z]);
 ${\mathrm{B1}}{:=}\left[{\mathrm{D_x}}{-}{\mathrm{D_y}}{,}{\mathrm{D_y}}{+}{\mathrm{D_z}}{,}{\mathrm{D_x}}{-}{2}{}{\mathrm{D_y}}{+}{3}{}{\mathrm{D_z}}\right]$ (9.11.2)
 M > B2 := evalDG([dx &w dy, dx &w dz, dx &w dy + dz &w dx]);
 ${\mathrm{B2}}{:=}\left[{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{-}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}\right]$ (9.11.3)

Solution

 M > TestIndependence := proc(VFTlist)
 M > local A, X, n, vars, Eq, r, answer;
 M > n := nops(VFTlist);
 M > vars := [seq(_a||i, i = 1 .. n)];
 M > X := DGzip(vars, VFTlist, "plus");
 M > Eq := Tools:-DGinfo(X, "CoefficientSet");
 M > A := LinearAlgebra:-GenerateMatrix(Eq, vars)[1];
 M > r := LinearAlgebra:-Rank(A);
 M > if r < n then answer := false else answer := true fi;
 M > end:
 M >
 > TestIndependence(B1);
 ${\mathrm{true}}$ (9.11.1.1)
 M > TestIndependence(B2);
 ${\mathrm{false}}$ (9.11.1.2)

To watch the program at work, use the Maple debug command.

 M > debug(TestIndependence);
 ${\mathrm{TestIndependence}}$ (9.11.1.3)
 M > TestIndependence(B1);
 {--> enter TestIndependence, args = [_DG([[vector, M, []], [[[1], 1], [[2], -1]]]), _DG([[vector, M, []], [[[2], 1], [[3], 1]]]), _DG([[vector, M, []], [[[1], 1], [[2], -2], [[3], 3]]])]
 ${n}{:=}{3}$
 ${\mathrm{vars}}{:=}\left[{\mathrm{_a1}}{,}{\mathrm{_a2}}{,}{\mathrm{_a3}}\right]$
 ${X}{:=}\left({\mathrm{_a3}}{+}{\mathrm{_a1}}\right){}{\mathrm{D_x}}{-}\left({2}{}{\mathrm{_a3}}{-}{\mathrm{_a2}}{+}{\mathrm{_a1}}\right){}{\mathrm{D_y}}{+}\left({3}{}{\mathrm{_a3}}{+}{\mathrm{_a2}}\right){}{\mathrm{D_z}}$
 ${\mathrm{Eq}}{:=}\left\{{\mathrm{_a3}}{+}{\mathrm{_a1}}{,}{3}{}{\mathrm{_a3}}{+}{\mathrm{_a2}}{,}{-}{2}{}{\mathrm{_a3}}{+}{\mathrm{_a2}}{-}{\mathrm{_a1}}\right\}$
 ${r}{:=}{3}$
 ${\mathrm{answer}}{:=}{\mathrm{true}}$
 ${\mathrm{true}}$
 <-- exit TestIndependence (now at top level) = true}
 ${\mathrm{true}}$ (9.11.1.4)

There is one change in the program that should be made -- there is no assurance that the variables _a1, _a2, _a3 are not defined by the user, in which case, the program will not work. We can avoid this problem by using a little utility program from the Maple tools package.  This program is guaranteed to generate a sequence of unassigned names.

 M > tools/_Qn(p,[],4);
 ${\mathrm{p1}}{,}{\mathrm{p2}}{,}{\mathrm{p3}}{,}{\mathrm{p4}}$ (9.11.1.5)
 M > p1 := 3: p5 := 0:
 M > tools/_Qn(p,[],4);
 ${\mathrm{p2}}{,}{\mathrm{p3}}{,}{\mathrm{p4}}{,}{\mathrm{p6}}$ (9.11.1.6)

Therefore the line vars := [seq(_a||i, i = 1 .. n)]; should be replaced by vars := [tools/_Qn(_a, [], n)].

Exercise 12

A p-form omega is called decomposable if it is the wedge product of p 1-forms.  If we define A = {X : Hook(X, omega) = 0}, then it is not difficult to prove that omega is decomposable if and only if dim(A) = n - p, where n is the dimension of the ambient manifold.  The space A is called the retracting space for omega.  Moreover, if omega is decomposable, then it is a multiple of the wedge product of the 1-forms in Annihilator(A).  (See Hook, Annihilator)

[i] Write a program RetractingSpace that will compute the retracting space for a p-form omega.

Hint: Follow Example 11 and use LinearAlgebra:-NullSpace.

[ii] Write a program DecomposeForm that will determine if a p-form is decomposable and, if so, return a list of p 1-forms whose wedge product is the given p-form.  If the form is not decomposable return an empty list.

Test your programs on the forms alpha, beta, theta.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y, z, u, v], M):
 M > alpha := dx &wedge dy &wedge dz;
 ${\mathrm{α}}{:=}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$ (9.12.1)
 M > beta := evalDG(dx &w dy + du &w dv);
 ${\mathrm{β}}{:=}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{+}{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dv}}$ (9.12.2)
 M > theta := evalDG(9*dx &w dy &w du - 13*dx &w dy &w dv + 5*dx &w du &w dv + 2*dy &w du &w dv);
 ${\mathrm{θ}}{:=}{9}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{du}}{-}{13}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dv}}{+}{5}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dv}}{+}{2}{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dv}}$ (9.12.3)

Solution

 M > RetractingSpace := proc(omega0)
 M > local omega, A, X, n, vars, alpha, Eq, B, N, p, C, c, i;
 M > omega := evalDG(omega0);
 M > A := Tools:-DGinfo("FrameBaseVectors");
 M > n := Tools:-DGinfo("FrameBaseDimension");
 M > vars := [tools/_Qn(_a,[],n)];
 M > X := DGzip(vars, A,"plus");
 M > alpha := Hook(X, omega);
 M > Eq := Tools:-DGinfo(alpha, "CoefficientSet");
 M > B := LinearAlgebra:-GenerateMatrix(Eq, vars)[1];
 M > N := LinearAlgebra:-NullSpace(B);
 M > p := nops(N);
 M > C := Array(1 .. p);
 M > for i to p do
 M > c := convert(N[i], list);
 M > C[i] := DGzip(c, A, "plus");
 M > od;
 M > convert(C, list);
 M > end:
 M >
 M > DecomposeForm := proc(omega0)
 M > local A, omega, n, p, q, B, C, alpha, Eq, soln, newC1, k;
 M > omega := evalDG(omega0);
 M > n := Tools:-DGinfo("FrameBaseDimension");
 M > p := Tools:-DGinfo(omega, "FormDegree");
 M > A := RetractingSpace(omega);
 M > q := nops(A);
 M > if q <> n - p then return [] fi;
 M > B := Tools:-DGinfo("FrameBaseForms");
 M > C := Annihilator(A, B);
 M > alpha := k &mult DGzip(C, "wedge");
 M > Eq := Tools:-DGinfo(omega0 &minus alpha, "CoefficientSet");
 M > soln:= solve(Eq, {k});
 M > newC1 := eval(k &mult C[1], soln);
 M > [newC1, op(C[2 .. -1])];
 > end:

Example 1.

 M > alpha;
 ${\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$ (9.12.1.1)
 M > RetractingSpace(alpha);
 $\left[{\mathrm{D_v}}{,}{\mathrm{D_u}}\right]$ (9.12.1.2)
 M > DecomposeForm(alpha);
 $\left[{-}{\mathrm{dy}}{,}{\mathrm{dx}}{,}{\mathrm{dz}}\right]$ (9.12.1.3)

Example 2.

 M > beta;
 ${\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{+}{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dv}}$ (9.12.1.4)
 M > RetractingSpace(beta);
 $\left[{\mathrm{D_z}}\right]$ (9.12.1.5)
 M > DecomposeForm(beta);
 $\left[{}\right]$ (9.12.1.6)

Example 3.

 M > theta;
 ${9}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{du}}{-}{13}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dv}}{+}{5}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dv}}{+}{2}{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{du}}{}{\bigwedge }{}{\mathrm{dv}}$ (9.12.1.7)
 M > RetractingSpace(theta);
 $\left[{-}\frac{{2}}{{9}}{}{\mathrm{D_x}}{+}\frac{{5}}{{9}}{}{\mathrm{D_y}}{+}\frac{{13}}{{9}}{}{\mathrm{D_u}}{+}{\mathrm{D_v}}{,}{\mathrm{D_z}}\right]$ (9.12.1.8)
 M > F := DecomposeForm(theta);
 ${F}{:=}\left[{-}{9}{}{\mathrm{dx}}{-}{2}{}{\mathrm{dv}}{,}\frac{{13}}{{2}}{}{\mathrm{dx}}{+}{\mathrm{du}}{,}\frac{{5}}{{2}}{}{\mathrm{dx}}{+}{\mathrm{dy}}\right]$ (9.12.1.9)
 M > theta &minus DGzip(F, "wedge");
 ${0}{}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}$ (9.12.1.10)
 M >
 >