Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Indeed, at the moment, one cannot take covariant derivatives along curves. This shall be improved in the future. Meanwhile, one can check whether a curve $\gamma(t)$ is a geodesic by evaluating the acceleration vector $a = \nabla_v v$ , where $v = \gamma'(t)$, via the formula $$a^i = \frac{\mathrm{d}v^i}{\mathrm{d}t} + \Gamma^i_{\ jk} v^j v^k, \qquad (1)$$ where $(a^i)$ and $(v^i)$ are the comments of $a$ and $v$ with respect to a coordinate system $(x^i)$ and $\Gamma^i_{\ jk}$ are the Christoffel symbols of the metric with respect to $(x^i)$. One can get $\Gamma^i_{\ jk}$ via g.christoffel_symbols(). The curve $\gamma(t)$ is a geodesic iff $a=0$.

Here is a full example, involving a curve in the hyperbolic plane, described by the Poincaré half-plane. We first introduce the manifold $M$, the Poincaré half-plane coordinate $(x,y)$ and the metric $g$:

sage: M = Manifold(2, 'M', structure='Riemannian')
sage: X.<x,y> = M.chart(r"x y:(0,+oo)")
sage: g = M.metric()
sage: g[0, 0], g[1, 1] = 1/y^2, 1/y^2
sage: g.display()
g = y^(-2) dx*dx + y^(-2) dy*dy

We then consider a curve describing a half circle orthogonal to the boundary $y=0$ of Poincaré half-plane:

sage: R.<t> = RealLine()
sage: gamma = M.curve([cos(t), sin(t)], (t, 0, pi), name='gamma')
sage: v = gamma.tangent_vector_field()
sage: v.display()
gamma' = -sin(t) d/dx + cos(t) d/dy

The formula (1) is implemented as follows:

sage: cc = g.christoffel_symbols()
sage: a = gamma.domain().vector_field(dest_map=gamma)
sage: for i in M.irange():
....:     s = diff(v[i].expr(), t)
....:     for j in M.irange():
....:         s += sum(cc[i, j, k](*X(gamma(t)))*v[j].expr()*v[k].expr() 
....:                  for k in M.irange())
....:     a[i] = s
....: 
sage: print(a)
Vector field along the Real interval (0, pi) with values on the 2-dimensional Riemannian manifold M
sage: a.display()
cos(t) d/dx - cos(t)^2/sin(t) d/dy

We notice that $a \not=0$, which means that $\gamma$ is not geodesic. However $a$ is collinear to $v$:

sage: a == - cos(t)/sin(t) * v
True

which implies that $\gamma$ is pregeodesic: a reparametrization would turn it into a geodesic curve.

Indeed, at the moment, one cannot take covariant derivatives along curves. This shall be improved in the future. Meanwhile, one can check whether a curve $\gamma(t)$ is a geodesic by evaluating the acceleration vector $a = \nabla_v v$ , where $v = \gamma'(t)$, via the formula $$a^i = \frac{\mathrm{d}v^i}{\mathrm{d}t} + \Gamma^i_{\ jk} v^j v^k, \qquad (1)$$ where $(a^i)$ and $(v^i)$ are the comments of $a$ and $v$ with respect to a coordinate system $(x^i)$ and $\Gamma^i_{\ jk}$ are the Christoffel symbols of the metric with respect to $(x^i)$. One can get $\Gamma^i_{\ jk}$ via g.christoffel_symbols(). The curve $\gamma(t)$ is a geodesic iff $a=0$.

Here is a full example, involving a curve in the hyperbolic plane, described by the Poincaré half-plane. We first introduce the manifold $M$, the Poincaré half-plane coordinate coordinates $(x,y)$ and the metric $g$:

sage: M = Manifold(2, 'M', structure='Riemannian')
sage: X.<x,y> = M.chart(r"x y:(0,+oo)")
sage: g = M.metric()
sage: g[0, 0], g[1, 1] = 1/y^2, 1/y^2
sage: g.display()
g = y^(-2) dx*dx + y^(-2) dy*dy

We then consider a curve describing a half circle orthogonal to the boundary $y=0$ of Poincaré half-plane:

sage: R.<t> = RealLine()
sage: gamma = M.curve([cos(t), sin(t)], (t, 0, pi), name='gamma')
sage: v = gamma.tangent_vector_field()
sage: v.display()
gamma' = -sin(t) d/dx + cos(t) d/dy

The formula (1) is implemented as follows:

sage: cc = g.christoffel_symbols()
sage: a = gamma.domain().vector_field(dest_map=gamma)
sage: for i in M.irange():
....:     s = diff(v[i].expr(), t)
....:     for j in M.irange():
....:         s += sum(cc[i, j, k](*X(gamma(t)))*v[j].expr()*v[k].expr() 
....:                  for k in M.irange())
....:     a[i] = s
....: 
sage: print(a)
Vector field along the Real interval (0, pi) with values on the 2-dimensional Riemannian manifold M
sage: a.display()
cos(t) d/dx - cos(t)^2/sin(t) d/dy

We notice that $a \not=0$, which means that $\gamma$ is not geodesic. However $a$ is collinear to $v$:

sage: a == - cos(t)/sin(t) * v
True

which implies that $\gamma$ is pregeodesic: a reparametrization would turn it into a geodesic curve.

Indeed, at the moment, one cannot take covariant derivatives along curves. This shall be improved in the future. Meanwhile, one can check whether a curve $\gamma(t)$ is a geodesic by evaluating the acceleration vector $a = \nabla_v v$ , where $v = \gamma'(t)$, via the formula $$a^i = \frac{\mathrm{d}v^i}{\mathrm{d}t} + \Gamma^i_{\ jk} v^j v^k, \qquad (1)$$ where $(a^i)$ and $(v^i)$ are the comments of $a$ and $v$ with respect to a coordinate system $(x^i)$ and $\Gamma^i_{\ jk}$ are the Christoffel symbols of the metric with respect to $(x^i)$. One can get $\Gamma^i_{\ jk}$ via g.christoffel_symbols(). The curve $\gamma(t)$ is a geodesic iff $a=0$.

Here is a full example, involving a curve in the hyperbolic plane, described by the Poincaré half-plane. We first introduce the manifold $M$, the Poincaré half-plane coordinates $(x,y)$ and the metric $g$:

sage: M = Manifold(2, 'M', structure='Riemannian')
sage: X.<x,y> = M.chart(r"x y:(0,+oo)")
M.chart(r'x y:(0,+oo)')
sage: g = M.metric()
sage: g[0, 0], g[1, 1] = 1/y^2, 1/y^2
sage: g.display()
g = y^(-2) dx*dx + y^(-2) dy*dy

We then consider a curve describing a half circle orthogonal to the boundary $y=0$ of Poincaré half-plane:

sage: R.<t> = RealLine()
sage: gamma = M.curve([cos(t), sin(t)], (t, 0, pi), name='gamma')
sage: v = gamma.tangent_vector_field()
sage: v.display()
gamma' = -sin(t) d/dx + cos(t) d/dy

The formula (1) is implemented as follows:

sage: cc = g.christoffel_symbols()
sage: a = gamma.domain().vector_field(dest_map=gamma)
sage: for i in M.irange():
....:     s = diff(v[i].expr(), t)
....:     for j in M.irange():
....:         s += sum(cc[i, j, k](*X(gamma(t)))*v[j].expr()*v[k].expr() 
....:                  for k in M.irange())
....:     a[i] = s
....: 
sage: print(a)
Vector field along the Real interval (0, pi) with values on the 2-dimensional Riemannian manifold M
sage: a.display()
cos(t) d/dx - cos(t)^2/sin(t) d/dy

We notice that $a \not=0$, which means that $\gamma$ is not geodesic. However $a$ is collinear to $v$:

sage: a == - cos(t)/sin(t) * v
True

which implies that $\gamma$ is pregeodesic: a reparametrization would turn it into a geodesic curve.

Indeed, at the moment, one cannot take covariant derivatives along curves. This shall be improved in the future. Meanwhile, one can check whether a curve $\gamma(t)$ is a geodesic by evaluating the acceleration vector $a = \nabla_v v$ , where $v = \gamma'(t)$, via the formula $$a^i = \frac{\mathrm{d}v^i}{\mathrm{d}t} + \Gamma^i_{\ jk} v^j v^k, \qquad (1)$$ where $(a^i)$ and $(v^i)$ are the comments of $a$ and $v$ with respect to a coordinate system $(x^i)$ and $\Gamma^i_{\ jk}$ are the Christoffel symbols of the metric with respect to $(x^i)$. One can get $\Gamma^i_{\ jk}$ via g.christoffel_symbols(). The curve $\gamma(t)$ is a geodesic iff $a=0$.

Here is a full example, involving a curve in the hyperbolic plane, described by the Poincaré half-plane. We first introduce the manifold $M$, the Poincaré half-plane coordinates $(x,y)$ and the metric $g$:

sage: M = Manifold(2, 'M', structure='Riemannian')
sage: X.<x,y> = M.chart(r'x y:(0,+oo)')
sage: g = M.metric()
sage: g[0, 0], g[1, 1] = 1/y^2, 1/y^2
sage: g.display()
g = y^(-2) dx*dx + y^(-2) dy*dy

We then consider a curve describing a half circle orthogonal to the boundary $y=0$ of Poincaré half-plane:

sage: R.<t> = RealLine()
sage: gamma = M.curve([cos(t), sin(t)], (t, 0, pi), name='gamma')
sage: v = gamma.tangent_vector_field()
sage: v.display()
gamma' = -sin(t) d/dx + cos(t) d/dy

The formula (1) is implemented as follows:

sage: cc = g.christoffel_symbols()
sage: a = gamma.domain().vector_field(dest_map=gamma)
sage: for i in M.irange():
sage: for i in M.irange():
....:     s a[i] = diff(v[i].expr(), t)
t) \
....:            + sum(sum(cc[i, j, k](*X(gamma(t)))*v[j].expr()*v[k].expr() 
....:                      for j in M.irange():
....:         s += sum(cc[i, j, k](*X(gamma(t)))*v[j].expr()*v[k].expr() 
....:                  M.irange()) for k in M.irange())
....:     a[i] = s
....: 
sage: print(a)
Vector field along the Real interval (0, pi) with values on the 2-dimensional Riemannian manifold M
sage: a.display()
cos(t) d/dx - cos(t)^2/sin(t) d/dy

We notice that $a \not=0$, which means that $\gamma$ is not geodesic. However $a$ is collinear to $v$:

sage: a == - cos(t)/sin(t) * v
True

which implies that $\gamma$ is pregeodesic: a reparametrization would turn it into a geodesic curve.

Indeed, at the moment, one cannot take covariant derivatives along curves. This shall be improved in the future. Meanwhile, one can check whether a curve $\gamma(t)$ is a geodesic by evaluating the acceleration vector $a = \nabla_v v$ , where $v = \gamma'(t)$, via the formula $$a^i = \frac{\mathrm{d}v^i}{\mathrm{d}t} + \Gamma^i_{\ jk} v^j v^k, \qquad (1)$$ where $(a^i)$ and $(v^i)$ are the comments of $a$ and $v$ with respect to a coordinate system $(x^i)$ and $\Gamma^i_{\ jk}$ are the Christoffel symbols of the metric with respect to $(x^i)$. One can get $\Gamma^i_{\ jk}$ via g.christoffel_symbols(). The curve $\gamma(t)$ is a geodesic iff $a=0$.

Here is a full example, involving a curve in the hyperbolic plane, described by the Poincaré half-plane. We first introduce the manifold $M$, the Poincaré half-plane coordinates $(x,y)$ and the metric $g$:

sage: M = Manifold(2, 'M', structure='Riemannian')
sage: X.<x,y> = M.chart(r'x y:(0,+oo)')
sage: g = M.metric()
sage: g[0, 0], g[1, 1] = 1/y^2, 1/y^2
sage: g.display()
g = y^(-2) dx*dx + y^(-2) dy*dy

We then consider a curve describing a half circle orthogonal to the boundary $y=0$ of Poincaré half-plane:

sage: R.<t> = RealLine()
sage: gamma = M.curve([cos(t), sin(t)], (t, 0, pi), name='gamma')
sage: v = gamma.tangent_vector_field()
sage: v.display()
gamma' = -sin(t) d/dx + cos(t) d/dy

The formula (1) is implemented as follows:

sage: cc = g.christoffel_symbols()
sage: a = gamma.domain().vector_field(dest_map=gamma)
sage: for i in M.irange():
sage: for i in M.irange():
....:     a[i] = diff(v[i].expr(), t) \
....:            + sum(sum(cc[i, j, k](*X(gamma(t)))*v[j].expr()*v[k].expr() 
....:                      for j in M.irange()) for k in M.irange())
....: 
sage: print(a)
Vector field along the Real interval (0, pi) with values on the 2-dimensional Riemannian manifold M
sage: a.display()
cos(t) d/dx - cos(t)^2/sin(t) d/dy

We notice that $a \not=0$, which means that $\gamma$ is not geodesic. However $a$ is collinear to $v$:

sage: a == - cos(t)/sin(t) * v
True

which implies that $\gamma$ is pregeodesic: a reparametrization would turn it into a geodesic curve.