Monday 30 December 2019

Exercise 3.14 Killing vectors on two-sphere

Question

Consider the three Killing vectors of the two-sphere, (3.188). Show that their commutators satisfy the following algebra:
\begin{align}
\left[R,S\right]=T&\phantom {10000}(1)\nonumber\\
\left[S,T\right]=R&\phantom {10000}(2)\nonumber\\
\left[T,R\right]=S&\phantom {10000}(3)\nonumber
\end{align}

Answer

The three Killing vectors at 3.188 were
\begin{align}
R&=\partial_\phi&\phantom {10000}(4)\nonumber\\
S&=\cos{\phi}\partial_\theta-\cot{\theta}\sin{\phi}\partial_\phi&\phantom {10000}(5)\nonumber\\
T&=-\sin{\phi}\partial_\theta-\cot{\theta}\cos{\phi}\partial_\phi&\phantom {10000}(6)\nonumber
\end{align}It is easy to prove the algebra as long as we remember that the ##\partial_\theta,\partial_\phi## are just the basis vectors and Carroll's 2.23 that ##\left[X,Y\right]^\mu=X^\lambda\partial_\lambda Y^\mu-Y^\lambda\partial_\lambda X^\mu## which we proved back in exercise 2.04. So first we could write (4),(5),(6) as ##R=\left(0,1\right),\ S=\left(\cos{\phi},-\cot{\theta}\sin{\phi}\right),\ T=\left(-\sin{\phi},-\cot{\theta}\cos{\phi}\right)##.

What is more difficult to understand is what does this neat algebra mean? A common way to show a commutator (which Carroll uses when introducing the Riemann tensor) is thus

The commutator ##\left[R,S\right]## is the difference between doing ##R## then ##S## and ##S## then ##R##. So the algebra that the Killing vectors satisfy corresponds to this geometry:

##R## has always been shown as a unit vector in increasing ##\phi## direction, ##T,S## are more flexible. I'm not sure how this helps.

The proof is given at Ex 3.14 Killing vectors on two-sphere.pdf (2 pages)

Tuesday 24 December 2019

Review chapter 3

Before we start I have again found a very important paragraph, it is the last in section 3.2 and describes how we have got from the beginning to here. The beginning was the concept of a set which became a manifold and we ended up with metrics and covariant derivatives!

After nearly getting to the end of chapter 3 I realised that my ideas about covariant derivatives needed refinement and that I did not really understand parallel transport. With the former it would seem that metric compatibility, ##\nabla_\mu g_{\lambda\nu}=0##, arises out of the Leibnitz rule and the demand that the covariant derivative is a tensor and is not an 'additional property' - with the caveat that the manifold in question has a metric with the usual properties. On the latter I was still hazy until I explored further in this review.

I still don't think I have mastered every detail of this chapter to section 8 on Killing vectors but one thing is clear: If you have a tensor field ##T\left(x^\mu\right)## which you can express in terms of coordinates ##x^\mu## and we consider two points ##x^\alpha,x^\beta## then if you parallel transport the tensor from ##x^\alpha## along a geodesic to ##x^\beta## and call it ##T\prime\left(x^\beta\right)## there, then in all likelihood ##T\prime\left(x^\beta\right)\neq T\left(x^\beta\right)## and in some sense at least ##T^\prime\left(x^\beta\right)=T\left(x^\alpha\right)##. I think. Equation (20) in the document is saying that for a vector.

The rest of chapter 3 was straightforward and finally we met the geodesic deviation equation $$
A^\mu=\frac{D^2}{dt^2}S^\mu=R_{\ \ \nu\sigma\rho}^\mu T^\nu T^\rho S^\sigma
$$##A^\mu## is the "relative acceleration of (neighbouring) geodesics", ##S^\mu## is a vector orthogonal to a geodesic (pointing towards its neighbour) and ##T^\mu## is a vector tangent to the geodesic. The equation expresses the idea that the acceleration between two neighbouring geodesics is proportional to the curvature and, physically, it is the manifestation of gravitational tidal forces.

The six page document repeats the above and reviews covariant derivatives, parallel transport and geodesics as shown in the video, Riemann and Killing. It's at Commentary 3 Review chapter 3.pdf.

Thursday 5 December 2019

Exercise 3.08 Vital statistics of a 3-sphere

Question
The metric for the 3-sphere in coordinates ##x^\mu=##  ##\left(\psi,\theta,\phi\right)## is $$
{ds}^2={d\psi}^2+\sin^2{\psi}\left({d\theta}^2+\sin^2{\theta}{d\phi}^2\right)
$$(a) Calculate the Christoffel connection coefficients. Use whatever method you like, but it is good practice to get the connection coefficients by varying the integral (3.49)

