Lesson 3: Utilities - Maple Help

Online Help

All Products    Maple    MapleSim


 

DifferentialGeometry Lessons

 

Lesson 3: Some DifferentialGeometry Utilities

 

 

Overview

DGinfo/CoefficientSet, DGinfo/CoefficientList

GetComponents

GenerateForms, GenerateTensors, GenerateSymmetricTensors

DGbasis

ComplementaryBasis

DualBasis

Annihilator

Exercises

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");

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:=aD_x+bD_y+bD_z

(2.2)

 

Find the set of coefficients of X.

M > 

DGinfo(X, "CoefficientSet");

a,b

(2.3)

 

Find the list of all coefficients of X.

M > 

DGinfo(X, "CoefficientList", "all");

a,b,b

(2.4)

 

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

M > 

DGinfo(X, "CoefficientList", [[1], [2]]);

a,b

(2.5)

 

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

M > 

DGinfo(X, "CoefficientList", [D_x, D_y]);

a,b

(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:=adxD_x+bdyD_z+cdzD_x

(2.7)

 

Find the coefficient of dx D_x in T.

M > 

DGinfo(T, "CoefficientList", [[1, 1]]);

a

(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]);

α

(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:=2D_x+D_yD_z

(3.1)
M > 

B := evalDG([D_x - D_y, D_y - D_z, D_z + D_x]);

B:=D_xD_y,D_yD_z,D_x+D_z

(3.2)
M > 

C := GetComponents(X, B);

C:=1,2,1

(3.3)
M > 

DGzip(C, B, "plus");

2D_x+D_yD_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;

α:=dydz

(3.5)
M > 

S := [dx &wedge dy, dx &wedge dz];

S:=dxdy,dxdz

(3.6)
M > 

GetComponents(alpha, S);

(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:=D_x+D_y+2D_z,D_y+D_z,2D_z

(3.8)
M > 

B := evalDG([D_x - D_y, D_y - D_z, D_z + D_x]);

B:=D_xD_y,D_yD_z,D_x+D_z

(3.9)
M > 

C := GetComponents(A, B);

C:=1,0,2,1,0,1,1,1,1

(3.10)
M > 

P := LinearAlgebra[Transpose](Matrix(C));

P:=111001211

(3.11)

 

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]);

x

(3.12)
M > 

GetComponents(x &mult D_x, [D_x], method = "real");

(3.13)
M > 

GetComponents(x &mult D_x, [D_x, x &mult D_x, (x^2) &mult D_x], method = "real");

0,1,0

(3.14)

 

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);

frame name: E5

(4.1)

 

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

E5 > 

Omega := [du, dv, dw, dx];

Ω:=du,dv,dw,dx

(4.2)

 

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

E5 > 

GenerateForms(Omega, 2);

dudv,dudw,dudx,dvdw,dvdx,dwdx

(4.3)

 

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

E5 > 

GenerateForms(Omega, 4);

dudvdwdx

(4.4)

 

<