tensor(deprecated)/geodesic_eqns - Maple Help

tensor

 geodesic_eqns
 generate the Euler-Lagrange equations for the geodesic curves

 Calling Sequence geodesic_eqns(coord, param, Cf2)

Parameters

 coord - list of coordinate names param - name of the variable to parametrize the curves with Cf2 - Christoffel symbols of the second kind

Description

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][GeodesicEquations] and Physics[Geodesics] instead.

 • The function geodesic_eqns(coord, Tau, Cf2) generates (but does not solve) the Euler-Lagrange equations of the geodesics for a metric with Christoffel symbols of the second kind Cf2 and coordinate variables coord.  The equations are written in terms of the coordinate variable names as functions of the given parameter Tau. They are returned in the format of a list of equations.
 • Cf2 should be indexed using the cf2 indexing function provided by the tensor package.  It can be computed using the Christoffel2 routine.

Examples

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][GeodesicEquations] and Physics[Geodesics] instead.

 > $\mathrm{with}\left(\mathrm{tensor}\right):$

Determine the geodesic equations for the Poincare half-plane. The coordinates are:

 > $\mathrm{coord}≔\left[u,v\right]$
 ${\mathrm{coord}}{≔}\left[{u}{,}{v}\right]$ (1)

The metric is:

 > $\mathrm{g_compts}≔\mathrm{array}\left(\mathrm{symmetric},\mathrm{sparse},1..2,1..2,\left[\left(1,1\right)=\frac{1}{{v}^{2}},\left(2,2\right)=\frac{1}{{v}^{2}}\right]\right):$
 > $g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{eval}\left(\mathrm{g_compts}\right)\right)$
 ${g}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cc}\frac{{1}}{{{v}}^{{2}}}& {0}\\ {0}& \frac{{1}}{{{v}}^{{2}}}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (2)
 > $\mathrm{ginv}≔\mathrm{invert}\left(g,'\mathrm{detg}'\right):$
 > $\mathrm{d1g}≔\mathrm{d1metric}\left(g,\mathrm{coord}\right):$$\mathrm{d2g}≔\mathrm{d2metric}\left(\mathrm{d1g},\mathrm{coord}\right):$
 > $\mathrm{Cf1}≔\mathrm{Christoffel1}\left(\mathrm{d1g}\right):$
 > $\mathrm{Cf2}≔\mathrm{Christoffel2}\left(\mathrm{ginv},\mathrm{Cf1}\right):$
 > $\mathrm{displayGR}\left(\mathrm{Christoffel2},\mathrm{Cf2}\right)$
 ${}$
 ${\mathrm{The Christoffel Symbols of the Second Kind}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{\left\{1,12\right\}}}{=}{-}\frac{{1}}{{v}}$
 ${\mathrm{\left\{2,11\right\}}}{=}\frac{{1}}{{v}}$
 ${\mathrm{\left\{2,22\right\}}}{=}{-}\frac{{1}}{{v}}$ (3)

Now generate the geodesic equations:

 > $\mathrm{eqns}≔\mathrm{geodesic_eqns}\left(\mathrm{coord},t,\mathrm{Cf2}\right)$
 ${\mathrm{eqns}}{≔}\left\{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({t}\right){-}\frac{{2}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({t}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{v}{}\left({t}\right)\right)}{{v}}{=}{0}{,}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{v}{}\left({t}\right){+}\frac{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({t}\right)\right)}^{{2}}}{{v}}{-}\frac{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{v}{}\left({t}\right)\right)}^{{2}}}{{v}}{=}{0}\right\}$ (4)

How about Euclidean 3-space in Cartesian coordinates?

 > $\mathrm{coord}≔\left[x,y,z\right]$
 ${\mathrm{coord}}{≔}\left[{x}{,}{y}{,}{z}\right]$ (5)
 > $\mathrm{g_compts}≔\mathrm{array}\left(\mathrm{symmetric},\mathrm{sparse},1..3,1..3,\left[\left(1,1\right)=1,\left(2,2\right)=1,\left(3,3\right)=1\right]\right):$
 > $g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{eval}\left(\mathrm{g_compts}\right)\right)$
 ${g}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{ccc}{1}& {0}& {0}\\ {0}& {1}& {0}\\ {0}& {0}& {1}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (6)
 > $\mathrm{ginv}≔\mathrm{invert}\left(g,'\mathrm{detg}'\right):$
 > $\mathrm{d1g}≔\mathrm{d1metric}\left(g,\mathrm{coord}\right):$$\mathrm{d2g}≔\mathrm{d2metric}\left(\mathrm{d1g},\mathrm{coord}\right):$
 > $\mathrm{Cf1}≔\mathrm{Christoffel1}\left(\mathrm{d1g}\right):$
 > $\mathrm{Cf2}≔\mathrm{Christoffel2}\left(\mathrm{ginv},\mathrm{Cf1}\right):$
 > $\mathrm{displayGR}\left(\mathrm{Christoffel2},\mathrm{Cf2}\right)$
 ${}$
 ${\mathrm{The Christoffel Symbols of the Second Kind}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{None}}$ (7)
 > $\mathrm{eqns}≔\mathrm{geodesic_eqns}\left(\mathrm{coord},t,\mathrm{Cf2}\right)$
 ${\mathrm{eqns}}{≔}\left\{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right){=}{0}{,}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right){=}{0}{,}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right){=}{0}\right\}$ (8)
 > $\mathrm{map}\left(\mathrm{eval},\mathrm{subs}\left(x\left(t\right)=at+b,y\left(t\right)=ct+e,z\left(t\right)=ft+h,\mathrm{eqns}\right)\right)$
 $\left\{{0}{=}{0}\right\}$ (9)

and in spherical-polar coordinates?

 > $\mathrm{coord}≔\left[r,\mathrm{\theta },\mathrm{\phi }\right]$
 ${\mathrm{coord}}{≔}\left[{r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right]$ (10)

The metric is:

 > $\mathrm{g_compts}≔\mathrm{array}\left(\mathrm{symmetric},\mathrm{sparse},1..3,1..3,\left[\left(1,1\right)=1,\left(2,2\right)={r}^{2},\left(3,3\right)={r}^{2}{\mathrm{sin}\left(\mathrm{\theta }\right)}^{2}\right]\right):$
 > $g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{eval}\left(\mathrm{g_compts}\right)\right)$
 ${g}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{ccc}{1}& {0}& {0}\\ {0}& {{r}}^{{2}}& {0}\\ {0}& {0}& {{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (11)
 > $\mathrm{ginv}≔\mathrm{invert}\left(g,'\mathrm{detg}'\right):$
 > $\mathrm{d1g}≔\mathrm{d1metric}\left(g,\mathrm{coord}\right):$$\mathrm{d2g}≔\mathrm{d2metric}\left(\mathrm{d1g},\mathrm{coord}\right):$
 > $\mathrm{Cf1}≔\mathrm{Christoffel1}\left(\mathrm{d1g}\right):$
 > $\mathrm{Cf2}≔\mathrm{Christoffel2}\left(\mathrm{ginv},\mathrm{Cf1}\right):$
 > $\mathrm{displayGR}\left(\mathrm{Christoffel2},\mathrm{Cf2}\right)$
 ${}$
 ${\mathrm{The Christoffel Symbols of the Second Kind}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{\left\{1,22\right\}}}{=}{-}{r}$
 ${\mathrm{\left\{1,33\right\}}}{=}{-}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{\left\{2,12\right\}}}{=}\frac{{1}}{{r}}$
 ${\mathrm{\left\{2,33\right\}}}{=}{-}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)$
 ${\mathrm{\left\{3,13\right\}}}{=}\frac{{1}}{{r}}$
 ${\mathrm{\left\{3,23\right\}}}{=}\frac{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}$ (12)

Now generate the geodesic equations:

 > $\mathrm{eqns}≔\mathrm{geodesic_eqns}\left(\mathrm{coord},t,\mathrm{Cf2}\right)$
 ${\mathrm{eqns}}{≔}\left\{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\phi }}{}\left({t}\right){+}\frac{{2}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{r}{}\left({t}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\phi }}{}\left({t}\right)\right)}{{r}}{+}\frac{{2}{}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\theta }}{}\left({t}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\phi }}{}\left({t}\right)\right)}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{=}{0}{,}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{r}{}\left({t}\right){-}{r}{}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\theta }}{}\left({t}\right)\right)}^{{2}}{-}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\phi }}{}\left({t}\right)\right)}^{{2}}{=}{0}{,}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\theta }}{}\left({t}\right){+}\frac{{2}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{r}{}\left({t}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\theta }}{}\left({t}\right)\right)}{{r}}{-}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\phi }}{}\left({t}\right)\right)}^{{2}}{=}{0}\right\}$ (13)