L7-DiffGeomSurface.mws

Calculus IV with Maple
Copyright 2002, Dr. Jack Wagner
j.wagner@intelligentsearch.com


Lesson 7:
Basic Differential Geometry of Surfaces

Topics: Tangents to a surface along coordinate curves.  Normal to a surface. The tangent plane. The first fundamental form. The length of a curve projected onto a surface.  Angle between vectors .

We begin by examining surfaces which we know as the graph of a map,  . These are most commonly of the form z = f(x,y)  .  We consider first, the partial derivatives of z at a given point, P. That is, the directional derivatives of z with respect to each variable.  We will then find the tangents to the surface in the direction of each of the variables; the coordinate directions.  

Example 7.1

>    restart: with(plots): with(LinearAlgebra): with(VectorCalculus):

>    f := <x, y, sin(x*y)>;

f := Vector(%id = 23038604)

The point P on the surface.

>    p1 := eval(f, {x=Pi/4, y=Pi/4});

p1 := Vector(%id = 22239736)

We compute the principal parts of the tangent vectors in the coordinate directions.

>    df[x] := diff(f, x);

df[x] := Vector(%id = 23039444)

>    dfx[x, y=Pi/4] := eval(df[x], {x=Pi/4, y=Pi/4});

dfx[x,y = 1/4*Pi] := Vector(%id = 23561424)

>    df[y] := diff(f, y);

df[y] := Vector(%id = 23575420)

>    dfy[x, y=Pi/4] := eval(df[y], {x=Pi/4, y=Pi/4});  

dfy[x,y = 1/4*Pi] := Vector(%id = 23587400)

Now normalize each of these tangent vectors.

>    t[1] := Normalize(dfx[x, y=Pi/4], 2);

t[1] := Vector(%id = 23892936)

>    t[2] := Normalize(dfy[x, y=Pi/4], 2);

t[2] := Vector(%id = 23946396)

It is not necessary to normalize for the purpose of drawing the tangent line, but we will need the unit tangent vectors later. Now we create the tangent line equations.

>    T[1] := p1+s*t[1]:  

>    T[2] := p1+s*t[2]:

" spacecurve " will only accept lists as an argument.

>    TL[1] := convert(T[1], list): TL[2] := convert(T[2], list):

>    P1 := spacecurve({TL[1], TL[2]}, s=-1..1, thickness=3, color=black):

>    P2 := plot3d(f, x=0..Pi/2, y=0..Pi/2, color=pink):

>    display(P1, P2, axes=boxed, orientation=[-40, 40]);

[Maple Plot]

Here we have a pair of tangents lying in the direction of the coordinate lines on the surface. These are really the images  of the x any y axes with the origin transported to P.

Now we add a normal line.  Remember that the cross product of two vectors is orthogonal to the plane in which they lie and oriented according to the right hand rule.

>    n := t[1] &x t[2];

n := Vector(%id = 22404856)

We work with the unit normal.

>    n := Normalize(n);

n := Vector(%id = 2590428)

Now create the equation for the normal line

>    N := p1+s*n:

>    NL := convert(N, list):

>    P3 := spacecurve({TL[1], TL[2], NL}, s=-1..1, thickness=3, color=black):

>    display(P1, P2, P3, axes=boxed, orientation=[-25,60]);

[Maple Plot]

Now we have a set of unit vectors, {t1, t2, n},  which can be used as the basis for a coordinate system to investigate phenomena occurring on or near the surface in the neighborhood of the point, P= ( Pi/4, Pi/4, f(Pi/4,Pi/4) ).

We do this in our daily lives.  We do not ordinarily refer our motion to spherical coordinates, but rather North, South, East, West up and down.  The tangents we have found, however, are not orthogonal!

Anticipating a result, cos(theta) = t[1].t[2]/(abs(t[1])*abs(t[2]))    where theta  is the angle between t[1]  and t[2] . Remembering that t[1]  and t[2]  are unit tangent vectors:

>    theta[rad] := evalf(arccos(t[1].t[2]));

