Wednesday, 10 October 2018

Word Macros for equations

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: LHS of equations unchanged and aligning equation numbers
I also wrote macros to create left / centre / right justified equations using font size 12 instead of 10 which MS always uses and I find too small.

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. Insert left justified equation (font size 12)
  6. Insert unbarred 2 x 1 table with centred justified equation in column 1, (xx) in column 2 (Fig 1)
  7. Insert unbarred 3 x 1 with right justified equation in column 1, (xx) in column 3 (Fig 2)
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. Sadly the equation insertion macros cannot be used twice the table creation macros! Therefore we also need icon 5, π, to manually insert the equation in the middle column of the three column table.

The macros are in WordBasic not VBA which is a bit amateurish, but WordBasic is what the Word macro recorder writes.

If you would like to use these macros click Read more and copy and paste them into the Word Visual Basic editor on the Developer tab.

The version in Read more might be out of date. I am fairly diligent about keeping back up versions here.

Friday, 28 September 2018

Commentary on Appendix A: Mapping S2 and R3

Sometimes I almost despair reading this book. I cannot understand part of it or find a solution. When I do, the feeling of joy is superb. There is much air punching. This is a case in point.

Why am I here?

I'm still thinking about commutators and wanted to understand Appendix B on Diffeomorphisms and Lie Derivatives. Lie (pronounced lee) brackets are the same as commutators. Appendix B starts by saying "we continue the explorations of the previous Appendix", so I was thrown back. Appendix A is fairly comprehensible and there is a good example at the end. I'll restate the first part here:

The problem part 1

Consider the two-sphere embedded in 3, thought of as the locus of points a unit distance from the origin. If we put coordinates θ, ф on S2 (the sphere) and x,y,z on 3, the map  is given by

ψ (θ, ф) = (sinθ cosф, sinθ sinф, cosθ)          (1)

In the book this equation is written as
    ф(θ, ф) = (sinθ cosф, sinθ sinф, cosθ)            (A.11)
ф is used in the equation to mean a map and a coordinate. I will avoid this.

Sticking the sphere into  in this way induces a metric on , which is just the pull-back of the flat-space metric. The simple-minded way to find this is to start with the metric

             ds² = dx² + dy² + dz²                               (1a)

and substitute (1) into this expression yielding a metric dθ² + sin²θ dф² on .

This was not so simple and I struggled with the substitution for days. (1) is easy to show algebraically or geometrically. Getting to the metric in polar coordinates involves various differentiation rules: (trig functions and the product rule), but then they need to be applied to infinitesimals (dx, dθ etc) rather than proper derivatives (dx/dy etc). That aspect was very novel to me.


Along the way I made an interesting observation about writing the matrix for xyα. It is the transpose of the matrix for xyα. I will add this to my up coming opus on Tensors, Matrices and Indexes.

Five pages. You can read it here: Commentary App A Mapping S2 and R3.pdf

It contains a very useful corollary

It contains a very useful corollary on how to get the metric of a non-Cartesian system.
If we can transform non-Cartesian components j into Cartesiani with equations

i = f i (p j)                                                (20)
i = 1..m,   j = 1..n 

Then we can construct the (n x m) pullback operator


Multiplying this by its transpose gives the metric of the non-Cartesian system. 

Of necessity this is a (n x m) x (m x n) = (n x n) matrix, as it must be.

Wednesday, 26 September 2018

What is a commutator?

Wikipedia says: "Conceptually, the Lie bracket [X, Y] is the derivative of Y along the flow generated by X."

A Lie bracket is called a commutator in the book.

Thursday, 6 September 2018

Question: Reductio ad absurdum on commutators?

I am studying Spacetime and Geometry : An Introduction to General Relativity by Sean M Carroll and have a question about commutators of vector fields. A vector field on a manifold can be thought of as differential operator which transforms smooth functions to smooth functions on the manifold. For a vector field X and a function f(xi) we write
X(f) = g, where g is another function. We then define the commutator of two fields X and Y as

[X,Y](f) = X(Y(f)) - Y(X(f)

In the exercise I am working on (2.05), we are asked to find two vector fields whose commutator does not vanish. An important step is to show that if the commutator vanishes for one function f, it vanishes for all functions. This is implied by the question but not proven.

I proved it this way using 'Reductio ad absurdum'. Is this correct?

Our starting point is f  ≠ 0 and [X,Y](f) = 0. We have another function g ≠ 0 and [X,Y](g) ≠ 0.
We already know that commutators are linear (from the previous exercise), so

[X,Y](f + g) = [X,Y](f) + [X,Y](g)
or
[X,Y](f + g) = [X,Y](g)

Therefore f = 0, which breaks our starting assumption, with which there must be some error. The only non trivial possibility is that [X,Y](g) = 0. QED?
The question is at
https://www.physicsforums.com/threads/spacetime-and-geometry-vanishing-commutators.954767/
I then searched for Commutator and found this
Commutator of two vector fields:
https://www.physicsforums.com/threads/commutator-of-two-vector-fields.950661/
One answer contained
"[X,Y]  describes how far the endpoints of a rectangle vary if you go along X followed by Y or the other way around. Commuting vector fields mean the two path end at the same point;"

Perhaps I should have put my question in  the physics / Special and General Relativity forum.

Conformal Cyclic Cosmology (CCC)

An article in New Scientist (here) attracted my attention to Conformal Cyclic Cosmology (CCC) which sounds very interesting. The article presents some evidence for CCC. In the magazine the title was "A glimpse of a previous universe". I have a copy of it.

Thursday, 23 August 2018

Exercise 2.03 2D Torus is a manifold

Question

Show that the two-dimensional torus T2 is a manifold, by explicitly constructing an appropriate atlas. (Not a maximal one, obviously).

Answer

Fig 1: A Torus, with help from Wikipedia

We can define a torus as points in R3 that lie on the surface created by rotating a small circle of radius r round a larger circle of radius R. The larger circle is in the X-Y plane. Any point on the torus can be given by (θ , κ) as shown in Fig 1. There are no limits on θ , κ.

I realised that I could map to infinite cylinders touching the inner and outer edges of the torus and from them to annuli as in Exercise 2.01. No doubt our cunning author had set this trap. Having been on that wild goose chase, I came to a linear map from T2 to the annuli and realised that we can also map from T2 to two open rectangles much as one can map from S1 to R1. Fig 2 shows a section at some θ through our torus. We almost have the two charts UO (Outer) and UI (Inner) we just need to cut them and unroll them to make open rectangles. We cut the outer UO at θ = 0 and the inner UI at θ = -π. If we cut them both at the same θ it would lead to disaster.
Fig 2: Section through torus and rectangular maps.
This is where it gets complicated and we end up with a few maps, so;
Fig 4: Showing the transformations. T2 is exactlUI  ∩ UO. 
We now want to check that the charts obey the strict conditions, as given in the book before Fig 2.13 at the bottom of page 29, to make an atlas from T2 to R2. I have adapted them for the exercise.

1. "The union of the charts UI  , UO is equal to T2; that is, UI  , UO cover T2."
We have two charts UI  , UO; their union manifestly covers T2 by construction.
We could check that there are no cracks in the union by combining the limits on ϕI  , ϕO. We have  -π< θ<2π and -π<κ<2π. That covers T2.

2. "The charts are smoothly sewn together. More precisely, if two charts overlap, UIUO ≠∅, then the map (ϕI ∘ ϕO-1) takes points in ϕO (UIUO  ) ⊂  R2 onto* an open set ϕI (UIUO ) ⊂ R2, and all these maps must be C. The reverse for  (ϕ∘ ϕI-1) also applies.

* We remind ourselves that onto means each point of the target has at least one point of the source mapped onto it.

The first part was easy as shown. The second part was fiddly and you can read the detail and wild goose chase in Ex 2.03 2D Torus is a manifold.pdf. It has helped me greatly to understand manifolds.