Application Center - Maplesoft

App Preview:

Calculating Gaussian Curvature Using Differential Forms

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application




Calculating Gaussian Curvature Using Differential Forms

Frank Wang, fwang@lagcc.cuny.edu

 

Riemannian geometry is customarily developed by tensor methods, which is not necessarily the most computationally efficient approach.  Using the language of differential forms, Elie Cartan's formulation of the Riemannian geometry can be elegantly summarized in two structural equations.  Essentially, the local curvature of the manifold is a measure of how the connection varies from point to point.  This Maple worksheet uses the DifferentialGeometry package to solves three problems in Harley Flanders' book on differential forms to demonstrate the implementation of Cartan's method.  

Our discussion follows that of Flanders'.  On a (curved) manifold, we can attach to each point a right-handed orthonormal frames e*i.  As we move from point to point, we expect that the local frame will rotate.  Cartan's first structural equation is

(I)           de = `ωe`.  

The differentiation (exterior derivative) of the frames is related to the connection 1-form omega, which connects nearby frames.  Curvature should be given by some 2-forms, which can only be a combination of `dω` and omega^2.  The second structure equation defines the curvature 2-form R:     

(II)          `and`(R = `dω`-omega, omega).  

The abstract notation above is perhaps quite difficult for students to comprehend.  We will focus on a surface in a three-dimensional Euclidean space (= ) to provide some concrete examples.   

Consider a smooth surface Σ in = .  We choose a moving frame e at each point x of Σ in such a way that "e3 "is the normal to the surface.  Since x is constrained to move in the surface,

"dx=sigma1 e1+sigma2 e2,   "

where sigma1 and sigma2 are 1-forms.  It should be clear that the 2-form `σ1σ2` represents the element of area of Σ.  

 

From Flanders' book page 41.

 

The exterior derivative of "e1" can be expressed in terms of e*i, i = 1 .. 3.  But "e1"$"e1"=1","therefore "de1"$"e1"=0.  We have

"de1"e2 "-omega1 e3 .  "

Similarly,

"de2=-`ϖ` e1 -omega2 e3 . "

Imagine that we live on a two-dimensional surface, we will have no knowledge about how "e3 "varies.  Let's omit writing "de3".  Even if we don't know the normal vector, the Gauss curvature can still be determined from σ1 and σ2, as it is an intrinsic quantity.  In the present case (two dimensions), the curvature two-form is just R = `dω`, since omega and omega = 0.  

 

In the following, we will use the crucial formula

 

`dϖ` = -`Kσ1σ1`

 

to calculate the Gauss curvature K.   

Problem: Set up a frame and the structue equations for a sphere of radius R.  Compute the curvatures.  

restart:

Using spherical coordinates to express the location on a sphere of radius R, we have

x := R*sin(theta)*cos(phi); y := R*sin(theta)*sin(phi); z := R*cos(theta);

R*sin(theta)*cos(phi)

 

R*sin(theta)*sin(phi)

 

R*cos(theta)

(1)

We make a 3D plot of such a sphere.

plot3d(eval([x , y, z], R=1), theta=0..Pi, phi=0..2*Pi, scaling=constrained);

 

with(LinearAlgebra): with(DifferentialGeometry):

Here we use capital X for the position vector, which should not be confused with the first component of Cartesian coordinates.

X := < x | y | z >;

X := Vector[row](3, {(1) = R*sin(theta)*cos(phi), (2) = R*sin(theta)*sin(phi), (3) = R*cos(theta)})

(2)

Tangent vectors along the theta and phi directions are the natural choice of bases.  

v1 := map(diff, X, theta);

v1 := Vector[row](3, {(1) = R*cos(theta)*cos(phi), (2) = R*cos(theta)*sin(phi), (3) = -R*sin(theta)})

(3)

v2 := map(diff, X, phi);

v2 := Vector[row](3, {(1) = -R*sin(theta)*sin(phi), (2) = R*sin(theta)*cos(phi), (3) = 0})

(4)

Normalizing these two vector fields

e1 := simplify(Normalize(v1, Euclidean, conjugate=false)) assuming R>0;

e1 := Vector[row](3, {(1) = cos(theta)*cos(phi), (2) = cos(theta)*sin(phi), (3) = -sin(theta)})

(5)

e2 := simplify(Normalize(v2, Euclidean, conjugate=false)) assuming R>0, theta>0, theta<Pi;

e2 := Vector[row](3, {(1) = -sin(phi), (2) = cos(phi), (3) = 0})

(6)

and forming the normal vector

e3 := simplify(CrossProduct(e1, e2));

e3 := Vector[row](3, {(1) = sin(theta)*cos(phi), (2) = sin(theta)*sin(phi), (3) = cos(theta)})

(7)

we obtain a orthonormal frame.  We set up a manifold (a surface in =)   

DGsetup([theta, phi], M);

`frame name: M`

(8)

then find the exterior derivative of "e1 "and "e2", denoted by the obvious symbols de1 and de2.

M > 

dX := ExteriorDerivative(X);

dX := Vector[row](3, {(1) = _DG([["form", M, 1], [[[1], R*cos(theta)*cos(phi)], [[2], -R*sin(theta)*sin(phi)]]]), (2) = _DG([["form", M, 1], [[[1], R*cos(theta)*sin(phi)], [[2], R*sin(theta)*cos(phi)]]]), (3) = _DG([["form", M, 1], [[[1], -R*sin(theta)]]])})

(9)
M > 

de1 := ExteriorDerivative(e1);

de1 := Vector[row](3, {(1) = _DG([["form", M, 1], [[[1], -sin(theta)*cos(phi)], [[2], -cos(theta)*sin(phi)]]]), (2) = _DG([["form", M, 1], [[[1], -sin(theta)*sin(phi)], [[2], cos(theta)*cos(phi)]]]), (3) = _DG([["form", M, 1], [[[1], -cos(theta)]]])})

(10)
M > 

de2 := ExteriorDerivative(e2);

de2 := Vector[row](3, {(1) = _DG([["form", M, 1], [[[2], -cos(phi)]]]), (2) = _DG([["form", M, 1], [[[2], -sin(phi)]]]), (3) = _DG([["form", M, 1], [[[1], 0]]])})

(11)

The connection form ϖ (which we use omega for it below) can be extracted from either de1 or de2.

M > 

omega := evalDG(DotProduct(de1, e2, conjugate=false));

_DG([["form", M, 1], [[[2], cos(theta)]]])

(12)
M > 

sigma1 := evalDG(DotProduct(dX, e1, conjugate=false));

_DG([["form", M, 1], [[[1], R]]])

(13)
M > 

sigma2 := evalDG(DotProduct(dX, e2, conjugate=false));

_DG([["form", M, 1], [[[2], R*sin(theta)]]])

(14)

Once we have the connection form, we find its exterior derivative

M > 

dw := ExteriorDerivative(omega);

_DG([["form", M, 2], [[[1, 2], -sin(theta)]]])

(15)

We obtain the Gauss curvature from the formula `d&varpi;` = -`K&sigma;1&sigma;1`

M > 

K := -GetComponents(dw, [sigma1 &wedge sigma2]);

[1/R^2]

(16)

It is not surprising that the Gauss curvature of a sphere of radius R is 1/R^2.

M > 

restart:

 

Problem: Find Gaussian curvature of the surface of revolution obtained by revolving the curve

 

x = cos(theta)+log(tan((1/2)*theta))

y = sin(theta)

(1/2)*Pi < theta and theta < Pi

about the x-axis.  

restart:

x := cos(theta) + log(tan(theta/2));

cos(theta)+ln(tan((1/2)*theta))

(17)

y := sin(theta);

sin(theta)

(18)

Let us first see what this curve looks like.

plot([x, y, theta=Pi/2..Pi], scaling=constrained);

 

The surface of revolution appears as

plot3d([x, y*cos(phi), y*sin(phi)], theta=Pi/2..3*Pi/2, phi=0..2*Pi, scaling=constrained);

 

with(LinearAlgebra): with(DifferentialGeometry):

Again, we use capital X for the position vector.  

X := < x | y*cos(phi) | y*sin(phi) >;

X := Vector[row](3, {(1) = cos(theta)+ln(tan((1/2)*theta)), (2) = sin(theta)*cos(phi), (3) = sin(theta)*sin(phi)})

(19)

The procedure of obtaining an orthonormal frame is similar to that of the previous example.  Actually, we can just copy from there and make minor changes.  

v1 := simplify(map(diff, X, theta));

v1 := Vector[row](3, {(1) = cos(theta)^2/sin(theta), (2) = cos(theta)*cos(phi), (3) = cos(theta)*sin(phi)})

(20)

v2 := map(diff, X, phi);

v2 := Vector[row](3, {(1) = 0, (2) = -sin(theta)*sin(phi), (3) = sin(theta)*cos(phi)})

(21)

e1 := simplify(Normalize(v1, Euclidean, conjugate=false)) assuming theta>Pi/2, theta<Pi;

e1 := Vector[row](3, {(1) = -cos(theta), (2) = -sin(theta)*cos(phi), (3) = -sin(theta)*sin(phi)})

(22)

e2 := simplify(Normalize(v2, Euclidean, conjugate=false)) assuming theta>Pi/2, theta<Pi;

e2 := Vector[row](3, {(1) = 0, (2) = -sin(phi), (3) = cos(phi)})

(23)

e3 := simplify(CrossProduct(e1, e2));

e3 := Vector[row](3, {(1) = -sin(theta), (2) = cos(theta)*cos(phi), (3) = cos(theta)*sin(phi)})

(24)

DGsetup([theta, phi], M);

`frame name: M`

(25)
M > 

dX := ExteriorDerivative(X);

dX := Vector[row](3, {(1) = _DG([["form", M, 1], [[[1], cos(theta)^2/sin(theta)]]]), (2) = _DG([["form", M, 1], [[[1], cos(theta)*cos(phi)], [[2], -sin(theta)*sin(phi)]]]), (3) = _DG([["form", M, 1], [[[1], cos(theta)*sin(phi)], [[2], sin(theta)*cos(phi)]]])})

(26)
M > 

de1 := ExteriorDerivative(e1);

de1 := Vector[row](3, {(1) = _DG([["form", M, 1], [[[1], sin(theta)]]]), (2) = _DG([["form", M, 1], [[[1], -cos(theta)*cos(phi)], [[2], sin(theta)*sin(phi)]]]), (3) = _DG([["form", M, 1], [[[1], -cos(theta)*sin(phi)], [[2], -sin(theta)*cos(phi)]]])})

(27)
M > 

de2 := ExteriorDerivative(e2);

de2 := Vector[row](3, {(1) = _DG([["form", M, 1], [[[1], 0]]]), (2) = _DG([["form", M, 1], [[[2], -cos(phi)]]]), (3) = _DG([["form", M, 1], [[[2], -sin(phi)]]])})

(28)

Here we obtain the connection form ϖ

M > 

omega := evalDG(DotProduct(de1, e2, conjugate=false));

_DG([["form", M, 1], [[[2], -sin(theta)]]])

(29)
M > 

sigma1 := evalDG(DotProduct(dX, e1, conjugate=false));

_DG([["form", M, 1], [[[1], -cos(theta)/sin(theta)]]])

(30)
M > 

sigma2 := evalDG(DotProduct(dX, e2, conjugate=false));

_DG([["form", M, 1], [[[2], sin(theta)]]])

(31)
M > 

dw := ExteriorDerivative(omega);

_DG([["form", M, 2], [[[1, 2], -cos(theta)]]])

(32)

Using the formula `d&varpi;` = -`K&sigma;1&sigma;1`, the Gauss curvature is found

M > 

K := -GetComponents(dw, [sigma1 &wedge sigma2]);

[-1]

(33)

For this surface, the curvature is a constant: -1.  

M > 

restart:

M > 

 

 

Problem: Given a surface in the form z = f(x, y), develop formulas for H and K in terms of f and its partial derivatives.  

restart:

with(LinearAlgebra): with(DifferentialGeometry):

Once again we define the position vector (with capital X) whose components are `<,>`(x, y, f(x, y)).  

X := < x | y | f(x,y) >;

X := Vector[row](3, {(1) = x, (2) = y, (3) = f(x, y)})

(34)

We can find two independent tangent vectors on the surface.

v1 := map(diff, X, x);

v1 := Vector[row](3, {(1) = 1, (2) = 0, (3) = diff(f(x, y), x)})

(35)