theta[rad] := 1.275525044

>    theta[deg] := evalf(convert(theta[rad], degrees));

theta[deg] := 73.08220166*degrees

It is also a simple matter to define a tangent plane at a point.  We compute the equation of the tangent plane orthogonal to the normal at P.

>    r := <x,y,z>:

>    TP1 := (r-p1).n=0;

TP1 := -4*(x-1/4*Pi)*(1+1/16*cos(1/16*Pi^2)^2*Pi^2)/(16+cos(1/16*Pi^2)^2*Pi^2)*cos(1/16*Pi^2)*Pi-4*(y-1/4*Pi)*(1+1/16*cos(1/16*Pi^2)^2*Pi^2)/(16+cos(1/16*Pi^2)^2*Pi^2)*cos(1/16*Pi^2)*Pi+16*(z-sin(1/16*...
TP1 := -4*(x-1/4*Pi)*(1+1/16*cos(1/16*Pi^2)^2*Pi^2)/(16+cos(1/16*Pi^2)^2*Pi^2)*cos(1/16*Pi^2)*Pi-4*(y-1/4*Pi)*(1+1/16*cos(1/16*Pi^2)^2*Pi^2)/(16+cos(1/16*Pi^2)^2*Pi^2)*cos(1/16*Pi^2)*Pi+16*(z-sin(1/16*...

Represent the tangent plane as an explicit function z(x,y)  by solving for z

>    TP := solve(TP1, z);

TP := 1/4*cos(1/16*Pi^2)*Pi*x-1/8*cos(1/16*Pi^2)*Pi^2+1/4*cos(1/16*Pi^2)*Pi*y+sin(1/16*Pi^2)

>    P4 := plot3d(TP, x=0..2, y=0..2, color=blue, style=wireframe):

>    P5 := spacecurve(NL, s=-1..1, thickness=3, color=black):

>    display(P2, P4, P5, axes=boxed, orientation=[150,70]);

[Maple Plot]

It turns out to be more fruitful to define the tangent plane in terms of the two tangent vectors, t[1]  and t[2] .

>    TP2 := p1+s*t[1]+t*t[2]:

>    P6 := plot3d(TP2, s=-1..1, t=-1..1, color=blue, style=wireframe):

>    display(P1, P2, P6, axes=framed, orientation=[150,70]);

[Maple Plot]

This is a useful exercise because, just as the tangent at a point on a curve is an approximation to the curve in a neighborhood of the  point, so the tangent plane at a point on a surface is an approximation to the surface in a neighborhood of the point. The set of vectors, {t1 t2, n},  form a  convenient set of axes to which events on the surface may be referred.  Thus, given a surface defined by:  

                       F(u,v) = [f[1](u,v), f[2](u,v).f[3](u,v)]
and a curve on that surface parametrized by t:
F(t) = [u(t), v(t)] ,  consider a tangent vector, V, to the curve at a point p = [u(t[0]), v(t[0])]  : V = F[u] u' ( t[0] )  + F[v] v'( t[0] ),  where F[u] = dF/du  and    u' ( t[0] )= du/dt  and similarly for v.  Now, V lies in the tangent plane which has as its coordinate basis, F[u]  and F[v]  and has components in that basis, u' ( t[0] ), v'( t[0] ) . The quadratic form, defined by the inner product  on R^3  , I[p] = `<,>`(V,V)   and expressed in the F[u] , F[v]  basis is known as the first fundamental form.

I[p] = `<,>`(V,V)  = < F[u] u' ( t[0] )  + F[v] v'( t[0] ), F[u] u' ( t[0] )  + F[v] v'( t[0] )> = `<,>`(F[u],F[u])[p] (du/dt*t[0])^2  + 2 `<,>`(F[u],F[v])   du/dt*t[0]    dv/dt*t[0]   +

`<,>`(F[v],F[v])   (dv/dt*t[0])^2  


 Traditionally one sets:      
E = F[u].F[u]         F = F[u].F[v]           G = F[v].F[v]             
In these terms we have:
ds^2   =   abs(V)^2  =   E (du/dt*t[0])^2  + 2 F   du/dt*t[0]    dv/dt*t[0]   + G   (dv/dt*t[0])^2  

             We have expressed the element of arc length, ds ,  in terms that are intrinsic to the surface.  Many other properties of the surface can also be expressed in terms of these intrinsic quantities.  As an example, the angle between the two coordinate tangent vectors, F[u]  and   F[v]   at  p, is found by: cos(theta) = `<,>`(F[u],F[v])/(abs(F[u])*abs(F[v]))  = F/sqrt(E*G) .  The coordinate vectors are orthogonal if and only if F =0.

Example 7.2

Compute the arc length of the curve t = x^2  projected onto the surface f(x,y) = [x, y, sin(x*y)]

>    restart: with(plots): with(LinearAlgebra): with(VectorCalculus):

>    f := <x, y, sin(x*y)>;

f := Vector(%id = 18563432)

>    u := t:  v := t^2:

The parabola y = x^2  in the x-y plane.

>    C1 := <u, v, 0>;                           

C1 := Vector(%id = 18658456)

The parabola projected onto the surface

>    C2 := eval(f, {x=u, y=v});

C2 := Vector(%id = 18962976)

Now we create plot structures for the surface, the parabola in the x-y plane and the parabola projected onto the surface.

>    C1L := convert(C1, list): C2L := convert(C2, list):

>    P1 := plot3d(f, x=0..Pi/2, y=0..Pi/2, color=pink, style=wireframe):

>    S1 := spacecurve(C1L, t=0..1.2, color=blue, thickness=3):

>    S2 := spacecurve(C2L, t=0..1.2, color=red, thickness=3):

>    display(S1, S2, P1, axes=boxed, labels=[x, y, z], orientation=[160,60]);

[Maple Plot]

Now we compute the coefficients of the first fundamental form.

>    df[x] := diff(f, x);  df[y] := diff(f, y);

df[x] := Vector(%id = 19189084)

df[y] := Vector(%id = 18999868)

>    E := df[x].df[x];

E := 1+cos(x*y)^2*y^2

>    F := df[x].df[y];

F := cos(x*y)^2*y*x

>    G := df[y].df[y];

G := 1+cos(x*y)^2*x^2

Now the derivatives of u(t)  and v(t) ..

>    du := diff(u, t);

du := 1

>    dv := diff(v, t);

dv := 2*t

Now we compute the element of arc length in terms of the coefficients of the first fundamental form.

>    ds := sqrt(E*du^2+2*F*du*dv+G*dv^2);

ds := (1+cos(x*y)^2*y^2+4*cos(x*y)^2*y*x*t+4*(1+cos(x*y)^2*x^2)*t^2)^(1/2)

>    ds[u, v] := subs({x=t, y=t^2}, ds);

ds[t,t^2] := (1+5*cos(t^3)^2*t^4+4*(1+cos(t^3)^2*t^2)*t^2)^(1/2)

            Compute the arc length of the curve between t=0 and t=1.

>    arclength := evalf(int(ds[u, v], t=0..1));

arclength := 1.751489538

Once the methodology is in place it is a simple matter to call up the saved worksheet and replace the surface, the curve and the parameter limits.

Example  6.3

Project the plane curve, y = sin(2*x)   onto the surface, z = log(x+y)  , and find its length, on the surface, between Pi/4  and Pi/2 .

>    restart: with(plots): with(LinearAlgebra): with(VectorCalculus):

The surface

>    f := <x, y, log(x+y)>:

>    u := t:    v := sin(2*t):

The curve in the plane defined parametrically

>    C1 := <u, v, 0>:

The curve embedded in the surface

>    C2 := subs({x=u, y=v}, f):

>    P1 := plot3d(f, x=0..Pi/2, y=0..Pi/2, color=pink, style=wireframe):

>    S1 := spacecurve(evalm(C1), t=0..Pi/2, color=blue, thickness=3):

>    S2 := spacecurve(evalm(C2), t=0..Pi/2, color=red, thickness=3):

>    display(S1, S2, P1, axes=framed, labels=[x, y, z]);

[Maple Plot]

>    df[x] := diff(f, x); df[y] := diff(f, y);

df[x] := Vector(%id = 22088016)

df[y] := Vector(%id = 2768028)

>    E := df[x].df[x];

E := 1+1/((x+y)^2)

>    F := df[x].df[y];

F := 1/((x+y)^2)

>    G := df[y].df[y];

G := 1+1/((x+y)^2)

>    du := diff(u, t);

du := 1

>    dv := diff(v, t);

dv := 2*cos(2*t)

>    ds[1] := sqrt(E*du^2+2*F*du*dv+G*dv^2);

ds[1] := (1+1/((x+y)^2)+4/(x+y)^2*cos(2*t)+4*(1+1/((x+y)^2))*cos(2*t)^2)^(1/2)

>    ds[2] := subs({x=t, y=sin(t)}, ds[1]);

ds[2] := (1+1/((t+sin(t))^2)+4/(t+sin(t))^2*cos(2*t)+4*(1+1/((t+sin(t))^2))*cos(2*t)^2)^(1/2)

>    arclength := evalf(int(ds[2], t=Pi/4..Pi/2));

arclength := 1.344173030

Note that, in creating a composite plot from separate plot structures, options specific to each plot such as the color and thickness are specified for each plot structure, while options such as the style of axes and labeling are specified in the display command.  

Example 7.4

If we were interested in working at a point on the surface of Ex. 7.3,  say P = f(Pi/4,Pi/4) ,  we would like to have a coordinate system with origin at P, and with axes tangent to the surface.  Proceeding as before:

>    P := eval(f, {x=u, y=v});

P := Vector(%id = 17959460)

>    P := eval(P, t=Pi/4);

P := Vector(%id = 17959540)

>    v1 := eval(df[x], {x=u, y=v});

v1 := Vector(%id = 17959620)

>    v1 := eval(v1, t=Pi/4);

v1 := Vector(%id = 17959700)

>    v1 := Normalize(v1, 2, inplace);

v1 := Vector(%id = 17959700)

>    v2 := eval(df[y], {x=u, y=v});

v2 := Vector(%id = 17959780)

>    v2 := subs(t=Pi/4, v2);

v2 := Vector(%id = 17959860)

>    v2 := Normalize(v2, 2, inplace);

v2 := Vector(%id = 17959860)

>    ax1 := P+s*v1;  ax2 := P+s*v2;

ax1 := Vector(%id = 17959940)

ax2 := Vector(%id = 17959980)

>    S4 := spacecurve({evalm(ax1), evalm(ax2)}, s=-1..1, color=black, thickness=3):

>    display(P1, S2, S4, axes=framed, labels=[x, y, z]);

[Maple Plot]

>    theta := evalf(arccos(v1.v2));

theta := 1.329668877

>    theta := evalf(convert(theta, degrees));

theta := 76.18441479*degrees

In courses on differential geometry the equations for curves, imbedded in a surface, are derived with respect to such coordinate systems.

Practice
1. Plot the surface,
z = x^3+y^3   together with coordinate tangent lines, normal line and tangent plane at the point x = 0, y = 0    .
2. For the surface defined by  
z = (x^3-y^3)^(1/3) ,  find the gradient at the point (5, -5) and the plane orthogonal to the gradient through the point, (5, -5, 6.299605249).
3. Project the curve,
y = sqrt(x)   onto the surface z = ln(sqrt(x*y))  ,  between the points x = 0 .. 2, y = 0 .. 2  , and find the length of the projected curve, between x = 1  and x = 2 .  Plot the curve, and its projection together with the surface.
4. Project the straight line, y=3x onto the surface  
S(x,y) = [x+y, x-y, x*y] , and plot them both on the same set of axes in the range   x = -1 .. 1 .  Find the length of the projected line.