7. Relativity and Cosmology

Legal Notice, Disclaimer, and Book Ordering Information:

Null

Setup

\(Clear["Global`*"]; 
Off[General::spell]; 
Off[General::spell1]; 
    \)

<< "D:\Mma\Inits\ch7init.m"

7.1 Introduction

7.1.3 Mathematica Commands

Examples:  Special relativity

p = {E,0,0,pz}

p.η.p == η.p.p

p1 = {E,0,0,pz}

p2 = boostx[γ,β].p1

p1.η.p1

p1.η.p1 == p2.η.p2/.γ2β[γ,β]//Simplify

Example:  Christoffel symbols

sphMet = DiagonalMatrix[{1,-1,-r^2,-r^2 Sin[θ]^2}]

sphChrist = christ[sphMet]

Example:  Curvature tensor for pseudo-Euclidian metric

eq1  =  curvR[sphChrist] // Simplify

eq1 // Short[#, 4]&

eq1 == Table[0, {i, 4}, {j, 4}, {k, 4}, {l, 4}]

Example : Ricci tensor for Goedel metric

\(\(godelMet\  = 
      \ {{1, 0, Exp[a\ x1], 0}

        \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , {0, \(-1\), 0, 0}

        	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , {Exp[a\ x1], 0, 
          Exp[2  a\ x1]/2, 0}

        	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , {0, 0, 0, \(-1\)}}

    \)\)

godelChrist  =  christ[godelMet, {x0, x1, x2, x3}];

godelCurvature  =  curvR[godelChrist, {x0, x1, x2, x3}];

godelRicci  =  ricciR[godelCurvature]

Inverse[godelMet]

Inverse[godelMet] . godelRicci . Inverse[godelMet] // ExpandAll

Example:  Killing vector equations in pseudo-Euclidian space

vector  = 
       {0, 0, f[r] Sin[ϕ], f[r] Cos[ϕ] Cot[θ]}

sphMet = DiagonalMatrix[{1,-1,-r^2,-r^2 Sin[θ]^2}]

sphChrist  =  christ[sphMet]

killingEq[vector, sphMet, sphChrist]

Example : Einstein tensor for wave metric

\(waveMet\  = \ 

      	\ \ \ {{0, \(-1\)/2, 0, 0}
		, {\(-1\)/2, 0, 0, 0}

        		, {0, 0, \(-\((L[u]^2\ )\)\)\ Exp[f[u]], 0}

        		, {0, 0, 0, \(-\((L[u]^2\ )\)\)\ Exp[\(-f[u]\)]}}\)

Clear[u, v, x, y]

waveChrist  =  christ[waveMet, {u, v, x, y}];

waveCurvature  =  curvR[waveChrist, {u, v, x, y}];

waveEinstein  =  einstein[waveCurvature, waveMet]

Example:  Geodesics for pseudo-Euclidian metric

cylMet  =  DiagonalMatrix[{1, -1, -r^2, -1}]

geodesic[cylMet, {t, r, ϕ, z}] // ColumnForm

Example:  Schwartzschild and Kerr metrics

ssChrist

kChrist[[1, 1]]