Wednesday, 30 September 2020

Very obscure bug in Google Blogger

I use Google Blogger for this blog. I also use MathJax for displaying equations which are in a code called Latex. Google recently introduced major changes to Blogger and it screwed up the equation display. I prepare text for a post in MS-Word so we might have something like this (but replace all £ signs by $signs) ££\chi_\nu\nabla_\mu\chi_\sigma+\chi_\sigma\nabla_\nu\chi_\mu+\chi_\mu\nabla_\sigma\chi_\nu=0 ££ and it should come out like this$$\chi_\nu\nabla_\mu\chi_\sigma+\chi_\sigma\nabla_\nu\chi_\mu+\chi_\mu\nabla_\sigma\chi_\nu=0$$but sadly it now comes out like this $$\chi_\nu\nabla_\mu\chi_\sigma+\chi_\sigma\nabla_\nu\chi_\mu+\chi_\mu\nabla_\sigma\chi_\nu=0$$ which is not what is wanted! To move the Latex code from MS-Word was simply a matter of copying it and pasting it as plane text (Ctrl+Shift+V). In the old version of Blogger linefeeds produced HTML <br/>, in the new version they produce </div><div>, which screws up Mathjax. The old version and the new version of the HTML are shown below (once again, replace all £ signs by$ signs)

££ <br/>\chi_\nu\nabla_\mu\chi_\sigma+\chi_\sigma\nabla_\nu\chi_\mu+\chi_\mu\nabla_\sigma\chi_\nu=0<br/>££

££
</div><div>\chi_\nu\nabla_\mu\chi_\sigma+\chi_\sigma\nabla_\nu\chi_\mu+\chi_\mu\nabla_\sigma\chi_\nu=0 </div><div>££

Solution

1. To begin with I just edited the latex removing linefeeds and reinstating with shift-enter. That replaces  </div><div> by <br/>. You also have to make sure that the text style is Normal not Paragraph. The editor sometimes seems to start in the latter mode.
2. Then I discovered Search replace in HTML editing view. So now I just replace all </div><div> by <br/>.
It's still rather tedious. I wish the lovely people at Google would fix it.

Thursday, 17 September 2020

Curvature in two dimensions

Here we calculate formulas for curvature in two dimensions. Specifically we give coordinates, metrics, Christoffel symbols, Riemann tensors (only twice) and scalar curvature (or Ricci scalar) for ellipsoids, elliptic paraboloids and hyperbolic paraboloids.

 Images from Wikipedia: Ellipsoid , Paraboloid

We also find a general formula for the scalar curvature in two dimensions which only requires one component of the Riemann tensor. On the way we find the formulas to calculate all the other non zero Riemann components from the one. With coordinates $\left(\theta,\phi\right)$ which are naturally used for the ellipsoid, the formula for the scalar curvature is $$R=\frac{2}{g_{\phi\phi}}\left(\partial_\theta\Gamma_{\phi\phi}^\theta-\partial_\phi\Gamma_{\theta\phi}^\theta+\Gamma_{\theta\theta}^\theta\Gamma_{\phi\phi}^\theta+\Gamma_{\theta\phi}^\theta\Gamma_{\phi\phi}^\phi-\Gamma_{\phi\theta}^\theta\Gamma_{\theta\phi}^\theta-\Gamma_{\phi\phi}^\theta\Gamma_{\theta\phi}^\phi\right)$$This is very similar to the formula given at the very end of the Wikipedia article on Gaussian curvature $K$ which is$$K=-\frac{1}{E}\left(\frac{\partial}{\partial u}\Gamma_{12}^2-\frac{\partial}{\partial v}\Gamma_{11}^2+\Gamma_{12}^1\Gamma_{11}^2-\Gamma_{11}^1\Gamma_{12}^2+\Gamma_{12}^2\Gamma_{12}^2-\Gamma_{11}^2\Gamma_{22}^2\right)$$The article also reveals that the scalar curvature is twice the Gaussian curvature. The Wikipedia formula might be better written with all the one indices replaced by $u$ and all the 2 indices replaced by $v$. Then reverting to $\theta,\phi$ as indices, the thing in brackets in the first formula is $R_{\ \ \ \phi\theta\phi}^\theta$ and in the second is $R_{\ \ \ \theta\theta\phi}^\phi$. The relationship mentioned above between Riemann components is
\begin{align}
R_{\ \ \ \theta\theta\phi}^\theta&=\frac{g_{\theta\phi}}{g_{\phi\phi}}R_{\ \ \ \phi\theta\phi}^\theta&\phantom {10000}\nonumber\\
R_{\ \ \ \theta\phi\theta}^\theta&=-\frac{g_{\theta\phi}}{g_{\phi\phi}}R_{\ \ \ \phi\theta\phi}^\theta&\phantom {10000}\nonumber\\
R_{\ \ \ \phi\theta\phi}^\theta&=\partial_\theta\Gamma_{\phi\phi}^\theta-\partial_\phi\Gamma_{\theta\phi}^\theta+\Gamma_{\theta\theta}^\theta\Gamma_{\phi\phi}^\theta+\Gamma_{\theta\phi}^\theta\Gamma_{\phi\phi}^\phi-\Gamma_{\phi\theta}^\theta\Gamma_{\theta\phi}^\theta-\Gamma_{\phi\phi}^\theta\Gamma_{\theta\phi}^\phi&\phantom {10000}\nonumber\\
R_{\ \ \ \phi\phi\theta}^\theta&=-R_{\ \ \ \phi\theta\phi}^\theta&\phantom {10000}\nonumber\\
R_{\ \ \ \theta\theta\phi}^\phi&=-\frac{g_{\theta\theta}}{g_{\phi\phi}}R_{\ \ \ \phi\theta\phi}^\theta&\phantom {10000}\nonumber\\
R_{\ \ \ \theta\phi\theta}^\phi&=\frac{g_{\theta\theta}}{g_{\phi\phi}}R_{\ \ \ \phi\theta\phi}^\theta&\phantom {10000}\nonumber\\
R_{\ \ \ \phi\theta\phi}^\phi&=-\frac{g_{\theta\phi}}{g_{\phi\phi}}R_{\ \ \ \phi\theta\phi}^\theta&\phantom {10000}\nonumber\\
R_{\ \ \ \phi\phi\theta}^\phi&=\frac{g_{\theta\phi}}{g_{\phi\phi}}R_{\ \ \ \phi\theta\phi}^\theta&\phantom {10000}\nonumber
\end{align}So now it is easy to work out that the mysterious $E$ in the Wikipedia formula should be $g_{\theta\theta}$ which is the same as $g_{11}$.

For the record the scalar curvatures for the ellipsoids, elliptic paraboloids and hyperbolic paraboloids are respectively$$R_{El}=\frac{2b^2}{\left(a^2\cos^2{\theta}+b^2\sin^2{\theta}\right)^2}$$$$R_{Ep}=\frac{2a^2}{\left(1+a^2r^2\right)^2}$$$$R_{Hp}=\frac{-8}{\left|g\right|^2a^2b^2}$$These are a bit vague until you know what the coordinate systems are but you can see what the sign of the curvature is which is what I was interested in.

Why did I do all this?

This was quite a project. It was sparked off by the following:
On Physics Forums Ibix said:
I don't know where you [JoeyJoystick] are getting numbers for the mass of the universe from - our current understanding is that it's infinite in size and mass.
I said: