DifferentialGeometry Lessons - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : DifferentialGeometry : Lessons and Tutorials : DifferentialGeometry : DifferentialGeometry/LessonsAndTutorials/DifferentialGeometry/GettingStarted

DifferentialGeometry Lessons

 

Lesson 1: Getting Started

 

 

Overview

DGsetup

DGinfo

ChangeFrame and RemoveFrame

Simplification

Exercises

Overview

 

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

– 

Create coordinate systems.

– 

Change coordinates.

– 

List existing coordinate systems.

– 

Remove coordinate systems from the Maple session.

– 

Obtain various attributes of a defined coordinate system.

– 

Control simplification of the output from DifferentialGeometry commands.

 

DGsetup

 

All DifferentialGeometry sessions begin by executing the DGsetup command.  This command is used to setup the computation environment by creating coordinate systems, frames, Lie algebras, and so on.  The DGsetup command can be used many times within a given Maple session.

>

with(DifferentialGeometry):

 

We first use DGsetup to create a coordinate system for a 2-dimensional manifold.  We declare [x, y] to be the names of the coordinates and we name the manifold (or, more precisely, the coordinate patch for the manifold) E2.

DGsetup([x, y], E2, verbose);

The following coordinates have been protected:

x,y

The following vector fields have been defined and protected:

D_x,D_y

The following differential 1-forms have been defined and protected:

dx,dy

frame name: E2

(2.1)

 

At this point, the coordinate names have been protected and cannot be assigned values.  The vectors D_x, D_y are assigned and protected; they define the coordinate basis for the tangent space of E2 at each point [x, y].  The differential 1-forms dx and dy are assigned and protected; they define the coordinate basis for the cotangent space of E2 at each point [x, y].

 

We will cover the basis operations involving vectors, forms and tensors in the next lesson.

 

Before proceeding, we remark that all the various geometric objects which arise in differential geometry have an internal representation within Maple which describes various attributes of the object as well as all the component values of the geometric object.  A detailed understanding of this internal representation is not required to use any of the DifferentialGeometry commands -- here we simply wish to make the user aware of its existence.  To display the internal representation of the vector field D_x and the 1-form dy, use the Maple lprint command.

E2 > 

lprint(D_x);

_DG([["vector", J2, []], [[[1], 1]]])

J2 > 

lprint(dy);

_DG([["form", J2, 1], [[[2], 1]]])

 

Notice that the internal representation of D_x clearly marks D_x as a geometric object of type "vector" attached to the manifold E2, while the internal representation of dy shows that dy is a "form" attached to the manifold E2 and has degree 1.

 

To create a rank 2 fiber bundle F over a 3 dimensional base manifold with base coordinates [x, y, z] and fiber coordinates [u, v], use the DGsetup command as follows:

J2 > 

DGsetup([x, y, z], [u, v], F, verbose);

The following coordinates have been protected:

x,y,z,u,v

The following vector fields have been defined and protected:

D_x,D_y,D_z,D_u,D_v

The following differential 1-forms have been defined and protected:

dx,dy,dz,du,dv

frame name: F

(2.2)

 

F > 

 

Note that the Maple prompt has changed to F.  Within the DifferentialGeometry environment, the Maple prompt changes to the name of the current or active coordinate system.  The name of the prompt always reflects the name of the coordinate system or manifold of the last computed object.

 

For example, as we shall see in Lesson 6, if F : M -> N is a transformation from a manifold M to a manifold N and a differential form alpha is defined on N, then the prompt is

 

N  >

 

If the command beta := Pullback(F, alpha) is executed, then the result, beta, is a differential form on M and the prompt changes to

 

M  >

 

To create the second-order jet space J^2(R^2, R) with independent variables [x, y] and dependent variable [u], use the DGsetup command with the following syntax:

F > 

DGsetup([x, y], [u], J2, 2, verbose);

The following coordinates have been protected:

x,y,u[],u1,u2,u1,1,u1,2,u2,2

The following vector fields have been defined and protected:

D_x,D_y,D_u[],D_u1,D_u2,D_u1,1,D_u1,2,D_u2,2

