CoCalc Shared FilesBHLectures / sage / light_cone.ipynbOpen in CoCalc with one click!
Author: Eric Gourgoulhon
Views : 12

Light cone in Minkowski spacetime

In [1]:
%display latex
In [2]:
M = Manifold(4, 'M') print(M)
4-dimensional differentiable manifold M
In [3]:
X.<t,x,y,z> = M.chart() X
(M,(t,x,y,z))\left(M,(t, x, y, z)\right)
In [4]:
g = M.lorentzian_metric('g') g[0,0], g[1,1], g[2,2], g[3,3] = -1, 1, 1, 1 g.display()
g=dtdt+dxdx+dydy+dzdzg = -\mathrm{d} t\otimes \mathrm{d} t+\mathrm{d} x\otimes \mathrm{d} x+\mathrm{d} y\otimes \mathrm{d} y+\mathrm{d} z\otimes \mathrm{d} z
In [5]:
u = M.scalar_field(coord_expression={X: t-sqrt(x^2+y^2+z^2)}, name='u') u.display()
u:MR(t,x,y,z)tx2+y2+z2\begin{array}{llcl} u:& M & \longrightarrow & \mathbb{R} \\ & \left(t, x, y, z\right) & \longmapsto & t - \sqrt{x^{2} + y^{2} + z^{2}} \end{array}
In [6]:
du = u.differential() du.display()
du=dt+(xx2+y2+z2)dx+(yx2+y2+z2)dy+(zx2+y2+z2)dz\mathrm{d}u = \mathrm{d} t + \left( -\frac{x}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} x + \left( -\frac{y}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} y + \left( -\frac{z}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} z
In [7]:
l = - du.up(g) l.set_name('l', latex_name=r'\ell') print(l) l.display()
Vector field l on the 4-dimensional differentiable manifold M
=t+(xx2+y2+z2)x+(yx2+y2+z2)y+(zx2+y2+z2)z\ell = \frac{\partial}{\partial t } + \left( \frac{x}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial x } + \left( \frac{y}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial y } + \left( \frac{z}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial z }
In [8]:
g(l,l).expr()
00
In [9]:
nab = g.connection() print(nab)
Levi-Civita connection nabla_g associated with the Lorentzian metric g on the 4-dimensional differentiable manifold M
In [10]:
nab_l = nab(l) print(nab_l) nab_l.display()
Tensor field nabla_g(l) of type (1,1) on the 4-dimensional differentiable manifold M
g=(x2+y2+z2(y2+z2)x4+2x2y2+y4+z4+2(x2+y2)z2)xdxxy(x2+y2+z2)32xdyxz(x2+y2+z2)32xdzxy(x2+y2+z2)32ydx+(x2+y2+z2(x2+z2)x4+2x2y2+y4+z4+2(x2+y2)z2)ydyyz(x2+y2+z2)32ydzxz(x2+y2+z2)32zdxyz(x2+y2+z2)32zdy+(x2+y2+z2(x2+y2)x4+2x2y2+y4+z4+2(x2+y2)z2)zdz\nabla_{g} \ell = \left( \frac{\sqrt{x^{2} + y^{2} + z^{2}} {\left(y^{2} + z^{2}\right)}}{x^{4} + 2 \, x^{2} y^{2} + y^{4} + z^{4} + 2 \, {\left(x^{2} + y^{2}\right)} z^{2}} \right) \frac{\partial}{\partial x }\otimes \mathrm{d} x -\frac{x y}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \frac{\partial}{\partial x }\otimes \mathrm{d} y -\frac{x z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \frac{\partial}{\partial x }\otimes \mathrm{d} z -\frac{x y}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \frac{\partial}{\partial y }\otimes \mathrm{d} x + \left( \frac{\sqrt{x^{2} + y^{2} + z^{2}} {\left(x^{2} + z^{2}\right)}}{x^{4} + 2 \, x^{2} y^{2} + y^{4} + z^{4} + 2 \, {\left(x^{2} + y^{2}\right)} z^{2}} \right) \frac{\partial}{\partial y }\otimes \mathrm{d} y -\frac{y z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \frac{\partial}{\partial y }\otimes \mathrm{d} z -\frac{x z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \frac{\partial}{\partial z }\otimes \mathrm{d} x -\frac{y z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \frac{\partial}{\partial z }\otimes \mathrm{d} y + \left( \frac{\sqrt{x^{2} + y^{2} + z^{2}} {\left(x^{2} + y^{2}\right)}}{x^{4} + 2 \, x^{2} y^{2} + y^{4} + z^{4} + 2 \, {\left(x^{2} + y^{2}\right)} z^{2}} \right) \frac{\partial}{\partial z }\otimes \mathrm{d} z
In [11]:
nab_l[:]
(00000x2+y2+z2(y2+z2)x4+2x2y2+y4+z4+2(x2+y2)z2xy(x2+y2+z2)32xz(x2+y2+z2)320xy(x2+y2+z2)32x2+y2+z2(x2+z2)x4+2x2y2+y4+z4+2(x2+y2)z2yz(x2+y2+z2)320xz(x2+y2+z2)32yz(x2+y2+z2)32x2+y2+z2(x2+y2)x4+2x2y2+y4+z4+2(x2+y2)z2)\left(\begin{array}{rrrr} 0 & 0 & 0 & 0 \\ 0 & \frac{\sqrt{x^{2} + y^{2} + z^{2}} {\left(y^{2} + z^{2}\right)}}{x^{4} + 2 \, x^{2} y^{2} + y^{4} + z^{4} + 2 \, {\left(x^{2} + y^{2}\right)} z^{2}} & -\frac{x y}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & -\frac{x z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \\ 0 & -\frac{x y}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & \frac{\sqrt{x^{2} + y^{2} + z^{2}} {\left(x^{2} + z^{2}\right)}}{x^{4} + 2 \, x^{2} y^{2} + y^{4} + z^{4} + 2 \, {\left(x^{2} + y^{2}\right)} z^{2}} & -\frac{y z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \\ 0 & -\frac{x z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & -\frac{y z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & \frac{\sqrt{x^{2} + y^{2} + z^{2}} {\left(x^{2} + y^{2}\right)}}{x^{4} + 2 \, x^{2} y^{2} + y^{4} + z^{4} + 2 \, {\left(x^{2} + y^{2}\right)} z^{2}} \end{array}\right)
In [12]:
for i in [1..3]: nab_l[i,i].factor() nab_l[:]
(00000y2+z2(x2+y2+z2)32xy(x2+y2+z2)32xz(x2+y2+z2)320xy(x2+y2+z2)32x2+z2(x2+y2+z2)32yz(x2+y2+z2)320xz(x2+y2+z2)32yz(x2+y2+z2)32x2+y2(x2+y2+z2)32)\left(\begin{array}{rrrr} 0 & 0 & 0 & 0 \\ 0 & \frac{y^{2} + z^{2}}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & -\frac{x y}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & -\frac{x z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \\ 0 & -\frac{x y}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & \frac{x^{2} + z^{2}}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & -\frac{y z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \\ 0 & -\frac{x z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & -\frac{y z}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} & \frac{x^{2} + y^{2}}{{\left(x^{2} + y^{2} + z^{2}\right)}^{\frac{3}{2}}} \end{array}\right)
In [13]:
acc_l = l['^m']*nab_l['^a_m'] print(acc_l) acc_l.display()
Vector field on the 4-dimensional differentiable manifold M
00
In [14]:
k = M.vector_field(name='k') r = sqrt(x^2+y^2+z^2) k[:] = [1/2, -x/(2*r), -y/(2*r), -z/(2*r)] k.display()
k=12t+(x2x2+y2+z2)x+(y2x2+y2+z2)y+(z2x2+y2+z2)zk = \frac{1}{2} \frac{\partial}{\partial t } + \left( -\frac{x}{2 \, \sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial x } + \left( -\frac{y}{2 \, \sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial y } + \left( -\frac{z}{2 \, \sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial z }

Let us check that kk is a null vector:

In [15]:
g(k,k).expr()
00

and that it obeys k=1k\cdot\ell=-1:

In [16]:
g(k,l).expr()
1-1
In [19]:
l_form = l.down(g) l_form.set_name('lf', latex_name=r'\underline{\ell}') print(l_form) l_form.display()
1-form lf on the 4-dimensional differentiable manifold M
=dt+(xx2+y2+z2)dx+(yx2+y2+z2)dy+(zx2+y2+z2)dz\underline{\ell} = -\mathrm{d} t + \left( \frac{x}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} x + \left( \frac{y}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} y + \left( \frac{z}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} z
In [20]:
k_form = k.down(g) k_form.set_name('kf', latex_name=r'\underline{k}') print(k_form) k_form.display()
1-form kf on the 4-dimensional differentiable manifold M
k=12dt+(x2x2+y2+z2)dx+(y2x2+y2+z2)dy+(z2x2+y2+z2)dz\underline{k} = -\frac{1}{2} \mathrm{d} t + \left( -\frac{x}{2 \, \sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} x + \left( -\frac{y}{2 \, \sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} y + \left( -\frac{z}{2 \, \sqrt{x^{2} + y^{2} + z^{2}}} \right) \mathrm{d} z
In [22]:
q = g + l_form*k_form + k_form*l_form q.set_name('q') print q
Tensor field q of type (0,2) on the 4-dimensional differentiable manifold M
In [23]:
q == q.symmetrize()
True\mathrm{True}
In [25]:
q = q.symmetrize() q.set_name('q') print q
Field of symmetric bilinear forms q on the 4-dimensional differentiable manifold M
In [26]:
q[:]
(00000y2+z2x2+y2+z2xyx2+y2+z2xzx2+y2+z20xyx2+y2+z2x2+z2x2+y2+z2yzx2+y2+z20xzx2+y2+z2yzx2+y2+z2x2+y2x2+y2+z2)\left(\begin{array}{rrrr} 0 & 0 & 0 & 0 \\ 0 & \frac{y^{2} + z^{2}}{x^{2} + y^{2} + z^{2}} & -\frac{x y}{x^{2} + y^{2} + z^{2}} & -\frac{x z}{x^{2} + y^{2} + z^{2}} \\ 0 & -\frac{x y}{x^{2} + y^{2} + z^{2}} & \frac{x^{2} + z^{2}}{x^{2} + y^{2} + z^{2}} & -\frac{y z}{x^{2} + y^{2} + z^{2}} \\ 0 & -\frac{x z}{x^{2} + y^{2} + z^{2}} & -\frac{y z}{x^{2} + y^{2} + z^{2}} & \frac{x^{2} + y^{2}}{x^{2} + y^{2} + z^{2}} \end{array}\right)
In [28]:
nab(l_form) == (1/r) * q
True\mathrm{True}
In [38]:
q(l,l).expr()
00
In [39]:
q(l,k).expr()
00
In [40]:
q(k,k).expr()
00
In [41]:
XS.<t,r,th,ph> = M.chart(r't r:(0,+oo) th:(0,pi):\theta ph:(0,2*pi):\phi') XS
(M,(t,r,θ,ϕ))\left(M,(t, r, {\theta}, {\phi})\right)
In [42]:
spher_to_cart = XS.transition_map(X, [t, r*sin(th)*cos(ph), r*sin(th)*sin(ph), r*cos(th)]) spher_to_cart.display()
{t=tx=rcos(ϕ)sin(θ)y=rsin(ϕ)sin(θ)z=rcos(θ)\left\{\begin{array}{lcl} t & = & t \\ x & = & r \cos\left({\phi}\right) \sin\left({\theta}\right) \\ y & = & r \sin\left({\phi}\right) \sin\left({\theta}\right) \\ z & = & r \cos\left({\theta}\right) \end{array}\right.
In [43]:
spher_to_cart.set_inverse(t, sqrt(x^2+y^2+z^2), atan2(sqrt(x^2+y^2),z), atan2(y, x))
Check of the inverse coordinate transformation: t == t r == r th == arctan2(r*sin(th), r*cos(th)) ph == arctan2(r*sin(ph)*sin(th), r*cos(ph)*sin(th)) t == t x == x y == y z == z
In [44]:
q.display(XS.frame(), XS)
q=r2dθdθ+r2sin(θ)2dϕdϕq = r^{2} \mathrm{d} {\theta}\otimes \mathrm{d} {\theta} + r^{2} \sin\left({\theta}\right)^{2} \mathrm{d} {\phi}\otimes \mathrm{d} {\phi}
In [45]:
q[XS.frame(),:,XS]
(0000000000r20000r2sin(θ)2)\left(\begin{array}{rrrr} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & r^{2} & 0 \\ 0 & 0 & 0 & r^{2} \sin\left({\theta}\right)^{2} \end{array}\right)
In [46]:
n = 1/2*l + k n.set_name('n') n.display()
n=tn = \frac{\partial}{\partial t }
In [47]:
s = 1/2*l - k s.set_name('s') s.display()
s=(xx2+y2+z2)x+(yx2+y2+z2)y+(zx2+y2+z2)zs = \left( \frac{x}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial x } + \left( \frac{y}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial y } + \left( \frac{z}{\sqrt{x^{2} + y^{2} + z^{2}}} \right) \frac{\partial}{\partial z }
In [48]:
s.display(XS.frame())
s=rs = \frac{\partial}{\partial r }
In [50]:
q_up = q.up(g) print q_up
Tensor field of type (2,0) on the 4-dimensional differentiable manifold M
In [58]:
theta_l = 1/2 * q_up.contract(0,1, q.lie_der(l), 0,1) print theta_l
Scalar field on the 4-dimensional differentiable manifold M
In [59]:
theta_l.expr()
2x2+y2+z2\frac{2}{\sqrt{x^{2} + y^{2} + z^{2}}}
In [ ]: