DifferentialGeometry Lessons
Lesson 3: Some DifferentialGeometry Utilities
Overview
DGinfo/CoefficientSet, DGinfo/CoefficientList
GetComponents
GenerateForms, GenerateTensors, GenerateSymmetricTensors
DGbasis
ComplementaryBasis
DualBasis
Annihilator
Exercises
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.
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");
frame name: M
Define a vector X = aD_x + bD_y + bD_z
X := evalDG(a*D_x + b*D_y + b*D_z);
X:=a⁢D_x+b⁢D_y+b⁢D_z
Find the set of coefficients of X.
DGinfo(X, "CoefficientSet");
a,b
Find the list of all coefficients of X.
DGinfo(X, "CoefficientList", "all");
a,b,b
Find the coefficients of D_x and D_y in X (Method 1).
DGinfo(X, "CoefficientList", [[1], [2]]);
Find the coefficients of D_x and D_y in X (Method 2).
DGinfo(X, "CoefficientList", [D_x, D_y]);
Define a type (1,1) tensor T.
T := evalDG(a*dx &t D_x + b*dy &t D_z + c*dz &t D_x);
T:=a⁢dx⁢D_x+b⁢dy⁢D_z+c⁢dz⁢D_x
Find the coefficient of dx D_x in T.
DGinfo(T, "CoefficientList", [[1, 1]]);
a
Find the coefficients of dy D_z and dz D_z in T.
DGinfo(alpha, "CoefficientList", [dy &tensor D_z, dz &tensor D_z]);
α
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.
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.
X := evalDG(2*D_x + D_y - D_z);
X:=2⁢D_x+D_y−D_z
B := evalDG([D_x - D_y, D_y - D_z, D_z + D_x]);
B:=D_x−D_y,D_y−D_z,D_x+D_z
C := GetComponents(X, B);
C:=1,2,1
DGzip(C, B, "plus");
2⁢D_x+D_y−D_z
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.
alpha := dy &wedge dz;
α:=dy⁢⋀⁢dz
S := [dx &wedge dy, dx &wedge dz];
S:=dx⁢⋀⁢dy,dx⁢⋀⁢dz
GetComponents(alpha, S);
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.
A := evalDG([D_x + D_y + 2*D_z, D_y + D_z, 2*D_z]);
A:=D_x+D_y+2⁢D_z,D_y+D_z,2⁢D_z
C := GetComponents(A, B);
C:=−1,0,2,−1,0,1,−1,−1,1
P := LinearAlgebra[Transpose](Matrix(C));
P:=−1−1−100−1211
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.
GetComponents(x &mult D_x, [D_x]);
x
GetComponents(x &mult D_x, [D_x], method = "real");
GetComponents(x &mult D_x, [D_x, x &mult D_x, (x^2) &mult D_x], method = "real");
0,1,0
The utilities GenerateForms, GenerateTensors, GenerateSymmetricTensors are used to generate bases for different spaces of differential forms and tensors.
with(DifferentialGeometry): with(Tools): with(Tensor):
DGsetup([u, v, w, x, y], E5);
frame name: E5
Example 1. Define a list Omega of four 1-forms.
Omega := [du, dv, dw, dx];
Ω:=du,dv,dw,dx
Find a basis for the space of all 2-forms generated by Omega.
GenerateForms(Omega, 2);
du⁢⋀⁢dv,du⁢⋀⁢dw,du⁢⋀⁢dx,dv⁢⋀⁢dw,dv⁢⋀⁢dx,dw⁢⋀⁢dx
Find a basis for the space of all 4-forms generated by Omega.
GenerateForms(Omega, 4);
du⁢⋀⁢dv⁢⋀⁢dw⁢⋀⁢dx