(b) Calculate the Riemann tensor ##R_{\ \ \ \sigma\mu\nu}^\rho## , Ricci tensor ##R_{\mu\nu}## and Ricci scalar ## R##.

(c) Show that (3.191) is obeyed by this metric, confirming that the 3-sphere is a maximally symmetric space (as you might expect.) 3.191 was$$
R_{\rho\sigma\mu\nu}=\frac{R}{n\left(n-1\right)}\left(g_{\rho\mu}g_{\sigma\nu}-g_{\rho\nu}g_{\sigma\mu}\right)
$$Calculating the Christoffel coefficients was easy because I could use the code I had written before. I did not take the advice "get good practice by varying the integral"! I forgot to use the result of exercise 3.3! Grrr. The Riemann tensor was gruelling. It has 81 components but in this case there are really only three which are independent and each of them generate only three more by index symmetries (as shown in the picture). However, every one of the 81 needs checking. We also notice that each component is ± a metric component and wonder if there is some relationship like the relation between these components similar to exercise 3.3. Perhaps a future challenge! The Ricci bits are almost trivial. For (c) I was able to write a simple bit of code to compare all 81 equations. It did the job.

Answers

Note:
A 1-sphere is a circle - the set of points in ##\mathbf{R}^2## at an equal distance from the origin.
A 2-sphere is the surface of a sphere - the set of points in ##\mathbf{R}^3## at an equal distance from the origin.
A 3-sphere is the set of points in ##\mathbf{R}^4## at an equal distance from the origin.

(a) Christoffel connection coefficients
\begin{align}
\Gamma_{\theta\theta}^\psi&=-\sin{\psi}\cos{\psi}&\phantom {10000}(5)\nonumber\\
\Gamma_{\phi\phi}^\psi&=-\sin{\psi}\cos{\psi}\sin^2{\theta}&\phantom {10000}(6)\nonumber\\
\Gamma_{\psi\theta}^\theta=\Gamma_{\theta\psi}^\theta&=\cot{\psi}&\phantom {10000}(7)\nonumber\\
\Gamma_{\phi\phi}^\theta&=-\sin{\theta}\cos{\theta}&\phantom {10000}(8)\nonumber\\
\Gamma_{\psi\phi}^\phi=\Gamma_{\phi\psi}^\phi&=\cot{\psi}&\phantom {10000}(9)\nonumber\\
\Gamma_{\theta\phi}^\phi=\Gamma_{\phi\theta}^\phi&=\cot{\theta}&\phantom {10000}(10)\nonumber
\end{align}(b) Riemann tensor components are
\begin{align}
R_{\ \ \ \theta\psi\theta}^\psi&=\sin^2{\psi}&\phantom {10000}(13)\nonumber\\
R_{\ \ \ \theta\theta\psi}^\psi&=-\sin^2{\psi}&\phantom {10000}(14)\nonumber\\
{R}_{\ \ \ {\phi\psi\phi}}^{\psi}&=\sin^2{\psi}\sin^2{\theta}&\phantom {10000}(15)\nonumber\\
R_{\ \ \ \phi\phi\psi}^\psi&=-\sin^2{\psi}\sin^2{\theta}&\phantom {10000}(16)\nonumber\\
R_{\ \ \ \psi\psi\theta}^\theta&=-1&\phantom {10000}(17)\nonumber\\
R_{\ \ \ \psi\theta\psi}^\theta&=1&\phantom {10000}(18)\nonumber\\
R_{\ \ \ \phi\theta\phi}^\theta&=\sin^2{\psi}\sin^2{\theta}&\phantom {10000}(19)\nonumber\\
R_{\ \ \ \phi\phi\theta}^\theta&=-\sin^2{\psi}\sin^2{\theta}&\phantom {10000}(20)\nonumber\\
R_{\ \ \ \psi\psi\phi}^\phi&=-1&\phantom {10000}(21)\nonumber\\
R_{\ \ \ \psi\phi\psi}^\phi&=1&\phantom {10000}(22)\nonumber\\
R_{\ \ \ \theta\theta\phi}^\phi&=-\sin^2{\psi}&\phantom {10000}(23)\nonumber\\
R_{\ \ \ \theta\phi\theta}^\phi&=\sin^2{\psi}&\phantom {10000}(24)\nonumber
\end{align}The Ricci tensor is twice the metric!
\begin{align}
R_{\mu\nu}=2g_{\mu\nu}&\phantom {10000}(35)\nonumber
\end{align}The Ricci scalar is 6

(c) was solved by VBA
Complete answer with more links in Ex 3.08 Vital statistics of a 3-sphere.pdf

Monday 2 December 2019

Zilch - How to play and probabilities

Zilch is a parlour game introduced to my family by Camilla who learnt it on her honeymoon with David from a man called Bali Bill. There are variations on the rules which we will not further discuss.

How to play

Start

The game is played with six ordinary dice by two to six people. Six is quite a lot and it usually gets out of hand with more. One of the players must be chosen as the scorer.

Each player takes it in turn to play and it is decided who starts by each player throwing just one dice and seeing who gets the highest number. The highest number starts. If two or more players get the same highest number, those players throw again until a starter is found. The game proceeds with the starter making a play. Once they have finished the next player on the left plays and so it goes round and round. It is important to note that every player gets the same number of plays.

In order to start scoring points a player must make 500 points in their first scoring play.

Middle: Plays, scoring

→ When a player plays they start by throwing all six dice.

⇒ Whenever a player throws (any number of dice) there are two possible outcomes:
1) The thrown dice get no points. That is Zilch. Their play ends, Z for Zilch is written against their score. They lose any score they made that play. The next player plays.
2) The dice thrown score some points. The player may then stop and their accumulated total for that play is added to their score; the next player plays. Or the player keeps some of the scoring dice and throws the remainder again. Often there is no choice of how many dice to keep.  The total scored so far is accumulated for that play. Now go back to ⇒ (with less dice to throw).

On step 2 above their may be no dice left. This is excellent. The player may start again with all six dice and continue to accumulate points for that play. (Go back to →).

Since a player must get a score of 500 or more in one play to get into the game they must throw relentlessly until that happens. This can cause numerous zilches at the start of the game.

If a player gets four zilches in a row 500 is deducted off their score. Subsequent consecutive zilches incur the same penalty of -500. With bad luck, it is quite possible to go seriously negative at the start of the game. I have seen -5000 and the player involved ended the whole game on a record breaking zero.

Scoring

You might be wondering how you do score points in this game. Here's the answer:



Thrown dice include
Points scored

·        One 1
100 (and two 1s scores 200 points)

·        One 5
50

·        Three of a kind
100×N where N is the number on the dice. So three 4s scores 400 points. But …

·        Three 1s
1000 (not 100 which would be very silly)

·        Three pairs
1000

·        A run (123456)
1000

Clearly throws including the last three are very desirable as are three 6s, three 5s and two sets of three of a kind.

Examples

You may want to cover up the answers to test yourself! They are written quite faintly on the right.

Thrown dice

Maximum score
Reason
235643

50
One 5
143575

200
One 1 and two 5s
321211

1000
Three 1s
542444

450
Three 4s =400 + one 5
255552

1000
Three pairs
231

100
One 1
364632

0=Z=zilch
Nothing scores
51

150
One 1 and one 5
532641

1000
A run
434334

700
Three 4s + three 3s
23226

200
Three 2s
131113

1100
Three 1s +one 1

Some of the examples are deliberately tricky, but it is easy to make an error in the excitement of the game. For example a throw like 255552 might easily be scored as 550 (for three 5s and the singleton 5). It is also quite easy to not see three pairs or a run. The last example, 131113, is interesting because one could also take 1000 points for the three pairs and then throw all six dice again. This is normally the better strategy.

When less than six dice are thrown, a run or three pairs are impossible.  When only one or two dice are thrown, three of a kind or three 1s are also impossible.

The dice that were previously thrown, whose score is 'in the bank', have no effect on the score of the thrown dice.

The scores should be laid out as shown to the right. There are four players Alice, Bob, Doris and Chris. Alice was the starter, chosen as described above, so her score is in the first column. The players were not sitting in alphabetical order round the table. She is not doing well, she has scored zilch five times in a row. Bob was next. He scored 700 in his first play, zilch in his second then 200, 800. Doris 1000, 200, Z, 500. Scores for each play are not recorded. It is easy to tell who must play last because the scores are laid out so neatly.
  
A
B
D
C
Z
700
1000
Z
Z
Z
Z
900
1200
Z
1300
1900
-500
1700
1700
3000
-1000








   

Here is an example of Alice's first play: She threw the six dice and got 146523. She kept the 1 and the 5 (worth 150) and threw the other four dice again. With those she got four 2s. She kept three of those bringing her total on that play to 350. She has one dice left and needs 150 points to get into the game with 500. She throws it and it's a 1! She now has 450 and can throw all six again. But then she threw 364632 which is no points so she lost all her score that play and got Zilch. On Alice's fifth play she got zilch again so another 500 was deducted.

Alice must throw more than 500 in one play to get going on the right direction. If she got exactly 1000 in her sixth play 0 not Z would be put in her score. Z would be wrong and confusing.

Doris threw three 1's as her first throw and wisely stopped. 1000 went in her score and she was in the game. Next time round (after all the others got zilch) she threw 153562 and kept the score of 200. She probably would have been better to keep the 1 and throw five dice again.

End

As stated above every player gets the same number of plays. The game ends when a player's score gets to 10,000 or more. We'll call that person Bob. When that happens any other players who have not had as many plays as Bob get one last chance to equal or overtake Bob. So that's Doris and Chris in our example. If Doris succeeded she would be declared the winner (unless Chris overtook her on the last play of the game.)

Tactics and Etiquette

  • If in a throw any dice fall off the table or are cocked (leaning at an angle due to other dice or some other obstacle) all the thrown dice must be thrown again.
  • It's important not to get zilch in a play but also important to get a decent score. Therein lies the tension in each play and the judgement required.
  • After any throw is made, nobody should touch the dice until a few players (particularly the scorer) have seen them all. Moving them around may be considered cheating. Peter ✠ used to wrap his arms around his thrown dice so only he could see them. This was banned.
  • It may be best not to comment after a throw is made. The player may fail to spot a good score. There is no need to tell them (until it's too late). On the other hand you may innocently call a run a 100 and see if the player falls for your trap. Camilla says this is unsporting.
  • Consider the scorer. They not only have to play but they have to add up everybody else's score. In particular do not start a new play until the scorer has written down the score from the last play.
  • If you’re in Bali and Chris wins, for the next game someone will make him go and get the next round of drinks. While he’s away from the table they’ll move to sit in his place because they believe the seat is affecting his luck – and they want it!
  • Cheating: It is surprisingly easy to cheat if all the players are discussing the latest gossip or otherwise entertained. A cheat may slyly turn over a dice as they are 'rearranging' a throw. If all the other players are really being so inattentive it serves them right. Be warned, be attentive and devise a punishment if a cheater persists.

The Zilch Odds Table

We all know that the odds of getting a 1 with one dice is 1 in 6 = 1/6 = 17%. What are the odds (the probability) of getting a 1 with six dice? They aren't six times the odds of getting a 1 with one dice. That would be 100% - a dead cert. Here is a little table with some useful probabilities.

Zilch Odds Table
Throwing dice
Probability of
1 or 5

zilch

three 1s
three of a kind
three pairs

run
6
91%
2.5%
6%
36%
5%
1.5%
5
87%
8.4%
4%
21%
0
0
4
80%
16%
2%
10%
0
0
3
70%
27%
.5%
3%
0
0
2
56%
44%
0
0
0
0
1
33%
67%
0
0
0
0

Notes:
1) Does not help much with calculating the odds of getting over 2000 in a play.
2) Not guaranteed correct.
3) These are all calculated in zilch (Click Read more) except for the first three zilch odds which were done with a simulator. All the others were checked by said simulator which gave the same answer.

By George, November 2019 with thanks to David and Camilla who checked this for me (and also told me that the rules I had been using were wrong).

Thursday 21 November 2019

Success at killing vectors

With help from Desmos
I had more success at killing vectors in the second part of section 3.8. We were asked to prove that a linear combination of Killing vectors with constant coefficients is still a Killing vector and also show that the commutator of two Killing vector fields is a Killing vector field. The first was indeed trivial as Carroll promised. The second was not. The problem is to show that, when ## A,B## are Killing vectors (##\nabla_\nu A_\lambda+\nabla_\lambda A_\nu=0## and ##\nabla_\nu B_\lambda+\nabla_\lambda B_\nu=0##) that, $$
\nabla_\nu\left[A,B\right]_\lambda+\nabla_\lambda\left[A,B\right]_\nu=0
$$The first problem was that I only knew (from way back) that the commutator can be expressed as $$
\left[A,B\right]^\lambda=A^\rho\partial_\rho B^\lambda-B^\rho\partial_\rho A^\lambda
$$which is not much use in this case. But it was easy to get to these two$$
\left[A,B\right]^\lambda=A^\rho\nabla_\rho B^\lambda-B^\rho\nabla_\rho A^\lambda
$$$$
\left[A,B\right]_\sigma=A^\rho\nabla_\rho B_\sigma-B^\rho\nabla_\rho A_\sigma
$$which are much better. I also needed a covariant form of the Riemann tensor which is$$
R_{\ \ \sigma\nu\mu}^\tau X_\tau=\left[\nabla_\mu,\nabla_\nu\right]X_\sigma
$$They all earned a place in Important Equations for General Relativity.

It was another 13 equations to get to the desired conclusion with evil side-tracks and errors on the way. I have not included those in the answer.

The answer does include much index juggling, including use of antisymmetries to really throw the Riemann tensor indices about. That was the final breakthrough. It's at
Commentary 3.8 Symmetries and Killing vectors.pdf (pages 4-6).

Friday 15 November 2019

Exercise 3.12 Derivatives of Killing vectors

Question

Show that any Killing vector ##K^\mu## satisfies the relations mentioned in the text:
\begin{align}
\nabla_\mu\nabla_\sigma K^\rho=R_{\ \ \ \sigma\mu\nu}^\rho K^\nu&\phantom {10000}(1)\nonumber\\
K^\lambda\nabla_\lambda R=0&\phantom {10000}(2)\nonumber
\end{align}

Answers

Wilhelm Karl Joseph Killing 1847-1923
The text gives a few clues about how to get from (1) to (2). What we know about Killing vectors is that they satisfy Killing's equation
\begin{align}
\nabla_{(\mu}K_{\nu)}\equiv\frac{1}{2}\left(\nabla_\mu K_\nu+\nabla_\nu K_\mu\right)=0&\phantom {10000}(3)\nonumber\\
\Rightarrow\nabla_\mu K_\nu=-\nabla_\nu K_\mu&\phantom {10000}(4)\nonumber
\end{align}##\nabla_\mu K_\nu## is antisymmetric.

The Killing vectors in (1) and (2) are given in contravariant form.
The Riemann tensor is antisymmetric* in its last two indices like (7) and has other interesting symmetries, not all independent, e.g. (6) comes form (7) and (8):
\begin{align}
&R_{\rho\sigma\mu\nu}=g_{\tau\rho}R_{\ \ \ \sigma\nu\mu}^\tau&\phantom {10000}(5)\nonumber\\
\text{Swap first two }~~~~~~~~~
&R_{\rho\sigma\mu\nu}=-R_{\sigma\rho\mu\nu}&\phantom {10000}(6)\nonumber\\
\text{Swap last two  }~~~~~~~~~
&R_{\rho\sigma\mu\nu}=-R_{\rho\sigma\nu\mu}&\phantom {10000}(7)\nonumber\\
\text{Swap first and last pair  }~~~~~~~~~
&R_{\rho\sigma\mu\nu}=R_{\mu\nu\rho\sigma}&\phantom {10000}(8)\nonumber\\
\text{Rotate last three  }~~~~~~~~~
&R_{\rho\sigma\mu\nu}+R_{\rho\mu\nu\sigma}+R_{\rho\nu\sigma\mu}=0&\phantom {10000}(9)\nonumber\\
\text{Permute last three  }~~~~~~~~~
&R_{\rho\left\lceil\sigma\mu\nu\right\rceil}=0&\phantom {10000}(10)\nonumber
\end{align}(6) implies
\begin{align}
g_{\tau\rho}R_{\ \ \ \sigma\mu\nu}^\tau=-g_{\tau\sigma}R_{\ \ \ \rho\mu\nu}^\tau&\phantom {10000}(11)\nonumber\\
\Rightarrow g^{\lambda\rho}g_{\tau\rho}R_{\ \ \ \sigma\mu\nu}^\tau=-g^{\lambda\rho}g_{\tau\sigma}R_{\ \ \ \rho\mu\nu}^\tau&\phantom {10000}(12)\nonumber\\
\Rightarrow R_{\ \ \ \sigma\mu\nu}^\lambda=-R_{\ \sigma\ \ \rho\mu\nu}^{\ \ \ \ \lambda}&\phantom {10000}(13)\nonumber
\end{align}We surmise that a similar manoeuvre on (7) would get us (14) which was the assertion * above and that (8) would get us (15)
\begin{align}
R_{\ \ \ \sigma\nu\mu}^\tau=-R_{\ \ \ \sigma\mu\nu}^\tau&\phantom {10000}(14)\nonumber\\
R_{\ \ \ \sigma\nu\mu}^\tau=R_{\nu\mu\ \ \ \sigma}^{\ \ \ \ \ \ \tau}&\phantom {10000}(15)\nonumber
\end{align}These might will not be useful, although it might will be better to work with fully covariant Riemann tensors.

As I found out after much effort, it is also important to remember the definition of the Riemann tensor when the connection is torsion free. It measures the difference between taking covariant derivatives of a vector going the two opposite ways round a path (Carroll 3.112)
\begin{align}
\left[\nabla_\rho,\nabla_\sigma\right]X^\mu=R_{\ \ \ \nu\sigma\rho}^\mu X^\nu&\phantom {10000}(16)\nonumber
\end{align}That equation is pretty similar to (1) and then there's (4).

The second part is very simple if you remember that if a Killing vector exists then it is always possible to find a coordinate system where it is one of the basis vectors and the metric will be independent of the coordinate for that basis vector. Carroll stated this after the Killing equation at his 3.174.

I was unable to answer the questions but was guided by a solution I stumbled across on  Semantic Scholar by Professor Alan Guth.

More on my struggles and links to Guth solution at
Ex 3.12 Derivatives of Killing vectors.pdf (4 pages)

Wednesday 6 November 2019

Tensor Calculus with Word VBA macros

Presentation of Word VBA macros for helping with tensor equations!
One of the things you often to do when working in with tensor equations is to expand things like Riemann tensors, covariant derivatives and Christoffel symbols. The expansions are shown below at (1) to (6). They all involve shuffling indices and introducing dummy indices which are used in 'contractions'. These are summations over the dummy index so more like an expansion than a contraction.

The expansions are fiddly and after a while my eyes start to pop out. You can see that they pretty much all turn into Christoffel symbols, the ##\Gamma_{\mu\nu}^\sigma## thing. That in turn can be expressed in terms of the metric and inverse metric: ##g_{\mu\nu}\ ,\ g^{\mu\nu}##. So if you know the metrics you can write out all the Christoffel symbols in terms of coordinates - proper equations. There are only slightly less than ##n^3## of these in ## n## dimensions. There's a reduction to only ##n^2\left(n+1\right)/2## coefficients because ##\Gamma_{\mu\nu}^\sigma=\Gamma_{\mu\nu}^\sigma## (that's called being 'torsion free', more like drudgery free). Even when it's six on a the surface of a sphere, that process finally pops my eyes right out of their sockets and it's all too easy to make a mistake at any stage of the process. And it's  40 Christoffel symbols in the four dimensions of General Relativity.

When I came to Exercise 3.12 on 14 October I had to expand a Riemann tensor again. So I wrote some code to do it. That was quite hard and I decided to do covariant derivatives and Christoffel symbols while I was at it. Then I suffered from mission creep and decided to fully expand those ##n^2\left(n+1\right)/2## coefficients of the Christoffel symbol. There are lots of terms like ##g^{\sigma\lambda}\partial_\mu g_{\lambda\nu}## which very often vanish, it was quite hard to work out which they were and use the information. I had to learn about the structure of MS equations from scratch. That may be the subject of another post. Three weeks slipped by and now I now have this all-singing toolbox:

Button

LxL: Insert inline equation
x: Insert equation on new line
x|(n): Insert numbered equation in new table row
x|x|(n): Inserted two part numbered equation row

Grid: Operations for enhancing tabular equations

Expand: Expand equation containing Riemann, Christoffel and/or covariant derivative
Renumber: Renumber all equations and references
To Web: Prepare document for Web/MathJax in new window

Pick up: Pick up definitions from equations



Write Metrics: Write out (& calculate) picked up metrics
Write ##\Gamma##s: Write out full expansion of Riemann symbols using metrics and coordinates.

The box at the bottom is for information and error messages, when it might beep.



Riemann tensor

\begin{align}
R_{\ \ \ \sigma\mu\nu}^\rho=\partial_\mu\Gamma_{\nu\sigma}^\rho-\partial_\nu\Gamma_{\mu\sigma}^\rho+\Gamma_{\mu\lambda}^\rho\Gamma_{\nu\sigma}^\lambda-\Gamma_{\nu\lambda}^\rho\Gamma_{\mu\sigma}^\lambda&\phantom {10000}(1)\nonumber
\end{align}Covariant derivative
(0,2) tensor
\begin{align}
\nabla_\mu V^{\nu\rho}=\partial_\mu V^{\nu\rho}+\Gamma_{\mu\lambda}^\nu V^{\lambda\rho}+\Gamma_{\mu\lambda}^\rho V^{\nu\lambda}&\phantom {10000}(2)\nonumber
\end{align}vector
\begin{align}
\nabla_\mu V^\nu=\partial_\mu V^\nu+\Gamma_{\mu\lambda}^\nu V^\lambda&\phantom {10000}(3)\nonumber
\end{align}one form
\begin{align}
\nabla_\mu\omega_\nu=\partial_\mu\omega_\nu-\Gamma_{\mu\nu}^\lambda\omega_\lambda&\phantom {10000}(4)\nonumber
\end{align}Other tensor
\begin{align}
\nabla_\mu U_{\ \ \lambda\ \ \kappa}^{\nu\ \rho}=\partial_\mu U_{\ \ \lambda\ \ \kappa}^{\nu\ \rho}+\Gamma_{\mu\sigma}^\nu U_{\ \ \lambda\ \ \kappa}^{\sigma\ \rho}+\Gamma_{\mu\sigma}^\rho U_{\ \ \lambda\ \ \kappa}^{\nu\ \sigma}-\Gamma_{\mu\lambda}^\sigma U_{\ \ \sigma\ \ \kappa}^{\nu\ \rho}-\Gamma_{\mu\kappa}^\sigma U_{\ \ \lambda\ \ \sigma}^{\nu\ \rho}&\phantom {10000}(5)\nonumber
\end{align}Christoffel symbol
\begin{align}
\Gamma_{\mu\nu}^\sigma=\frac{1}{2}g^{\sigma\lambda}\left(\partial_\mu g_{\lambda\nu}+\partial_\nu g_{\mu\lambda}-\partial_\lambda g_{\mu\nu}\right)&\phantom {10000}(6)\nonumber
\end{align} To read more about the macros click Read More.
Macros available at Archive2019-11-06.
Pdf file here: Tensor Calculus.pdf.

Saturday 19 October 2019

VBA error 6219. One small step to the Christoffel symbol

I am trying to write a Word macro to expand the Christoffel symbol automatically. The expansion is simple:$$
\Gamma_{\mu\nu}^\sigma=\frac{1}{2}g^{\sigma\rho}\left(\partial_\mu g_{\nu\rho}+\partial_\nu g_{\rho\mu}-\partial_\rho g_{\mu\nu}\right)
$$One replaces the Christoffel symbol ##\Gamma_{\mu\nu}^\sigma## by a half times the inverse metric ##g^{\sigma\rho}## times the sum of slightly different index combinations of the partial derivative ##\partial_\mu## of the metric ##g_{\nu\rho}##. A new dummy index, ## \rho## in this case, is introduced (it is summed over) and the original indices ## \sigma,\mu,\nu## are placed carefully in the expansion. The Christoffel symbol occurs frequently in General Relativity and once I have done this a few times with different indices my eyes start to pop out, thus the motivation to write a macro to save said eyes.

The macro should be fairly straightforward. We want it to replace something like$$
A\Gamma_{\mu\nu}^\sigma X
$$by$$
A\frac{1}{2}g^{\sigma\rho}\left(\partial_\mu g_{\nu\rho}+\partial_\nu g_{\rho\mu}-\partial_\rho g_{\mu\nu}\right)X
$$An equation is an OMath object which consists of OMathFunction objects. So each of ## A,\Gamma_{\mu\nu}^\sigma,X## in the first equation is an  OMathFunction object. In theory it should be easy to replace the OMathFunction object ##\Gamma_{\mu\nu}^\sigma## by a bunch of new OMathFunction objects ##\frac{1}{2},g^{\sigma\rho},+\ etc##. Dream on!

When you want to add a new OMathFunction object, you need to call Add method of an OMathFunctions object. The OMathFunctions object is the list of OMathFunction objects in the equation. The second parameter of this Add method is the type of new OMathFunction to add. (This not well described in the documentation.) The list of types is here. So the fraction ##\frac{1}{2}## is an wdOMathFunctionFrac, the inverse metric which has superscripts ##g^{\sigma\rho}## is a wdOMathFunctionScrSup and ##+## is a wdOMathFunctionText. You can see all these in the debugger if you have a look at the OMathFunctions object. This Add method crashes with error 6219 if the type parameter is wdOMathFunctionText, so it is very difficult to get the ##+,-## signs into expansion. The only way I could discover was by using
Selection.TypeText ("+")
I could then insert ##g_{\mu\nu}+g^{\mu\nu}## at the selection point in an equation with this code:
Sub ExampleWriteExpression()
    'insertion point should be in equation. Metric + inverse metric inserted
    Dim Equation As OMath
    Dim MathTerm As OMathFunction

    If Selection.OMaths.Count <> 1 Then ExpanderFatalError ("Cursor must be in an equation.")
    Set Equation = Selection.OMaths(1)
    Set MathTerm = Equation.Functions.Add(Selection.Range, wdOMathFunctionScrSub)
    MathTerm.ScrSub.E.Range = "g"
    MathTerm.ScrSub.Sub.Range = ChrW(&H3BC) & ChrW(&H3BD)
    
    Selection.TypeText ("+")
    
'Set MathTerm = Equation.Functions.Add(Selection.Range, wdOMathFunctionText) still gets error

    Set MathTerm = Equation.Functions.Add(Selection.Range, wdOMathFunctionScrSup)
    MathTerm.ScrSup.E.Range = "g"
    MathTerm.ScrSup.Sup.Range = ChrW(&H3BC) & ChrW(&H3BD)
End Sub
There was quite a bit of difficulty in getting the selection in the right place and I kept getting things like$$
\frac{1}{2}g^{\sigma\rho}\left(\partial_\mu g_{\nu\rho}\partial_\nu g_{\rho\mu}\partial_\rho g_{\mu\nu}\right)+-
$$It is necessary align the selection range with the equation range and this is not the simple matter of subtraction that you might expect! It now works  properly and replaces multiple Christoffel symbols in an equation correctly. Click Read more below if you would like a look or copy. Covariant derivatives, Riemann tensors, using, metric and coordinates coming soon!

jpl on msofficeforums corrected me and showed me how to avoid using the Selection which is a bodge. I further refined his technique. It is now very beautiful.😅

Saturday 12 October 2019

Symmetries and Killing vectors

Sean Carroll, my guide and nemesis
I'm now reading section 3.8 on symmetries and Killing vectors. It's not too hard to follow but there are a few stumbling blocks.

After equation 3.161 for the geodesic in terms of 4 momentum ##p^\lambda\nabla_\lambda p^\mu=0##  Carroll says that by metric compatibility we are free to lower the index ## \mu##. Metric compatibility means that ##\nabla_\rho g_{\mu\nu}=\nabla_\rho g^{\mu\nu}=0## so I tried to show that, given that, ##\nabla_\lambda p^\mu=\nabla_\lambda p_\mu##. Here was my first attempt:
Lower the index with the metric, use the Leibnitz rule, use metric compatibility$$
\nabla_\lambda p^\mu=\nabla_\lambda g^{\mu\nu}p_\nu=p_\nu\nabla_\lambda g^{\mu\nu}+g^{\mu\nu}\nabla_\lambda p_\nu=0+\nabla_\lambda p^\mu
$$Then I tried painfully expanding ##\nabla_\lambda g^{\mu\nu}p_\nu## and got the same result. So then I asked on Physics Forums: Why does metric compatibility imply  ##\nabla_\lambda p^\mu=\nabla_\lambda p_\mu##? I got my wrist slapped by martinbn who pointed out that  ##\nabla_\lambda p^\mu=\nabla_\lambda p_\mu## made no sense because there are different types of tensors on each side of the equation. (The ## \mu## is up on one side and down on the other). I was embarrassed😡. 

What Carroll is really saying is that metric compatibility means that$$
\nabla_\lambda p^\mu=0\Rightarrow\nabla_\lambda p_\mu=0
$$which is quite different and easy to show:$$
\nabla_\lambda p^\mu=0
$$$$
\Rightarrow g^{\mu\nu}\nabla_\lambda p_\nu=0
$$$$
\Rightarrow g_{\rho\mu}g^{\mu\nu}\nabla_\lambda p_\nu=0
$$$$
\Rightarrow\delta_\rho^\nu\nabla_\lambda p_\nu=0
$$$$
\Rightarrow\nabla_\lambda p_\rho=0
$$I posted something very like those steps and there was silence which usually means they are correct. The first step uses, ##\nabla_\lambda p^\mu=g^{\mu\nu}\nabla_\lambda p_\nu##, which can be done in several ways
1) ##\nabla_\lambda p^\mu## is a tensor so you can lower (or raise) an index with the metric as usual.
2) ##\nabla_\lambda p^\mu=\nabla_\lambda\left(g^{\mu\nu}p_\nu\right)=p_\nu\nabla_\lambda g^{\mu\nu}+g^{\mu\nu}\nabla_\lambda p_\nu=g^{\mu\nu}\nabla_\lambda p_\nu## as in (1) use the Leibnitz rue and metric compatibility
3) ##\nabla_\lambda p^\mu=\nabla_\lambda\left(g^{\mu\nu}p_\nu\right)=g^{\mu\nu}\nabla_\lambda p_\nu## using Carroll's third rule for covariant derivatives: That they commutes with contractions.

The Leibnitz rule was the second rule of covariant derivatives and I discussed all four in Commentary 3.2 Christoffel Symbol. The third caused angst and another question on PF. I now think that the third rule is just saying that because the covariant derivative is a tensor you can raise and lower indexes on it. 3 and 1 above are really the same. I have suitably amended Commentary 3.2 Christoffel Symbol.

Sometimes I hate Carroll! 

There was also another post on the thread ahead of the first two which referred to a similar question on Stack Exchange. MathematicalPhysicist was asked to show that $$
U^\alpha\nabla_\alpha V^\beta=W^\beta\Rightarrow U^\alpha\nabla_\alpha W_\beta=W_\beta
$$The proof for this is very similar to the above:$$
U^\alpha\nabla_\alpha V^\beta=W^\beta
$$$$
\Rightarrow U^\alpha g^{\beta\gamma}\nabla_\alpha V_\gamma=g^{\beta\gamma}W_\gamma
$$$$
\Rightarrow U^\alpha g_{\mu\beta}g^{\beta\gamma}\nabla_\alpha V_\gamma=g_{\mu\beta}g^{\beta\gamma}W_\gamma
$$$$
\Rightarrow U^\alpha\delta_\mu^\gamma\nabla_\alpha V_\gamma=\delta_\mu^\gamma W_\gamma
$$$$
\Rightarrow U^\alpha\nabla_\alpha V_\mu=W_\mu
$$Once again there are three ways to do the first step. Metric compatibility is not essential.

See Commentary 3.8 Symmetries and Killing vectors.pdf first two pages. Then I run into another problem with Killing.