Misner Space

Spacetime discussed in Section 2.7, p 81, Carroll
(ds^2)=(t/(Sqrt[1+(t^2)]))(dt^2)-(2/(Sqrt[1+(t^2)])) dt dx -(t/(Sqrt[1+(t^2)])) (dx^2)
0<x<1, -∞<t<+∞



It is the metric with the above sign that corresponds to the figure in Carroll’s book

Null lines

(ds^2)=0 => ((((dx/dt)))^2)+ (2/t) (dx/dt)-1 = 0

sol=DSolve[((x'[t])^2)+(2/t) x'[t]-1==0,x,t]

Now, we have to be careful so that the null cones are continuous at the t=0 line.
To do it correctly, we notice that for the 1st solution (Subscript[c, 1]), when we move in the positive-t direction, then
1. when t < 0, for increasing t, we move towards the right
2. when t >0, for increasing t,  we move towards the left. To maintain same forward null cones, we have to move in the direction of decreasing t, therefore reverse the tangent vector

x1[t_,c_] = ((x[t]/.sol)/.(C[1])-> c)[[1]]; (* (Subscript[c, 1]) *)
x2[t_,c_] = ((x[t]/.sol)/.(C[1])-> c)[[2]]; (* (Subscript[c, 2]) *)
{x1[t,c],x2[t,c]}

Null (Subscript[c, 1]) curves in the t<0 region. They approach the t=0 line, but never reach it. We see that (2/t) dx/dt -> 1 as t->0

tmax=1.5;tmin=0.021;c0=0;
g12m=ParametricPlot[{Mod[x1[t,c0],1.0],t},{t,-tmax,-tmin},PlotRange->All,AxesOrigin-> {0,0},AxesLabel->{"x","t"}];
g13m=ParametricPlot3D[{ Cos[2 π x1[t,c0]],Sin[2 π x1[t,c0]],t},{t,-tmax,-tmin},PlotRange->All,AxesLabel->{"","","t"}];{g12m,g13m}

Null (Subscript[c, 1]) curves in the t<0 region. They approach the t=0 line, but never reach it. We see that (2/t) dx/dt -> 1 as t->0
Using x1[t,c] we move upwards in t, therefore to the left, which is not compatible with the light cones coming from the t<0 region.

tmax=1.5;tmin=0.021;c0=0;
g12p=ParametricPlot[{Mod[x1[t,c0],1.0],t},{t,tmin,tmax},PlotRange->All,AxesOrigin-> {0,0},AxesLabel->{"x","t"}];
g13p=ParametricPlot3D[{ Cos[2 π x1[t,c0]],Sin[2 π x1[t,c0]],t},{t,tmin,tmax},PlotRange->All,AxesLabel->{"","","t"}];{g12p,g13p}

Null (Subscript[c, 2]) curves in the t<0 region. They approach the t=0 line, but never reach it. We see that (2/t) dx/dt -> 1 as t->0

tmax=5.5;tmin=0.021;c0=0;
g22=ParametricPlot[{Mod[x2[t,c0],1.0],t},{t,-tmax,tmax},PlotRange->All,AxesOrigin-> {0,0},AxesLabel->{"x","t"}];
g23=ParametricPlot3D[{ Cos[2 π x2[t,c0]],Sin[2 π x2[t,c0]],t},{t,-tmax,tmax},PlotRange->All,AxesLabel->{"","","t"}];{g22,g23}

tmax=4.5;tmin=0.11;c0=0;
g12m=ParametricPlot[{Mod[x1[t,c0],1.0],t},{t,-tmax,-tmin},PlotRange->All,AxesOrigin-> {0,0},AxesLabel->{"x","t"}];
g12p=ParametricPlot[{Mod[x1[t,c0],1.0],t},{t,  tmin,   tmax},PlotRange->All,AxesOrigin-> {0,0},AxesLabel->{"x","t"}];
g22  =ParametricPlot[{Mod[x2[t,c0],1.0],t},{t,-tmax,  tmax},PlotRange->All,AxesOrigin-> {0,0},AxesLabel->{"x","t"}];
{Show[g12m,g12p,g22,PlotRange->All,AxesOrigin-> {0,0},AxesLabel->{"x","t"}],
Show[g12m,g12p,g22,PlotRange->All,AxesOrigin-> {0,0},AxesLabel->{"x","t"},AspectRatio-> 1]}

Now, several different null lines, to see causal structure: Notice here that we are not careful to use the correct parametric equations, so the direction of flowing for t>0 and (Subscript[c, 1]) curves, is opposite.

tmax=1.5 ;c0=.;
range={{0,1},{-1.1tmax,1.1 tmax}};
g1=Table[
ParametricPlot[{x1[t,c0],t},{t,-tmax,tmax},PlotRange->range]
,{c0,{-4,-1.4,-0.2,0.5,1.2,1.7,2.2}}];
g2=Table[
ParametricPlot[{x2[t,c0],t},{t,-tmax,tmax},PlotRange->range]
,{c0,{-0.5,-0.305,-0.15,0.0 ,0.2,0.4,0.6}}];
Show[{g1,g2},AspectRatio-> 1,AxesOrigin-> {0,0},AxesLabel->{"x","t"}]

tmax=1.5 ;c0=.;
range={{0,1},{-1.1tmax,1.1 tmax}};
g1=Table[
ParametricPlot[{x1[t,c0],t},{t,-tmax,tmax},PlotRange->range]
,{c0,{-4,-1.4,-0.2,0.5,1.2,1.7,2.2}}];
g2=Table[
ParametricPlot[{x2[t,c0],t},{t,-tmax,tmax},PlotRange->range]
,{c0,{-0.5,-0.305,-0.15,0.0 ,0.2,0.4,0.6}}];
Show[{g1,g2},AxesOrigin-> {0,0},AxesLabel->{"x","t"}]

Notice the intersections of the curves in Euclidean geometry are at (90^o)

tmax=5.5 ;c0=.;
range={{0,1},{-1.1tmax,1.1 tmax}};
g1=Table[
ParametricPlot[{x1[t,c0],t},{t,-tmax,tmax},PlotRange->range]
,{c0,{-4,-1.5,-0.2,1.0,2.0,3,4,4.5,5,5.5,6,6.5,7.5}}];
g2=Table[
ParametricPlot[{x2[t,c0],t},{t,-tmax,tmax},PlotRange->range]
,{c0,{-3.3,-2.7,-2.3,-1.7,-1.3,-0.8,-0.305,0.0 ,0.3,0.6}}];
Show[{g1,g2},AxesOrigin-> {0,0},AxesLabel->{"x","t"}]

Compute tangent vectors.

One has to be careful to maintain the continuity of the causal structure near the t=0 line
For that, the curve (Subscript[c, 1]) must be transversed in the direction of decreasing t, so that both classes of lines flow to the right. 
Therefore, the sign of the tangent vector of (Subscript[c, 1]), which has parameter t, which is increasing, must be reversed for t>0.

Notice that dx1[t] dx2[t] = -1, therefore the vectors appear normal in Euclidean geometry (of course x-y scale must be the same)

dx1[t_]= D[x1[t,c],t];
dx2[t_]= D[x2[t,c],t];
dr1[t_]= Which[t<0,{dx1[t],1},t>= 0,{-dx1[t],-1}];
dr2[t_] = {dx2[t],1};
Print[
"dx1[t]= ",dx1[t],"     dx2[t]= ",dx2[t],"\n",
"Euclidean dr1·dr2 = dx1 dx2 + 1= ",dx1[t] dx2[t]//Simplify,"+1 = 0"
]

tmax=2.5;
VectorPlot[{dr1[t],dr2[t]},{x,0,1},{t,-tmax,tmax}, VectorPoints->{5,10},VectorSizes->1.8,VectorColorFunction->None,AspectRatio->2,VectorStyle->{{Arrowheads[0.02], Red},{Arrowheads[0.02], Blue}}]

tmax=2.0;
VectorPlot[{dr1[t],dr2[t]},{x,0,1},{t,-tmax,tmax}, VectorPoints->{5,10},VectorSizes->1.8,VectorColorFunction->None,AspectRatio-> Automatic,VectorStyle->{{Arrowheads[0.02], Red},{Arrowheads[0.02], Blue}}]

tmax=2.0;
VectorPlot[{dr1[t],dr2[t]},{x,0,1},{t,-tmax,tmax}, VectorPoints->{5,10},VectorSizes->3,VectorScaling->"Linear",VectorColorFunction->None,AspectRatio-> Automatic,VectorStyle->{{Arrowheads[0.02], Red},{Arrowheads[0.02], Blue}}]

Timelike Geodesics

The geodesic equations are:
(Overscript[t, ..])=((-1)/(2(1+(t^2))))(-t ((OverDot[t])^2)+2 (OverDot[t])(Overscript[x, ,])+t ((OverDot[x])^2))
(Overscript[x, ..])=(1/(2(1+(t^2))))( (1+ 2(t^2)) ((OverDot[t])^2)-2 t (OverDot[t])(OverDot[x])+    ((OverDot[x])^2))
With initial conditions x(0)=(Subscript[x, 0]), t(0)=(Subscript[t, 0]), (OverDot[x])(0)=(Subscript[(OverDot[x]), 0]),(OverDot[t])(0)=(Subscript[(OverDot[t]), 0])
But they are not all free due to the constraint:
(v^μ)(Subscript[v, μ])=-1 => -t ((OverDot[t])^2)+ 2 (OverDot[t])(OverDot[x])+t ((OverDot[x])^2)-(Sqrt[1+(t^2)])=0

dt0=.;dx0=.;dt=.;t0=.;x0=.;
{initt   = Solve[-t0 (dt^2) + 2 dt dx0 + t0 (dx0^2)-(Sqrt[1+(t0^2)])==0,dt][[1,1]](* we pick dx0>0 for t0 < 0 *),
initt2 = Solve[-t0 (dt^2) + 2 dt dx0 + t0 (dx0^2)-(Sqrt[1+(t0^2)])==0,dt][[2,1]]}

t=.;x=.;λ=.;dt=.;
x0=0.5;t0=-1.0;λmax=2.65;
dx0=0.2;dt0 = dt/.initt;
Print["Initial Conditions:  (Subscript[x, 0])= ",x0," (Subscript[t, 0])= ",t0," (Subscript[(OverDot[x]), 0])= ",dx0," (Subscript[(OverDot[t]), 0])= ",dt0]
dsol = NDSolve[{
t''[λ] == ((-1)/(2(1+((t[λ])^2))))(-            t[λ]     ((t'[λ])^2)+2              t'[λ] x'[λ] + t[λ] ((x'[λ])^2)),
x''[λ] ==  ((  1)/(2(1+((t[λ])^2))))(   (1+2((t[λ])^2)) ((t'[λ])^2)-2 t[λ]t'[λ] x'[λ] +           ((x'[λ])^2)),
t'[0]   ==dt0,
x'[0]   == dx0,
t   [0]   == t0   ,
x   [0]   == x0
},{t,x},{λ,0,λmax}
];
{ParametricPlot[Evaluate[{Mod[x[λ],1.0],t[λ]}/.dsol],{λ,0,λmax},Exclusions->"Discontinuities",AxesLabel->{"x","t"}],
ParametricPlot3D[Evaluate[{Cos[2π x[λ]],Sin[2 π x[λ]],t[λ]}/.dsol],{λ,0,λmax},AxesLabel->{"","","t"}],
Plot[Evaluate[(-((t[λ] ((t'[λ])^2))/(Sqrt[1+((t[λ])^2)]))+((2 t'[λ] x'[λ])/(Sqrt[1+((t[λ])^2)]))+ ((t[λ] ((x'[λ])^2))/(Sqrt[1+((t[λ])^2)]))-1.0)/.dsol],{λ,0,λmax},AxesLabel->{"λ","(v^μ) (Subscript[v, μ])+1"}]}

t=.;x=.;λ=.;dt=.;
x0=0.5;t0=0.8;λmax=0.9;
dx0=0.8;dt0 = dt/.initt;
Print["Initial Conditions:  (Subscript[x, 0])= ",x0," (Subscript[t, 0])= ",t0," (Subscript[(OverDot[x]), 0])= ",dx0," (Subscript[(OverDot[t]), 0])= ",dt0]
dsol = NDSolve[{
t''[λ] == ((-1)/(2(1+((t[λ])^2))))(-            t[λ]     ((t'[λ])^2)+2              t'[λ] x'[λ] + t[λ] ((x'[λ])^2)),
x''[λ] ==  ((  1)/(2(1+((t[λ])^2))))(   (1+2((t[λ])^2)) ((t'[λ])^2)-2 t[λ]t'[λ] x'[λ] +           ((x'[λ])^2)),
t'[0]   ==dt0,
x'[0]   == dx0,
t   [0]   == t0   ,
x   [0]   == x0
},{t,x},{λ,0,λmax}
];
{ParametricPlot[Evaluate[{Mod[x[λ],1.0],t[λ]}/.dsol],{λ,0,λmax},Exclusions->"Discontinuities"],
ParametricPlot3D[Evaluate[{Cos[2π x[λ]],Sin[2 π x[λ]],t[λ]}/.dsol],{λ,0,λmax}],
Plot[Evaluate[(-t[λ] ((t'[λ])^2)+2 t'[λ] x'[λ]+ t[λ] ((x'[λ])^2)-(Sqrt[1+((t[λ])^2)]))/.dsol],{λ,0,λmax},AxesLabel->{"λ","(v^μ) (Subscript[v, μ])+1"}]}

Misc

Compute length of curve: x(λ)=λ    t(λ)= λ+(Subscript[t, 0]),  0<= λ < 1

(ds^2)=(((λ+(Subscript[t, 0])))/(Sqrt[1+(((λ+(Subscript[t, 0])))^2)]))((dλ)^2)-(2/(Sqrt[1+(((λ+(Subscript[t, 0])))^2)]))((dλ)^2)-(((λ+(Subscript[t, 0])))/(Sqrt[1+(((λ+(Subscript[t, 0])))^2)]))((dλ)^2)=-(2/(Sqrt[1+(((λ+(Subscript[t, 0])))^2)]))((dλ)^2)=> 
   s= (∫_0^1)|ds|= (∫_0^1)((Sqrt[2])/(((1+(((λ+(Subscript[t, 0])))^2)))^(1/4)))dλ
       =(Sqrt[2])(Subscript[(λ+(Subscript[t, 0])) , 2])(Subscript[F, 1])((1/4),(1/2);(3/2),-((((Subscript[t, 0])+λ))^2)) (Subscript[|, 0]^1)=(Sqrt[2]){-(Subscript[(Subscript[t, 0])  , 2])(Subscript[F, 1])((1/4),(1/2);(3/2),-((Subscript[t, 0])^2))+(1+(Subscript[t, 0]))(Subscript[   , 2])(Subscript[F, 1])((1/4),(1/2);(3/2),-(((1+(Subscript[t, 0])))^2))}

Integrate[ ((Sqrt[2])/(((1+(((λ+t0))^2)))^(1/4))),λ,Assumptions->t0>0]

f[t0_] = Integrate[ ((Sqrt[2])/(((1+(((λ+t0))^2)))^(1/4))),{λ,0,1},Assumptions->t0>0]

Plot[f[t],{t,0,10}]

Orthogonal basis:

gmatrix = (1/(Sqrt[1+(t^2)])) (({{t, -1}, {-1, -t}})); gmatrixinv=Inverse[gmatrix]//Simplify;evecs=Eigenvectors[gmatrix]; evecsinverse = Inverse[evecs] //Simplify;
Print[
"(g^(-1))= ",gmatrixinv//MatrixForm, "       g - (g^(-1))= ", gmatrix-gmatrixinv//MatrixForm,
"\n(Subscript[g, D]) = ",DiagonalMatrix[Eigenvalues[gmatrix]]//MatrixForm,
"\nO  = ", evecs//MatrixForm,
"\n(Subscript[g, D]) = ", evecs . gmatrix . evecsinverse//Simplify//MatrixForm,
"\n(Subscript[g, D]) = ", evecs . gmatrix .Transpose[evecs]//Simplify//MatrixForm,"    (diagonal, but not ±1)",
"\nOrthogonality of vectors:",
"\n (Subscript[e, 0])= ",evecs[[1]], "    (Subscript[e, 1])= ",evecs[[2]],"  (not orthormal)",
"\n (Subscript[e, 0])·(Subscript[e, 1])= ",evecs[[1]].gmatrix.evecs[[2]]//Simplify,
"\n (Subscript[e, 0])·(Subscript[e, 0])= ",evecs[[1]].gmatrix.evecs[[1]]//Simplify,
"\n (Subscript[e, 1])·(Subscript[e, 1])= ",evecs[[2]].gmatrix.evecs[[2]]//Simplify
]

Acknowledgements

This notebook has been programmed by Konstantinos Anagnostopoulos, Physics Department, National Technical University of Athens, Greece, while he was an instructor of the 4th year undergraduate course "General Relativity and Cosmology". It was created for fun, but it may turn out to be useful to everyone studying the General Theory of Relativity for the first time.
Email: konstant@mail.ntua.gr
Web:    http://physics.ntua.gr/konstant 
It is offered under a GPL/CC BY 4.0 license (in that order, depending on whether they apply on the programming part or the text part of the notebook).