v2 := map(diff, X, y);

v2 := Vector[row](3, {(1) = 0, (2) = 1, (3) = diff(f(x, y), y)})

(36)

We apply the Gram-Schmidt process to construct a set of orthonomal unit vectors e1 and e2.  

e1 := Normalize(v1, Euclidean, conjugate=false);

e1 := Vector[row](3, {(1) = 1/sqrt(1+(diff(f(x, y), x))^2), (2) = 0, (3) = (diff(f(x, y), x))/sqrt(1+(diff(f(x, y), x))^2)})

(37)

u2 := v2 - DotProduct(v2, e1, conjugate=false)*e1;

u2 := Vector[row](3, {(1) = -(diff(f(x, y), y))*(diff(f(x, y), x))/(1+(diff(f(x, y), x))^2), (2) = 1, (3) = diff(f(x, y), y)-(diff(f(x, y), y))*(diff(f(x, y), x))^2/(1+(diff(f(x, y), x))^2)})

(38)

e2 := simplify(Normalize(u2, Euclidean, conjugate=false));

e2 := Vector[row](3, {(1) = -(diff(f(x, y), y))*(diff(f(x, y), x))/(sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2))*(1+(diff(f(x, y), x))^2)), (2) = 1/sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2)), (3) = (diff(f(x, y), y))/(sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2))*(1+(diff(f(x, y), x))^2))})

(39)

e3 := simplify(CrossProduct(e1, e2));

e3 := Vector[row](3, {(1) = -(diff(f(x, y), x))/(sqrt(1+(diff(f(x, y), x))^2)*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2))), (2) = -(diff(f(x, y), y))/(sqrt(1+(diff(f(x, y), x))^2)*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2))), (3) = 1/(sqrt(1+(diff(f(x, y), x))^2)*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2)))})

(40)

The rest of the calculation is essentially the same as the previous two examples.  

DGsetup([x, y], M);

`frame name: M`

(41)
M > 

dX := ExteriorDerivative(X);

dX := Vector[row](3, {(1) = _DG([["form", M, 1], [[[1], 1]]]), (2) = _DG([["form", M, 1], [[[2], 1]]]), (3) = _DG([["form", M, 1], [[[1], diff(f(x, y), x)], [[2], diff(f(x, y), y)]]])})

(42)
M > 

de1 := ExteriorDerivative(e1);

de1 := Vector[row](3, {(1) = _DG([["form", M, 1], [[[1], -(diff(f(x, y), x))*(diff(f(x, y), x, x))/(1+(diff(f(x, y), x))^2)^(3/2)], [[2], -(diff(f(x, y), x))*(diff(f(x, y), x, y))/(1+(diff(f(x, y), x))^2)^(3/2)]]]), (2) = _DG([["form", M, 1], [[[1], 0]]]), (3) = _DG([["form", M, 1], [[[1], (diff(f(x, y), x, x))/(1+(diff(f(x, y), x))^2)^(3/2)], [[2], (diff(f(x, y), x, y))/(1+(diff(f(x, y), x))^2)^(3/2)]]])})

(43)
M > 

de2 := ExteriorDerivative(e2);

de2 := Vector[row](3, {(1) = _DG([["form", M, 1], [[[1], -((diff(f(x, y), x))^5*(diff(f(x, y), x, y))-(diff(f(x, y), x))^4*(diff(f(x, y), y))*(diff(f(x, y), x, x))+2*(diff(f(x, y), x))^3*(diff(f(x, y), x, y))+(diff(f(x, y), y))^3*(diff(f(x, y), x, x))+(diff(f(x, y), x))*(diff(f(x, y), x, y))+(diff(f(x, y), y))*(diff(f(x, y), x, x)))/(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)*(1+(diff(f(x, y), x))^2)^2*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2)))], [[2], -((diff(f(x, y), x))^5*(diff(f(x, y), y, y))-(diff(f(x, y), x))^4*(diff(f(x, y), y))*(diff(f(x, y), x, y))+2*(diff(f(x, y), x))^3*(diff(f(x, y), y, y))+(diff(f(x, y), y))^3*(diff(f(x, y), x, y))+(diff(f(x, y), y, y))*(diff(f(x, y), x))+(diff(f(x, y), y))*(diff(f(x, y), x, y)))/(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)*(1+(diff(f(x, y), x))^2)^2*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2)))]]]), (2) = _DG([["form", M, 1], [[[1], -(diff(f(x, y), y))*((diff(f(x, y), x))^2*(diff(f(x, y), x, y))-(diff(f(x, y), y))*(diff(f(x, y), x))*(diff(f(x, y), x, x))+diff(f(x, y), x, y))/(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)*(1+(diff(f(x, y), x))^2)*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2)))], [[2], -(diff(f(x, y), y))*((diff(f(x, y), x))^2*(diff(f(x, y), y, y))-(diff(f(x, y), y))*(diff(f(x, y), x))*(diff(f(x, y), x, y))+diff(f(x, y), y, y))/(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)*(1+(diff(f(x, y), x))^2)*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2)))]]]), (3) = _DG([["form", M, 1], [[[1], ((diff(f(x, y), x))^4*(diff(f(x, y), x, y))-2*(diff(f(x, y), x))^3*(diff(f(x, y), y))*(diff(f(x, y), x, x))-(diff(f(x, y), x))*(diff(f(x, y), y))^3*(diff(f(x, y), x, x))+2*(diff(f(x, y), x))^2*(diff(f(x, y), x, y))-2*(diff(f(x, y), y))*(diff(f(x, y), x))*(diff(f(x, y), x, x))+diff(f(x, y), x, y))/(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)*(1+(diff(f(x, y), x))^2)^2*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2)))], [[2], ((diff(f(x, y), x))^4*(diff(f(x, y), y, y))-2*(diff(f(x, y), x))^3*(diff(f(x, y), y))*(diff(f(x, y), x, y))-(diff(f(x, y), x))*(diff(f(x, y), y))^3*(diff(f(x, y), x, y))+2*(diff(f(x, y), x))^2*(diff(f(x, y), y, y))-2*(diff(f(x, y), y))*(diff(f(x, y), x))*(diff(f(x, y), x, y))+diff(f(x, y), y, y))/(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)*(1+(diff(f(x, y), x))^2)^2*sqrt(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2)))]]])})

(44)
M > 

omega := evalDG(DotProduct(de1, e2, conjugate=false));

_DG([["form", M, 1], [[[1], (diff(f(x, y), y))*(diff(diff(f(x, y), x), x))/((((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2))^(1/2)*(1+(diff(f(x, y), x))^2)^(3/2))], [[2], (diff(f(x, y), y))*(diff(diff(f(x, y), x), y))/((((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2))^(1/2)*(1+(diff(f(x, y), x))^2)^(3/2))]]])

(45)
M > 

sigma1 := evalDG(DotProduct(dX, e1, conjugate=false));

_DG([["form", M, 1], [[[1], (1+(diff(f(x, y), x))^2)^(1/2)], [[2], (diff(f(x, y), x))*(diff(f(x, y), y))/(1+(diff(f(x, y), x))^2)^(1/2)]]])

(46)
M > 

sigma2 := evalDG(DotProduct(dX, e2, conjugate=false));

_DG([["form", M, 1], [[[2], ((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/((((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2))^(1/2)*(1+(diff(f(x, y), x))^2))]]])

(47)
M > 

dw := ExteriorDerivative(omega);

_DG([["form", M, 2], [[[1, 2], ((diff(diff(f(x, y), x), y))^2-(diff(diff(f(x, y), y), y))*(diff(diff(f(x, y), x), x)))/((1+(diff(f(x, y), x))^2)^(1/2)*((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)*(((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)/(1+(diff(f(x, y), x))^2))^(1/2))]]])

(48)

Using the fact that `d&varpi;` = -`K&sigma;1&sigma;1`

M > 

K := -GetComponents(dw, [sigma1 &wedge sigma2]);

[-((diff(diff(f(x, y), x), y))^2-(diff(diff(f(x, y), y), y))*(diff(diff(f(x, y), x), x)))/((diff(f(x, y), x))^2+(diff(f(x, y), y))^2+1)^2]

(49)

We obtain this formula for K in terms of f and its partial derivatives.  

M > 

restart:

 

Reference

 

Harley Flanders, Differential Forms with Applications wo the Physical Sciences.  New York: Dover Publications (1989).