Computational Geometry Workshop

Wichita State University, Dept. of Mathematics

Vector Fields and 1-Forms

Last changed: 31 Aug 2017

Authors: Justin M. Ryan,

This notebook contains sample code related to the lecture on Vector Fields and 1-Forms. Terse lecture notes may be found at

http://geometerjustin.com/teaching/cgw/notes/notes_01.html

So future readers know what version we're using:

In [1]:
version()
Out[1]:
'SageMath version 7.5.1, Release Date: 2017-01-15'

Get outputs in LaTeX form

In [2]:
%display latex

We begin by defining a coordinate chart $\mathbb{U}$ in $\mathbb{R}^n$. The best way to do this is to define $\mathbb{U}$ to be a 3-dimensional real manifold with a single chart. (We will define manifolds in full rigor later in the semester.)

In [3]:
U = Manifold(3,'U',latex_name=r'\mathbb{U}',start_index=1)
In [4]:
print(U)
U
3-dimensional differentiable manifold U
Out[4]:

Next we define the coordinates.

In [5]:
coord.<x,y,z>=U.chart()
In [6]:
print(coord)
coord
Chart (U, (x, y, z))
Out[6]:
In [7]:
p = U.point((1,-1,3),chart=coord);
print(p)
Point on the 3-dimensional differentiable manifold U

Defining coordinates automatically defines a basis for the tangent bundle to $\mathbb{U}$. This is called a frame field on $\mathbb{U}$.

In [8]:
coord.frame()
Out[8]:

A vector field is an $\mathfrak{F}$-linear combination of these basis vectors.

In [9]:
X1 = U.vector_field(name='X1',latex_name=r'X_1')
In [10]:
X1[:]=[x^2,-y,2*x*y-z]
In [11]:
print(X1)
X1
Vector field X1 on the 3-dimensional differentiable manifold U
Out[11]:
In [12]:
X1.display()
Out[12]:

Vector fields act on smooth functions. We must regard a function on $\mathbb{U}$ as a scalar field on $\mathbb{U}$.

In [13]:
f = U.scalar_field({coord:x+2*y-z})
f.display()
Out[13]:
In [14]:
f(p)
Out[14]:

We can now apply the vector field to the function

In [15]:
X1(f).display()
Out[15]:

This should be the same answer that we get by applying the differential of $f$ to $X_1$, as in Calculus III

In [16]:
f.differential()(X1).display()
Out[16]:
In [17]:
X1(f) == f.differential()(X1)
Out[17]:
In [18]:
X1(f)(p)
Out[18]:

We can also easily compute the Lie bracket of two vector fields

In [19]:
X2 = U.vector_field(name='X2',latex_name=r'X_2');
X2[:] = [0,3*x*y,tan(x*z)];
X1X2 = X1.bracket(X2);
print(X1X2)
X1X2.display()
Vector field on the 3-dimensional differentiable manifold U
Out[19]:

Choosing coordinates on $\mathbb{U}$ also automatically defines a frame field for the cotangent bundle. This is called a coframe on $\mathbb{U}$.

In [20]:
coord.coframe()
Out[20]:

A 1-form is an $\mathfrak{F}$-linear combination of these basis covectors.

In [21]:
t1 = U.diff_form(1,name='t1',latex_name=r'\theta_1')
In [22]:
t1[:] = [x,1/y,sin(z)]
In [23]:
print(t1)
t1
1-form t1 on the 3-dimensional differentiable manifold U
Out[23]:
In [24]:
t1.display()
Out[24]:

1-forms act on vector fields.

In [25]:
t1(X1)
Out[25]:
In [26]:
t1(X1).display()
Out[26]:
In [27]:
t1(X1)(p)
Out[27]:
In [ ]: