Lesson 3: Some DifferentialGeometry Utilities
GenerateForms, GenerateTensors, GenerateSymmetricTensors
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.
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);
Find the set of coefficients of X.
Find the list of all coefficients of X.
DGinfo(X, "CoefficientList", "all");
Find the coefficients of D_x and D_y in X (Method 1).
DGinfo(X, "CoefficientList", [, ]);
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);
Find the coefficient of dx D_x in T.
DGinfo(T, "CoefficientList", [[1, 1]]);
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);
B := evalDG([D_x - D_y, D_y - D_z, D_z + D_x]);
C := GetComponents(X, B);
DGzip(C, B, "plus");
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;
S := [dx &wedge dy, dx &wedge dz];
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]);
C := GetComponents(A, B);
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.
GetComponents(x &mult D_x, [D_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");
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];
Find a basis for the space of all 2-forms generated by Omega.