Connection Coefficients for Spherical Polar Coordinates, Computed Via GRTensorM in Mathematica

Example by Kip, for Ph136c, 25 April 2000

Import GRTensor into Mathematica, and Set Directory

<< grii/grt.m

\(SetOptions[grii, 
      MetricPath -> "/home/kip/courses/ph136/1999.00/chapters/chap23/"]\)

Define Coordinates, Basis Vectors, and Metric

I shall use as my example, the connection coefficients for spherical polar coordinates in 3-dimensional Euclidean space.  The coordinates are denoted r, th (for theta) and ph (for phi).  The input of coordinates, basis vectors and metric is initiated via the command

makeg[sphere3d]

Here "sphere3d" is the name that I am giving to this metric and basis.  This command brings up a series of prompt windows into which I type the appropriate information:

First Prompt Window: Choice of what to enter

>Do you wish to enter a
>   1) metric: g[dn,dn]
>   2) line element [ds],
>   3)non-holonomic basis e1..e4, or
>   4) null tetrad [l,n,m,mbar]?

3

[Note: The phrase "non-holonomic basis" means "non-coordinate basis".  I plan to use the orthonormal basis associated with spherical coordinates, so I choose this.]

Second Prompt Window: Names of coordinates

>Enter coordinates as a LIST (e.g. {r,thetha,phi,t})

{r,th,ph}

Third Prompt Window: Choice of components of basis vectors to enter

>Would you like to enter
>     1) covariant components,
>     2) contravariant components, or
>     3) both.

2

[Note:  If we write our orthonormal basis vectors as (Subscript[e, [j] ])= (Subscript[e, [j]]^k)∂/∂(x^k), then (Subscript[e, [j]]^k)are the "contravariant components" (of the non-coordinate basis vector (Subscript[e, (j)])) to which the above query refers.  I have chosen to enter these contravariant components.]

Fourth , Fifth and Sixth Prompt Windows: Values of components of basis vectors

>Enter the contravariant components of basis vector e[1] as a List (e.g. {1,0,0,0})

{1,0,0}

[Note: This says that (Subscript[e, [r]]) is equal to ∂/∂r ]

>Enter the contravariant components of basis vector e[2] as a List (e.g.{1,0,0,0})

{0,1/r,0}

[Note: This says that (Subscript[e, [θ]]) is (1/r)∂/∂θ ]

>Enter the contravariant components of basis vector e[2] as a List (e.g.{1,0,0,0}

{0,0,1/(r Sin[th])}

[Note: This says that (Subscript[e, [ϕ]]) is 1/(r Sin[θ])  ∂/∂ϕ]

Remaining Prompt Windows: Metric components in the non-coordinate basis, i.e. inner product of the basis vectors with each other

>Is the basis inner product
>   1) Diagonal, or 
>   2) Symmetric?

1

>Enter eta[1,1]

1

[Note: eta[j,k] is GRTensor's notation for the components of the metric in the non-coordinate basis.  My response says that eta[1,1] = (the inner product of (Subscript[e, [r]])with itself) is unity -- as is dictated by the fact that my chosen basis is orthonormal.

>Enter eta[2,2]

1

>Enter eta[3,3]

1

GRTensor's Response to this Input:

[Note: At this point, in response to a window, I tell GRTensor to save the metric; it saves it in my chosen directory, so I can use it in the future.  In response to another window, I tell GRTensor that I want to use this metric in a calculation.  It then responds with the following summary of the metric and basis:]

Compute and Display Connection Coefficients in Non-Coordinate Basis

I now compute the connection coefficients in my orthonormal basis using the following command:

grcalc[Chr[bdn, bdn, bup]]

[Note: "Chr" is GRTensor's name for the connection coefficients (which it calls "Christoffel Symbols"); GRTensor uses a different convention from mine (and MTW's) for the ordering of indices on the connection coefficients: it puts the up index last instead of first, i.e. it permutes the indices leftward by one slot.  The notation "bdn" means the down (covariant) index in the non-coordinate basis ("b"); "bup" means the up (contravariant) index in the non-coordinate basis.  I print out the connection coefficients for the non-coordinate basis with the command

grdisplay[Chr[bdn, bdn, bup]]

[Note: These agree with Eqs. (XXXXX) in Chapter 23.]

Compute and Display Connection Coefficients in Coordinate Basis

GRTensor denotes the connectin coefficients in the coordinate basis by Chr[dn,dn,up]  (i.e. the same as in the non-coordinate basis, but with the "b" omitted from bdn,bdn,bup).  I compute them with the following command:

grcalc[Chr[dn, dn, up]]

I then print them out:

grdisplay[Chr[dn, dn, up]]