The following differential 1-forms have been defined and protected:

dx,dy,du[],du1,du2,du1,1,du1,2,du2,2

The following type [1,0] biforms have been defined and protected::

Dx,Dy

The following type [0,1] biforms (contact 1-forms) have been defined and protected::

Cu[],Cu1,Cu2,Cu1,1,Cu1,2,Cu2,2

frame name: J2

(2.3)

 

In this context, the dependent variable u is now referred to as u[ ], the derivative of u with respect to x is u[1], the derivative of u with respect to y is u[2], the second derivative of u with respect to x is u[1,1] and so on.

 

To suppress the display of the protected variables, vector fields, and differential 1-forms, run DGsetup with the quiet option.

J2 > 

DGsetup([x, y, z], E3, quiet);

frame name: E3

(2.4)

 

This option, together with options for controlling the format of the Maple prompt, can be set using the Preferences command.

 

DGinfo

The DGinfo command is located in the Tools package of DifferentialGeometry.  This utility program can be used to retrieve information about any object created by the DifferentialGeometry package.  Here are a few examples.

 

List all the coordinate systems defined in the current Maple session.

E3 > 

Tools:-DGinfo("FrameNames");

E2,E3,F,J2

(3.1)

 

Obtain the name of the active frame/coordinate system.

E3 > 

Tools:-DGinfo("CurrentFrame");

E3

(3.2)

 

Obtain the dimensions of the base manifold and of the fiber space of the fiber bundle.

E3 > 

Tools:-DGinfo(F, "FrameBaseDimension");

3

(3.3)
E3 > 

Tools:-DGinfo(F, "FrameFiberDimension");

2

(3.4)

 

Obtain the coordinate basis for the tangent space of the manifold E3.

E3 > 

Tools:-DGinfo(E3, "FrameBaseVectors");

D_x,D_y,D_z

(3.5)

 

ChangeFrame and RemoveFrame

 

 

The command ChangeFrame is used to change the active frame.

E3 > 

Tools:-DGinfo("CurrentFrame");

E3

(4.1)

 

E3 > 

ChangeFrame(J2);

E3

(4.2)
J2 > 

Tools:-DGinfo("CurrentFrame");

J2

(4.3)

 

The command RemoveFrame removes a frame from Maple memory (the number of remaining frames is returned) and unassigns and unprotects the names associated to that frame.

 

J2 > 

Tools:-DGinfo("FrameNames");

E2,E3,F,J2

(4.4)
J2 > 

RemoveFrame(F);

3

(4.5)
E2 > 

Tools:-DGinfo("FrameNames");

E2,E3,J2

(4.6)

 

Simplification

 

Prior to displaying the result of a computation, most DifferentialGeometry commands simplify the result using the Maple simplify command.  The user may control this simplification using the Preferences command.

E2 > 

a := (x^2)^(1/2);

ax2

(5.1)
E2 > 

simplify(a);

csgnxx

(5.2)

 

Let us multiply the vector field D_x by the scalar a.  We see that the result has been simplified using the Maple command simplify.

E2 > 

a &mult D_x;

csgnxxD_x

(5.3)

 

Let us define a new simplify procedure, NewSimplify, and use the Preferences command to dictate that NewSimplify is to be used to simplify the output of all DifferentialGeometry commands.

E2 > 

NewSimplify := proc(x) simplify(x, symbolic) end:

E2 > 

Preferences("simplification", NewSimplify);

procs...end proc

(5.4)

 

Let us multiply the vector field D_x by the scalar a again.  We see that the result has been simplified using the user defined command NewSimplify.

E2 > 

a &mult D_x;

xD_x

(5.5)

 

Here is another example.

E2 > 

b := sin(2*x);

bsin2x

(5.6)
E2 > 

b &mult D_x;

sin2xD_x

(5.7)
E2 > 

NewSimplify2 := proc(x) expand(x) end:

E2 > 

Preferences("simplification", NewSimplify2);

procxsimplifyx,symbolicend proc

(5.8)
E2 > 

b &mult D_x;

2sinxcosxD_x

(5.9)

 

