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.

Thursday, 10 October 2019

Exercise 3.06 Metric outside Earth

Question

A good approximation to the metric outside the surface of the Earth is provided by$$
{ds}^2=-\left(1+2\Phi\right){dt}^2+\left(1-2\Phi\right){dr}^2+r^2\left({d\theta}^2+\sin^2{\theta}{d\phi}^2\right)
$$where$$
\Phi=-\frac{GM}{r}
$$may be thought of as the familiar Newtonian gravitational potential. Here ## G## is Newton's constant and ## M## is the mass of the Earth. For this problem ## \Phi## may be assumed to be small.
a) Imagine a clock on the surface of the Earth at a distance ##R_1## from the Earth's center, and another clock on a tall building at distance ##R_2## from the Earth's center. Calculate the time elapsed on each clock as a function of the coordinate time ## t##. Which clock moves ticks faster?
b) Solve for a geodesic corresponding to a circular orbit around the equator of the Earth (##\theta=\pi/2## ). What is ## d\phi/dt##?
c) How much proper time elapses while a satellite at radius  ##R_1## (skimming along the surface of the Earth, neglecting air resistance) completes one orbit? You can work to  first order in ## \Phi## if you like. Plug in the actual numbers for the radius of the Earth and so on (don't forget to restore the speed of light) to get an answer in seconds. How does this number compare to the proper time elapsed on the clock stationary on the surface?

Answers

Karl Schwarzschild
Image credit
Apparently the metric given is the Newtonian metric. I learnt how to reinstate the speed of light ## c## and so do real calculations. I was brutally reminded that ##{ds}^2=-{d\tau}^2## where ## \tau## is the proper time and that the proper time is what appears on ideal clocks. I also found the Schwarzschild radius - the radius of the event horizon of a black hole with a given mass. Some time ago I had found two sample solutions which had been left lying around on the internet by careless professors. They have now gone but luckily I had downloaded them before. I found that they were both littered with errors! The worst was probably UCSB's who popped an extra question and got totally the wrong answer for gravitational time dilation on a GPS satellite. Lucky they weren't involved in the construction!  Finally I had a look to see if I  could do anything with elliptical orbits but then decided I had spent enough time on this exercise.

Full answer and bonus questions at Ex 3.06 Metric outside Earth.pdf (16 pages including links to other answers)

Monday, 30 September 2019

The Riemann tensor

I'm now reading section 3.6 about the Riemann tensor which expresses the curvature of a manifold. In component form it is$$
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
$$I want to check some of Carroll's assertions and challenges.

  • Equation 3.111 which he said was very straightforward
  • Prove that the Riemann tensor really is a tensor
  • Showing that the Riemann tensor as a map is the same as its component form

I succeeded on the first and the last. The second sounds odd but what is needed is to use the transformation law for ## \Gamma##, which is not a tensor, and see if the transformed equation gives the proper transformation for the Riemann tensor. Basically tons of stuff needs to cancel. The first step gives this

and the second this (the line numbers on the left refer to the parts from above)

That was 22 terms in total. The green ones were the ones that were wanted. The rest had to vanish. I only succeeded in removing four.

On the way I relearnt a few techniques and so created the tensor tricks section of Important equations. I also learnt how to take a 'second order covariant derivative'. I had failed to spot the example Carroll gave in equation 3.111. It's quite interesting. The problem is to work out ##\nabla_\lambda\left(\nabla_\eta Z^\rho\right)##. If one was doing an ordinary second order derivative one would differentiate the inner part then differentiate the outer part. The reverse happens with a covariant derivative: One must first take the covariant derivative of the inner part and then calculate the covariant derivatives that are left over.
Full details at  Commentary 3.6 Riemann tensor.pdf