## Sunday, 17 February 2019

### The Levi-Civita Symbol

The Levi-Civita symbol, which is not a tensor, is defined as
\begin{align}
{\widetilde{\epsilon }}_{{\mu }_1{\mu }_2\dots {\mu }_n}=\left\{ \begin{array}{ll}
+1 & \mathrm{if\ }{\mu }_1{\mu }_2\dots {\mu }_n\mathrm{\ is\ an\ even\ permitation\ of}\ 01..(n-1)\  \\
-1 & \mathrm{if\ }{\mu }_1{\mu }_2\dots {\mu }_n\mathrm{\ is\ an\ odd\ permitation\ of}\ 01..\left(n-1\right) \\
0 & \mathrm{otherwise} \end{array}
\right. & \phantom {10000}(1) \\
\end{align}Instead of $\widetilde{\epsilon }$ it is also often written as $\widehat{\varepsilon }$, which is what I usually do.

We usually only need it in three or four dimensions so it becomes much simpler:
\begin{align}
{\widehat{\varepsilon }}_{\alpha \beta \gamma \delta }=\left\{ \begin{array}{ll}
+1 & \mathrm{if\ }\alpha \beta \gamma \delta \mathrm{\ is\ an\ even\ permitation\ of}\ 0123\  \\
-1 & \mathrm{if\ }\alpha \beta \gamma \delta \mathrm{\ is\ an\ odd\ permitation\ of}\ 0123 \\
0 & \mathrm{otherwise} \end{array}
\right. & \phantom {10000}(2) \\
\end{align}or
\begin{align}
{\widehat{\varepsilon }}_{ijk}=\left\{ \begin{array}{ll}
+1 & \mathrm{if\ }\alpha \beta \gamma \delta \mathrm{\ is\ an\ even\ permitation\ of}\ 123\  \\
-1 & \mathrm{if\ }\alpha \beta \gamma \delta \mathrm{\ is\ an\ odd\ permitation\ of}\ 123 \\
0 & \mathrm{otherwise} \end{array}
\right. & \phantom {10000}(3) \\
\end{align}One simple thing is that if any two of the indices on $\widehat{\varepsilon }$ are the same, it vanishes.

Even in four dimensions it is fairly easy to calculate, for example
\begin{align}
{\widehat{\varepsilon }}_{1023}=-{\widehat{\varepsilon }}_{0123}=-1 & \phantom {10000}(4) \\
\end{align}It's easy to jot down the indices and determine the sign by walking indices in one direction or another. Here is an example from my real sad life

## Thursday, 14 February 2019

### Lorentz transformation for velocity

There's an equation on Wikipedia for the Lorentz transformation for velocity at
https://en.wikipedia.org/wiki/Lorentz_transformation#Transformation_of_velocities
which states
\begin{align} \large
{\boldsymbol{\mathrm{u}}}^{\boldsymbol{\mathrm{{'}}}}\boldsymbol{\mathrm{=}}\frac{\mathrm{1}}{\mathrm{1}\boldsymbol{\mathrm{-}}\frac{\boldsymbol{\mathrm{u}}\boldsymbol{\mathrm{\cdot }}\boldsymbol{\mathrm{v}}}{c^{\boldsymbol{\mathrm{2}}}}}\left[\frac{\boldsymbol{\mathrm{u}}}{{\gamma }_{\mathrm{v}}}\boldsymbol{\mathrm{-}}\boldsymbol{\mathrm{v}}\boldsymbol{\mathrm{+}}\frac{1}{c^2}\frac{{\gamma }_{\mathrm{v}}}{{\gamma }_{\mathrm{v}}+1}\left(\boldsymbol{\mathrm{u}}\boldsymbol{\mathrm{\cdot }}\boldsymbol{\mathrm{v}}\right)\boldsymbol{\mathrm{v}}\right]& \phantom {10000}(1)  \\
\end{align}
where the coordinate velocities and Lorentz factor are
\begin{align} \large
\boldsymbol{\mathrm{u}}=\frac{d\boldsymbol{\mathrm{r}}}{dt}\ ,\ \ \ {\boldsymbol{\mathrm{u}}}^{\boldsymbol{\mathrm{{'}}}}=\frac{d{\boldsymbol{\mathrm{r}}}^{\boldsymbol{\mathrm{{'}}}}}{dt^{'}}\ \ ,\ \ \ \ {\gamma }_{\mathrm{v}}=\frac{1}{\sqrt{1-\frac{\boldsymbol{\mathrm{v}}\boldsymbol{\mathrm{\cdot }}\boldsymbol{\mathrm{v}}}{c^2}}} & \phantom {10000}(2) \\
\end{align}
$\boldsymbol{\mathrm{v}}$ is the relative velocity of the primed frame of reference. Instead of (1), it is sometimes useful to have the equation
\begin{align} \large
{\boldsymbol{\mathrm{u}}}^{\boldsymbol{\mathrm{{'}}}}\boldsymbol{\mathrm{=}}\frac{\mathrm{1}}{\mathrm{1}\boldsymbol{\mathrm{-}}\frac{\boldsymbol{\mathrm{u}}\boldsymbol{\mathrm{\cdot }}\boldsymbol{\mathrm{v}}}{c^{\boldsymbol{\mathrm{2}}}}}\left[\frac{\boldsymbol{\mathrm{u}}}{{\gamma }_{\mathrm{v}}}\boldsymbol{\mathrm{-}}\boldsymbol{\mathrm{v}}\boldsymbol{\mathrm{+}}\frac{1}{v^2}\left(1-\frac{1}{{\gamma }_{\mathrm{v}}}\right)\left(\boldsymbol{\mathrm{u}}\boldsymbol{\mathrm{\cdot }}\boldsymbol{\mathrm{v}}\right)\boldsymbol{\mathrm{v}}\right] & \phantom {10000}(3) \\
\end{align}
where $v^2=\boldsymbol{\mathrm{v}}\boldsymbol{\mathrm{\cdot }}\boldsymbol{\mathrm{v}}$.
This form of the equation was useful in the first exercise in Sean M Carroll's Spacetime and Geometry : An Introduction to General Relativity. To get it we just have to show that
\begin{align} \large
\frac{1}{c^2}\frac{{\gamma }_{\mathrm{v}}}{{\gamma }_{\mathrm{v}}+1}=\frac{1}{v^2}\left(1-\frac{1}{{\gamma }_{\mathrm{v}}}\right) & \phantom {10000}(4) \\
\end{align}
We use $\gamma$ instead of ${\gamma }_{\nu }$ because have terms like ${\gamma }^2$ where the 2 is an exponent.
\begin{align} \large
\frac{1}{c^2}\frac{\gamma }{\gamma +1} & =\frac{1}{c^2}\frac{1}{\gamma +1}\left(\frac{{\gamma }^2}{\gamma }\right)=\frac{1}{c^2}\frac{1}{\gamma +1}\left(\frac{\frac{1}{1-{v^2}/{c^2}}}{\gamma }\right) & \phantom {10000}(6) \\
& =\frac{1}{c^2}\frac{1}{\gamma +1}\left(\frac{\left[\frac{1-1+{v^2}/{c^2}}{1-{v^2}/{c^2}}\right]c^2}{\gamma v^2}\right) & \phantom {10000}(7) \\
& =\frac{1}{c^2}\frac{1}{\gamma +1}\left(\frac{\left[\frac{1}{1-{v^2}/{c^2}}-1\right]c^2}{\gamma v^2}\right) & \phantom {10000}(8) \\
& =\frac{1}{c^2}\frac{1}{\gamma +1}\left(\frac{\left[{\gamma }^2-1\right]c^2}{\gamma v^2}\right) & \phantom {10000}(9) \\
& =\frac{1}{c^2}\frac{1}{\gamma +1}\left(\frac{\left[\gamma +1\right]\left[\gamma -1\right]c^2}{\gamma v^2}\right) & \phantom {10000}(10) \\
& =\frac{\gamma -1}{\gamma v^2} & \phantom {10000}(11) \\
\therefore \frac{1}{c^2}\frac{\gamma }{\gamma +1} & =\frac{1}{v^2}\left(1-\frac{1}{\gamma }\right) & \phantom {10000}(12) \\
\end{align}
QED
I tried to post this on the Wikimedia page, but it was not allowed :-(
This proof is also available as a pdf here.

## Wednesday, 6 February 2019

### The second exterior derivative always vanishes

We investigate the claim that second exterior derivative of any form A always vanishes:
$$\mathrm{d}(\mathrm{d}A)\mathrm{=0}$$This is Carroll's equation (2.80). He then tells us that this is due to the definition of the exterior derivative and the fact that partial derivatives commute, ${\partial }_{\alpha }{\partial }_{\beta }={\partial }_{\beta }{\partial }_{\alpha }$. From the definition we get
$$\large\mathrm{d(dA)}=\left(p+1\right)p{\partial }_{[{\mu }_1}{\partial }_{[{\mu }_2}A_{{\mu }_3\dots {\mu }_{p+1}]]}$$This contains nested antisymmetrisation operators which we met in Exercise 2.08. The expansion of the equation contains $p!\left(p+1\right)!$ terms in total containing permutations of the indices ${\mu }_1{\mu }_2{\mu }_3\dots {\mu }_{p+1}$. If $p$ was $10$ that would be 39,916,800 terms.

First I exercised my permutation skills with $2, 3, 4$ and $n$ indices to get the drift of the proof. I was then able to expand groups of $p+1$ terms of $\mathrm{d}(\mathrm{d}A)$. Each one vanished due to ${\partial }_{\alpha }{\partial }_{\beta }={\partial }_{\beta }{\partial }_{\alpha }$. It did not depend on the antisymmetry of $A$. This is rather like the fact that the wedge product of a 2-form and a 1-form does not depend on the antisymmetry of the 2-form as we discovered in Commentary 2.9 Differential forms.pdf.

We also note that
$$\large A_{[{\mu }_1}B_{[{\mu }_2}C_{{\mu }_3\dots {\mu }_{p+1}]]}=0$$for any rank 1 tensors  $A,B$ and any tensor $C$ and the up/down position of any index in the tensors is immaterial.

Read all 5 pages at Commentary 2.9 Second exterior derivative.pdf.

## Thursday, 31 January 2019

### Commentary 2.9 Hodge star operator - in Euclidean space

 Swapping axes same as reversing an axis.
Carroll introduces Hodge duality and the Hodge star operator. The Hodge star operator is a map from $p$-forms on an $n$-dimensional manifold on to ($n-p)$ forms on the manifold. Thus: (his equation 2.82)
\begin{align}\large
{\left(*A\right)}_{{\mu }_1\dots {\mu }_{n-p}}=\frac{1}{p!}{\epsilon }^{{\nu }_1\dots {\nu }_p}_{\ \ \ \ \ \ \ \ \ \ \ \ \ \ {\mu }_1\dots {\mu }_{n-p}}A_{{\nu }_1\dots {\nu }_p} & \phantom {10000}(1) \\
\end{align}
which maps $A$ to "$A$ dual".

We have also used the Levi-Civita tensor which is, as the name suggests, a tensor not a mere number, defined as (Carroll's 2.69)
\begin{align}\large
{\epsilon }_{{\mu }_1{\mu }_2\dots {\mu }_n}=\sqrt{\left|g\right|}{\widehat{\epsilon }}_{{\mu }_1{\mu }_2\dots {\mu }_n} & \phantom {10000}(2) \\
\end{align}
where  $\widehat{\epsilon }$  is the Levi-Civita number and $g$ (also not a tensor) is the determinant of the metric.

Then at his 2.84 Carroll writes. "In three-dimensional Euclidean space the Hodge dual of the wedge product of two 1-forms gives another 1-form:
\begin{align}
*{\left(U\wedge V\right)}_i={\epsilon }^{\ \ jk}_iU_jV_k & \phantom {10000}(7) \\
\end{align}
(All of the prefactors cancel.) Since 1-forms in Euclidean space are just like vectors, we have a map from two vectors to a single vector. You should convince yourself that this is just the conventional cross product, and that the appearance of the Levi-Civita tensor explains why the cross product changes sign under parity (interchange of two coordinates or equivalently basis vectors.)"

Proving (7) itself was quite hard and the first step was to prove that the Levi-Civita tensor is completely antisymmetric, even when indices are up and down. Carroll had not mentioned this - he probably thought it was obvious. It was vital to the proof which followed with some tricky index swapping. The prefactors cancelling was easy.

The next part to show that (7) was the same as the cross product was very easy, including showing the dependence on the parity of the coordinate system which involves a lady flying over the north pole (diagram above) and the vexed question of fingering or screwing.

Read all four pages and 25 beautifully numbered equations in
Commentary 2.9 Hodge star operator - in Euclidean space.pdf

## Sunday, 27 January 2019

### GrindEQ, MS-Word macros for equations and more

I have spent a couple of weeks enhancing my equation handling so that I fully mastered equation numbers, and, using GrindEQ, I could fairly easily get from an MS-Word document containing equations to publishing the equations on this blogger blog or on physics forums. This is an update of older posts in Tools, here and here. I will recap and add in new stuff.

This post has three main sections
1) Equations in MS-Word
2) Converting GrindEQ To Web
3) Getting the macros

## 1) Equations in MS-Word

I have been copying and pasting tables and equations in MS-Word for far too long. At last I have written some word macros to speed things up, so I can more easily produce correctly aligned equations like
 Fig 1: Aligning equation numbers neatly using 2 x 1 tables
and
 Fig 2: LHS of equations unchanged and aligning equation numbers
So I now have a "Quick access toolbar" like this

After the AB icon, they have the following effects
1. Select table
2. Add bars on table
3. Remove bars from table
4. Make table a box.
5. ($\pi$) Insert left justified equation (font size 12). Macro: InsertEquationInLine
6. Insert unbarred 2 x 1 table with centred justified equation in column 1, (nn) in column 2 (Fig 1). Macro: EquationTable2
7. Insert unbarred 3 x 1 with right justified equation in column 1, left justified equation in column 2 and (nn) in column 3 (Fig 2) Macro: EquationTable3
The first four are very useful for quickly sorting problems with tables and tidying them. They are all linked directly to MS-Word commands. 5-7 are linked to the macros. The equation number (nn) is one bigger than the last one up the document. The one line tables are inserted according to customary MS-Word rules. There are three constants in the macros which may be adjusted to suit your taste:
• EquationFontSize - default 12 points
• TableHeight - height of new equation rows in cm, default 1.29
• EquationColumnWidth - column width in cm of equation number column, default 1.38
There are two other macros:

### aaRenumberEquations

Obviously after a bit of copying and pasting or writing things out of order equation numbers can become a mess. For this we have the aaRenumberEquations macro which just renumbers all the equations from 1-n. It also adjusts all the references to said equations. Equation numbers such as a, b, b123,  2.5 will be renumbered.

I have tested it on the .docx which produced Commentary 1.1 Tensors matrices and indexes.pdf . It contains 213 equations numbers and 154 references to them. It took 112 seconds. The macro estimates the time that will be taken at the beginning (92 seconds in this case) and gives suitable warnings if it is more than 40 seconds. Clearly the overall time will depend on the machine.

#### aaRenumberEquations detects two kinds of error:

1) There is a reference to an equation that does not exist and the reference number would become a new equation number. In this case you get an error like
Equation (4) is referenced. It does not exist.
2) Equations are numbered with the same number twice or more and that number is used as an equation reference. (It does not matter if duplicate equation numbers are used but they are not referenced). In this case you get an error like
Equation (33) is defined 3 times and referenced one or more times.
Progress, and all errors found are displayed in another window.

I do not activate this macro from the Quick access tool bar for obvious reasons. It is activated from the Developer / Macros button which explains the aa in the name. Which brings us to the final macro.

## 2) aConvertGrindEQToWeb

So I paid 49€ for GrindEQ and got to work on converting their peculiar .tex file output into something that was digestible by my blogger blog and Physics Forums (PF). It took about eight days which was somewhat longer than I expected.