The user can similarly control how DifferentialGeometry invokes dsolve, pdsolve and a number of LinearAlgebra procedures.  Before continuing, we reset the simplification to its default procedure.

E2 > 

Preferences("simplification",simplify):

 

Exercises

Exercise 1

 

Create a coordinate system called M4 with coordinates x, y, z, t.

 

E2 > 

with(DifferentialGeometry):

 

Solution

 

E2 > 

DGsetup([x, y, z, t], M4);

frame name: M4

(6.1.1.1)

Exercise 2

 

Create a coordinate system that you would need to study first order variational problems for curves in the plane.

 

M4 > 

with(DifferentialGeometry):

 

Solution

 

There are two possibilities here depending on whether the curve is to be described as a graph of a function y = f(x) or parametrically as [x(t), y(t)].

M4 > 

DGsetup([x], [y], E2, 1, verbose);

The following coordinates have been protected:

x,y[],y1

The following vector fields have been defined and protected:

D_x,D_y[],D_y1

The following differential 1-forms have been defined and protected:

dx,dy[],dy1

The following type [1,0] biforms have been defined and protected::

Dx

The following type [0,1] biforms (contact 1-forms) have been defined and protected::

Cy[],Cy1

frame name: E2

(6.2.1.1)
E2 > 

DGsetup([t], [x, y], P, 1, verbose);

The following coordinates have been protected:

t,x[],y[],x1,y1

The following vector fields have been defined and protected:

D_t,D_x[],D_y[],D_x1,D_y1

The following differential 1-forms have been defined and protected:

dt,dx[],dy[],dx1,dy1

The following type [1,0] biforms have been defined and protected::

Dt

The following type [0,1] biforms (contact 1-forms) have been defined and protected::

Cx[],Cy[],Cx1,Cy1

frame name: P

(6.2.1.2)

Exercise 3

 

Create a coordinate system that you would need in order to calculate the point symmetries of the heat equation u_t = u_xx.

 

Solution

 

P > 

DGsetup([t, x], [u], Heat, 2, verbose);

The following coordinates have been protected:

t,x,u[],u1,u2,u1,1,u1,2,u2,2

The following vector fields have been defined and protected:

D_t,D_x,D_u[],D_u1,D_u2,D_u1,1,D_u1,2,D_u2,2

The following differential 1-forms have been defined and protected:

dt,dx,du[],du1,du2,du1,1,du1,2,du2,2

The following type [1,0] biforms have been defined and protected::

Dt,Dx

The following type [0,1] biforms (contact 1-forms) have been defined and protected::

Cu[],Cu1,Cu2,Cu1,1,Cu1,2,Cu2,2

frame name: Heat

(6.3.1.1)

Exercise 4

 

Use DGinfo to obtain the coordinate basis for the cotangent bundle for the manifold M4 defined in Exercise 1.

 

Solution

 

Heat > 

Tools:-DGinfo(M4, "FrameBaseForms");

dx,dy,dz,dt

(6.4.1.1)

Exercise 5

 

Write a program, test, which will return true if the input is the name of a defined coordinate system and false otherwise.

Hint: ?member

 

Solution

 

M4 > 

test := proc(N)

M4 > 

local Frame;

M4 > 

Frame := Tools:-DGinfo("FrameNames");

M4 > 

member(N, Frame);

M4 > 

end:

M4 > 

 

M4 > 

test(M4);

true

(6.5.1.1)
M4 > 

test(M5);

false

(6.5.1.2)

Exercise 6

 

Change the DifferentialGeometry simplification procedure so that no simplification whatsoever occurs prior to output.  Use the following calculation as a check.

 

M4 > 

((1/x) &mult D_x) &plus ((1/x^2) &mult D_x);

1+xD_xx2

(6.6.1)

 

Solution

 

M4 > 

NoSimplify := x ->x ;

NoSimplifyx→x

(6.6.1.1)
M4 > 

Preferences("simplification", NoSimplify);

procs...end proc

(6.6.1.2)
M4 > 

((1/x) &mult D_x) &plus ((1/x^2) &mult D_x);

1x2+1xD_x

(6.6.1.3)
M4 > 

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam