Homework Assignment#6:

Due Tuesday, 31 October: 

Note, although this is due after the exam on Thursday Oct 26, material from this assignment can be used on the exam.

Setup:

colors = {red, green, blue, cyan, magenta, yellow, 
            black} = 
{RGBColor[1, 0, 
              0]
, RGBColor[0, 1, 0]
, 
            RGBColor[0, 0, 1]
, 
            CMYKColor[1, 0, 0, 0]
, 
            CMYKColor[0, 1, 0, 0]
, 
            CMYKColor[0, 0, 1, 0]
, 
            CMYKColor[0, 0, 0, 
              1]
};
Plot[Table[i x, {i, 1, 7}]  // Evaluate, {x, 0, 1}, 
        PlotStyle -> colors];

Protect[{colors, red, green, blue, cyan, magenta, yellow, 
          black}];

Off[Clear::wrsym]
Off[General::spell]
Off[General::spell1]

Problem #1:
Metric Tensors for Cylindrical and Spherical  Coordinates:

Compute the 3-dimensional  metric tensor  "g" for  Cylindrical and Spherical  Coordinates. 
Hint: This is a good  assignment  to do with Mathematica or equivalent, therefore, I have shown you some Mathematica code below to get you started if you like to do it this way.

Clear["Global`*"]

<<Calculus`VectorAnalysis`

a) Cylindrical Coordinates:

?CoordinatesToCartesian

x2rRule =  
      Thread[ {x, y, z} -> 
          CoordinatesToCartesian[{r, θ, z}, Cylindrical] ]

vector = {r, θ, z};
tmp =  Outer[d, {x, y, z}, vector];
tmp  // MatrixForm

gMetric = Transpose[tmp] . tmp;
gMetric // MatrixForm

gMetric = gMetric  /. x2rRule  /. {d -> D}  // 
          Simplify;
gMetric // MatrixForm

dvector = {dr, dθ, dz};
dvector . gMetric . dvector

b) Spherical Coordinates:

?CoordinatesToCartesian

x2rRule =  
      Thread[ {x, y, z} -> 
          CoordinatesToCartesian[{r, θ, ϕ}, 
            Spherical] ]

vector = {r, θ, ϕ};
tmp =  Outer[d, {x, y, z}, vector];
tmp  // MatrixForm

gMetric = Transpose[tmp] . tmp;
gMetric // MatrixForm

gMetric = gMetric  /. x2rRule  /. {d -> D}  // 
          Simplify;
gMetric // MatrixForm

dvector = {dr, dθ, dϕ};
dvector . gMetric . dvector

Problem #2:
Gaussian Curvature for Cylindrical and Spherical Coordinates:  2-D part only:

We will take 2-dimensional  sub-spaces of Cylindrical and Spherical Coordinates,and then compute the Gaussian Curvature for these sub-spaces. 
Since there are 3-coordinates, and we take them 2 at a time, there are a total for 3-combinations for each coordinate system. 

For Cylindrical {r,θ,z}, we have: {r,θ},{r,z}, and {θ,z}
For Spherical {r,θ,ϕ}, we have: {r,θ},{r,,ϕ}  and {θ,ϕ}

For each pair or coordinates, compute the Gaussian curvature. Make a sketch of each 2-dimensional surface, and explain intuitively why you expect the Gaussian curvature is zero or not (as the case may be).


Hint: This is a good  assignment  to do with Mathematica or equivalent, therefore, I have shown you some Mathematica code below to get you started if you like to do it this way. I'll show you an example with Cartesian coordinates.

Clear["Global`*"]

<<Calculus`VectorAnalysis`

a) Cartesian Coordinates: {x,y}

gMetric=(({{1, 0}, {0, 1}}));

vector = {x, y};
dvector = {dx, dy};
dvector . gMetric . dvector

curvature =  (1/(2 g11 g22)) (
-d[
                  g11, {x2, 2}]  -  
              d[g22, {x1, 
                  2}] 
 +  (1/(2 g11)) (d[g11, 
                        x1] d[g22, x1]  +  
                    d[g11, x2]^2)  +   + (1/(2 g22)) (d[
                        g11, x2] d[g22, x1]  +  
                    d[g22, x1]^2));

rule1 = Thread[ {x1, x2} ->  vector ]

rule2 =   {{g11, g12}, {g21, g22}} ->  gMetric  //  
          Map[Flatten, #   , 1] &  // Thread

curvature  /. rule1  /. rule2  /. {d -> D}

Discussion:  The {x,y} sub-space is simply a flat 2-dimensional plane, like a sheet of flat paper. Therefore, we expect the curvature should be zero as computed above.

b) Cylindrical Coordinates: {r,θ}

c) Cylindrical Coordinates: {r,z}

d) Cylindrical Coordinates: {θ,z}

e) Spherical Coordinates: {r,θ}

f) Spherical Coordinates: {r,ϕ}

g) Spherical Coordinates: {θ,ϕ}

Problem #3:
Gaussian Curvature for Generalized Coordinates:

This is a variation of the above problem. We will work with coordinates {r,ϕ}, but assume a more general metric form, as shown below. 
a) Compute the Gaussian Curvature, K.
b) Solve for f[r] in terms of K and f'[r]=df/dr.
c) Solve the differential equation in part b) to obtain f[r]. 
(See me if you have never solved such an equation before. This is a simple 1'st order equation which can be solved by the age-old method of guessing.)
d) Now that you have obtained f[r],  substitue back in to obtain: (ds^2) = d(ϕ^2) (r^2) + (dr^2) f[r].

Clear["Global`*"]

<<Calculus`VectorAnalysis`

a) Generalized  Coordinates: {r,ϕ}

gMetric = DiagonalMatrix[{f[r], (r^2)}];
gMetric  // MatrixForm

vector = {r, ϕ};
dvector = {dr, dϕ};
dvector . gMetric . dvector

Problem #4:
Metric Tensors for Spherical and Cylindrical Coordinates: 4- D

By any means, generalize the 3-dimensional metrics "g" you computed in Problem #1 to the 4-dimensional space-time case.  Order your variables as follows: {t,x,y,z}.
Assume the signs of the Cartesian  metric "g" are (({{1, 0, 0, 0}, {0, -1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, -1}}))so that (ds^2) = (dt^2) - ((dx^2) + (dy^2) + (dz^2)).
Explain the reasoning you used to getyour result.

Clear["Global`*"]

<<Calculus`VectorAnalysis`

a) Cylindrical Coordinates:

?CoordinatesToCartesian

x2rRule =  
      Thread[ {x, y, z} -> 
          CoordinatesToCartesian[{r, θ, z}, Cylindrical] ]

g = 
        DiagonalMatrix[{1, -1, -1, -1}];
g // MatrixForm

tmp =  
        Outer[d, {t, x, y, z}, {t, r, θ, 
            z}];
tmp  // MatrixForm

gMetric = Transpose[tmp] . g . tmp;
gMetric // MatrixForm

gMetric = gMetric  /. x2rRule  /. {d -> D}  // 
          Simplify;
gMetric // MatrixForm

vector = {dt, dr, dθ, dz};
vector . gMetric . vector

b) Spherical Coordinates:

?CoordinatesToCartesian

x2rRule =  
      Thread[ {x, y, z} -> 
          CoordinatesToCartesian[{r, θ, ϕ}, 
            Spherical] ]

g = 
        DiagonalMatrix[{1, -1, -1, -1}];
g // MatrixForm

tmp =  
        Outer[d, {t, x, y, z}, {t, 
            r, θ, ϕ}];
tmp  // MatrixForm

gMetric = Transpose[tmp] . g . tmp;
gMetric // MatrixForm

gMetric = gMetric  /. x2rRule  /. {d -> D}  // 
          Simplify;
gMetric // MatrixForm

vector = {dt, dr, dθ, dz};
vector . gMetric . vector