This notebook is part of the Introduction to manifolds in SageMath by Andrzej Chrzeszczyk (Jan Kochanowski University of Kielce, Poland).
version()
'SageMath version 9.6, Release Date: 2022-05-15'
Roughly speaking, connection $∇$ on a smooth manifold $M$, is a rule to calculate the directional derivatives of the vector fields on $M$. If $X$ and $Y$ are two vector fields, $∇_X Y$ denotes the vector field whose value at each point $p ∈ M$ is equal to the directional derivative of $Y$ in the direction of $X_p$ .
Let $U\subset R^n$ be an open subset and $\ \ (x^1,\ldots,x^n)\ \ $ define Cartesian coordinates on $U$. For $X,Y\in \mathfrak{X}(U),$ $ \ X=X^i\frac{\partial}{\partial x^i},\ Y=Y^i\frac{\partial}{\partial x^i}\ $ define $\ D_XY\in \mathfrak{X}(U)\ $ by
$$D_XY=X(Y^j)\frac{\partial}{\partial x^j}=X^i\frac{\partial Y^j}{\partial x^i}\frac{\partial}{\partial x^j}.$$Thus, each component of the vector field $D_XY$ is the usual directional derivative in $R^n$ of $Y^j$ in the direction of $X$.
The map $$(X,Y)\to D_XY$$
is $R$-linear with respect to $Y$ since
$$X(\alpha Y_1^j+\beta Y_2^j)=\alpha X(Y_1^j)+\beta X(Y_2^j),\quad \text{for } \alpha,\beta\in R.$$It is $C^\infty(U)$ -linear in $X$ since
$$(f_1X_1+f_2X_2)(Y^j)= f_1X_1(Y^j)+f_2X_2(Y^j), \ \text{for } \ f_1,f_2\in C^\infty(U).$$It satisfies the Leibniz rule since
$D_XY(fY)=X(fY^j)\frac{\partial}{\partial x^j}= (Xf)Y^j\frac{\partial}{\partial x^j}+fX(Y^j)\frac{\partial}{\partial x^j} =(Xf)Y+fD_XY.$
The above observations motivate the following definition.
Let $M$ be a smooth manifold. A connection on $M$ assigns to each $X ∈ \mathfrak{X}(M)$ an operator $∇_X$ from $\mathfrak{X}(M)$ into itself, such that for all $X, Y, Z ∈ \mathfrak{X}(M), a, b ∈ R$ and $f ∈ C^∞ (M)$,
\begin{eqnarray} \tag{21.1} &∇_X (aY + bZ) = a∇_X Y + b∇_X Z,\\ \tag{21.2} &∇_X ( f Y) = f ∇_X Y + (X f )Y,\\ \tag{21.3} &∇_{aX+bY} Z = a∇_X Z + b∇_Y Z,\\ \tag{21.4} &∇_{f X} Y = f ∇_X Y. \end{eqnarray}$∇_X Y$ is called the covariant derivative of $Y$ with respect to $X$.
If $\ (x^1 , x^2 , . . . , x^n )\ $ is a coordinate system in some neighborhood $U$ of $M$, and $\ X = X^i \frac{∂}{∂ x^i},\ \ Y = Y^j \frac{∂}{∂ x^j},\ $ then from (21.3),(21.4) it follows
$$\displaystyle \nabla_{X^i\frac{∂}{∂ x^i}}Y=\displaystyle \nabla_{(X^1\frac{∂}{∂ x^1}+\ldots+X^n\frac{∂}{∂ x^n})}Y \stackrel{\text{(3)}}{=}\displaystyle \nabla_{X^1\frac{∂}{∂ x^1}}Y+\ldots+\nabla_{X^n\frac{∂}{∂ x^n}}Y\\ \stackrel{\text{(4)}}{=}\displaystyle X^1\nabla_{\frac{∂}{∂ x^1}}Y+\ldots+X^n\nabla_{\frac{∂}{∂ x^n}}Y =X^i\nabla_{\frac{∂}{∂ x^i}}Y. $$From (21.1),(21.2) we have $$ \nabla_{\frac{∂}{∂ x^i}}Y= \nabla_{\frac{∂}{∂ x^i}}\big(Y^j\frac{∂}{∂ x^j}\big) =\nabla_{\frac{∂}{∂ x^i}}\big(Y^1\frac{∂}{∂ x^1}+\ldots Y^n\frac{∂}{∂ x^n}\big)\\ \stackrel{\text{(1)}}{=}\displaystyle \nabla_{\frac{∂}{∂ x^i}}\big(Y^1\frac{∂}{∂ x^1}\big)+\ldots+ \nabla_{\frac{∂}{∂ x^i}}\big(Y^n\frac{∂}{∂ x^n}\big)$$ $$ \stackrel{\text{(2)}}{=} Y^1\nabla_{\frac{∂}{∂ x^i}}\big(\frac{∂}{∂ x^1}\big)+ \big(\frac{∂}{∂ x^i}Y^1\big)\frac{∂}{∂ x^1}+ \ldots+ Y^n\nabla_{\frac{∂}{∂ x^i}}\big(\frac{∂}{∂ x^n}\big)+ \big(\frac{∂}{∂ x^i}Y^n\big)\frac{∂}{∂ x^n}\\ =Y^j\nabla_{\frac{∂}{∂ x^i}}\frac{∂}{∂ x^j}+ \big(\frac{∂}{∂ x^i}Y^j\big)\frac{∂}{∂ x^j} =\big(\frac{∂}{∂ x^i}Y^j\big)\frac{∂}{∂ x^j} +Y^j\nabla_{\frac{∂}{∂ x^i}}\frac{∂}{∂ x^j}. $$
Thus (21.1)-(21.4) give us
$$ ∇_X Y=X^i\big[\big(\frac{∂}{∂ x^i}Y^j\big)\frac{∂}{∂ x^j} +Y^j\nabla_{\frac{∂}{∂ x^i}}\frac{∂}{∂ x^j}\big]. $$Since $\nabla_{\frac{∂}{∂ x^i}}\frac{∂}{∂ x^j}$ is a smooth vector field, it is a linear combination of the vector fields $\{\frac{∂}{∂ x^k}\}_{k=1}^n$, so there is a set of $n^3$ smooth functions $\displaystyle\Gamma^k_{ji}$ on $U$, such that
\begin{equation} \nabla_{\frac{∂}{∂ x^i}}\frac{∂}{∂ x^j}=\Gamma^k_{ji}\frac{∂}{∂ x^k}. \tag{21.5} \end{equation}Functions $\displaystyle\Gamma^k_{ji}$ which are called Christoffel symbols define the connection in the coordinate system $(x^1,\ldots,x^n)$ since
\begin{equation} \begin{matrix} \displaystyle ∇_X Y=X^i\big[\big(\frac{∂}{∂ x^i}Y^j\big)\frac{∂}{∂ x^j} +Y^j\Gamma^k_{ji}\frac{∂}{∂ x^k}\big]\\ \displaystyle =X^i\big(\frac{∂}{∂ x^i}Y^k+ \Gamma^k_{ji}Y^j\big)\frac{∂}{∂ x^k}. \end{matrix} \tag{21.6} \end{equation}Comparing (21.6) with the definition of the Euclidean connection we see that all Christoffel symbols for the Euclidean connection vanish.
Observe that if in the definition of the Euclidean connection, we put $X=\frac{∂}{∂ x^i}$ and $Y=\frac{∂}{∂ x^j}$, then the components of $Y$ in Cartesian coordinates are $(0,\ldots,1,\ldots,0),\ $ ($1$ on $j$-th position) and $\displaystyle D_{\frac{∂}{∂ x^i}}\frac{∂}{∂ x^j}= \frac{∂}{∂ x^i}(0)\frac{∂}{∂ x^1}+\ldots+ \frac{∂}{∂ x^i}(1)\frac{∂}{∂ x^j}+\ldots+ \frac{∂}{∂ x^i}(0)\frac{∂}{∂ x^n}=0. $
Example 21.1
Consider the two-dimensional half-plane $y>0$ with connection coefficients defined by $\ \ \Gamma^1_{12}=\Gamma^1_{21}=\Gamma^2_{22}=-\frac{1}{y}\ \ $ and $\ \ \Gamma^2_{11}=\frac{1}{y}.$
%display latex
M = Manifold(2, 'M', start_index=1) # manifold M, y>0
c_xy.<x,y> = M.chart() # chart on M
# affine connection on M
nab = M.affine_connection('nabla', r'\nabla') ; print(nab)
Affine connection nabla on the 2-dimensional differentiable manifold M
# Christoffel symbols
nab[1,1,2], nab[1,2,1],nab[2,2,2],nab[2,1,1] = -1/y, -1/y,-1/y,1/y
nab.display(coordinate_labels=False) # only nonzero coefficients
As we can see, only nonzero Christoffel symbols are displayed.
We can force displaying all symbols using only_nonzero=False
switch.
The coordinate_labels=False
switch prevents using coordinate labels instead of indices.
nab.display(coordinate_labels=False,only_nonzero=False)
# display all 2^3=8 Christoffel symbols
If $\gamma:I\to M$ is a smooth curve in a smooth manifold $M$ and $Y$ is a smooth vector field defined on the image of $\gamma$, then the covariant derivative of $Y$ along $\ \gamma$ is the vector field $∇_{\gamma'} Y$ on $\gamma$ defined by
\begin{equation} \displaystyle (∇_{\gamma'} Y)_{\gamma_t } = ∇_{\gamma'_t} Y\quad \text{for } t ∈ I. \tag{21.7} \end{equation}($\gamma'_t$ denotes the tangent vector to $\gamma$ at $t$, defined in (7.6))
Recall that in local coordinates the tangent vector $\gamma'$ can be represented by (cf. (8.10))
$$ \gamma'_{t_0}=\frac{d(x^i\circ \gamma)}{dt}\Big|_{t_0}\frac{\partial}{\partial x^i}\Big|_{\gamma(t_0)}, $$furthermore $$\frac{d(x^i\circ\gamma)}{dt}\Big|_{t}\frac{\partial Y^k}{\partial x^i}\Big|_{\gamma(t)}= \frac{\partial Y^k}{\partial x^i}\Big|_{\gamma(t)} \frac{d(x^i\circ\gamma)}{dt}\Big|_{t} =\frac{d(Y^k\circ\gamma)}{dt}\Big|_t,$$ and consequently \begin{equation} \begin{matrix} \displaystyle ∇_{\gamma'(t)} Y =\frac{d(x^i\circ\gamma)}{dt}\Big|_{t} \Big(\frac{\partial Y^k}{\partial x^i}+\Gamma^k_{ji}Y^j\Big)\Big|_{\gamma(t)}\frac{\partial}{\partial x^k}\Big|_{\gamma(t)}\\ \displaystyle =\Big(\frac{d(Y^k\circ\gamma)}{dt}+\frac{d(x^i\circ\gamma)}{dt}(\Gamma^k_{ji}Y^j)\circ\gamma\Big)\Big|_{t}\frac{\partial}{\partial x^k}\Big|_{\gamma(t)}. \end{matrix} \tag{21.8} \end{equation}
A vector field $Y$ is parallel along the curve $\gamma$ if $∇_{\gamma'}Y = 0.$
$Y$ is parallel along $\gamma$ if and only if its components with respect to the basis $\{\frac{∂}{∂ x^i} \}_{i=1}^n$ satisfy the system of linear (with respect to $Y^k$) differential equations
\begin{equation} \frac{d(Y^k\circ\gamma)}{dt}+\frac{d(x^i\circ\gamma)}{dt}(\Gamma^k_{ji}\circ\gamma)(Y^j\circ\gamma)=0. \tag{21.9} \end{equation}Often we use a simplified form \begin{equation} \frac{dY^k}{dt}+\frac{dx^i}{dt}\Gamma^k_{ji}Y^j=0, \tag{21.9a} \end{equation}
where all functions are restricted to the image of $\gamma$.
For example if $n=2$ we obtain
\begin{equation} \begin{matrix} \frac{dY^1}{dt}+\frac{dx^1}{dt}\Gamma_{1,1}^1Y^1 +\frac{dx^2}{dt}\Gamma_{1,2}^1Y^1 +\frac{dx^1}{dt}\Gamma_{2,1}^1Y^2 +\frac{dx^2}{dt}\Gamma_{2,2}^1Y^2=0,\\ \frac{dY^2}{dt}+\frac{dx^1}{dt}\Gamma_{1,1}^2Y^1 +\frac{dx^2}{dt}\Gamma_{1,2}^2Y^1 +\frac{dx^1}{dt}\Gamma_{2,1}^2Y^2 +\frac{dx^2}{dt}\Gamma_{2,2}^2Y^2=0. \end{matrix} \tag{21.9b} \end{equation}The map $P_{t,t_0} :T_{\gamma(t_0)}M\to T_{\gamma(t)}M$, defined by
$$P_{t,t_0}(Y_0)=Y(\gamma(t)),$$where $Y$ is parallel along $\gamma$ and $Y(\gamma(t_0)) = Y_0$ , is called parallel transport along of $\gamma$ from $\gamma(t_0)$ to $\gamma(t)$.
If $R^2$ is endowed with the connection $Γ_{ij}^k = 0$ for $i, j, k = 1, 2$, then the system (21.9b) takes the form $$ \frac{dY^1}{dt}=0,\\ \frac{dY^2}{dt}=0, $$ i.e., the vector field $Y$ is parallel along $\gamma$ iff $Y$ is constant.
Example 21.2
Consider (again) the connection $\nabla$ on the upper halfplane $U = \{(x, y)\ | \ y > 0\}$ with Christoffel symbols
$$ \begin{matrix} Γ^1_{11}=0,\quad Γ^2_{11}=1/y,\\ Γ^1_{12}= Γ^1_{21}= −1/y,\\ Γ^2_{12}= Γ^2_{21}= 0,\\ Γ^1_{22}= 0,\quad Γ^2_{22}= −1/y. \end{matrix} $$Let us check that along the curve $x=t,\ y=1$, the vector field $\ Y=-\cos t \frac{\partial}{\partial x}+\sin t\frac{\partial}{\partial y}\ $ is parallel.
The system (21.9b) reduces to
\begin{equation} \begin{matrix} \frac{dY^1}{dt}+\frac{dx}{dt}\cdot 0\cdot Y^1 +\frac{dy}{dt}(-\frac{1}{y})Y^1 +\frac{dx}{dt}(-\frac{1}{y})Y^2 +\frac{dy}{dt}\cdot 0\cdot Y^2=0,\\ \frac{dY^2}{dt}+\frac{dx}{dt}(\frac{1}{y})Y^1 +\frac{dy}{dt}\cdot 0\cdot Y^1 +\frac{dx}{dt}\cdot 0\cdot Y^2 +\frac{dy}{dt}(-\frac{1}{y})Y^2=0. \end{matrix} \tag{21.9c} \end{equation}Since $\frac{dx}{dt}=1,\ y=1, \ \frac{dy}{dt}=0$ we obtain \begin{equation} \begin{matrix} \frac{dY^1}{dt}-\frac{1}{y}Y^2=\frac{dY^1}{dt}-Y^2=0,\\ \frac{dY^2}{dt}+\frac{1}{y}Y^1=\frac{dY^2}{dt}+Y^1=0. \end{matrix} \tag{21.9d} \end{equation}
If we put $Y^1=-\cos t, \ Y^2=\sin t,$ then both equations are fulfilled.
Example 21.3
Use Sympy to prove that the vector field $Y$ from the previous example is parallel along the curve from that example.
from sympy import * # import SymPy
init_printing() # SymPy's latex output
%display plain # for Sage's latex display not to interfere with Sympy's one
t=symbols('t') # symbolic variable t
c1=lambda t:t # first component of curve c1(t)
c2=lambda t:1 # second component of curve c2(t)
Y1=lambda t:-cos(t) # first component of Y Y1(t)
Y2=lambda t:sin(t) # second component of Y Y2(t)
# LHS for the first equation (21.9d)
# note that the compositions x^i(gamma(t)), from (21.9) imply
# that x is replaced by c1 and y is replaced by c2
# check the first equation in (21.9d)
Y1(t).diff(t)-1/c2(t)*Y1(t)*c2(t).diff(t)-1/c2(t)*Y2(t)*c1(t).diff(t)
# check the second equation in (21.9d)
Y2(t).diff(t)+1/c2(t)*Y1(t)*c1(t).diff(t)-1/c2(t)*Y2(t)*c2(t).diff(t)
Example 21.4
Solve the system (21.9d) with respect to $Y^1,Y^2\ $ with initial conditions $\ Y^1(0)=-1,\ Y^2(0)=0.$
t = symbols('t') # symbolic variable t
Y1 = Function('Y1') # first component of Y
Y2 = Function('Y2') # second component of Y
ics = {Y1(0): -1,Y2(0):0} # initial conditions
# solve ODE system in Sympy
sol = dsolve([Y1(t).diff(t)-Y2(t),Y2(t).diff(t)+Y1(t)],ics=ics)
sol # show solution
Example 21.5
Let us show graphically that the vector field $Y$ from the previous example realizes the parallel transport of the vector $Y_0$ with components $(-1,0)$ at $(0,1)$ to the vector $Y_1$ with the same components at $(2\pi,1)$ along the curve $x=t,\ y=1,\ t\in [0,2\pi].$
reset()
M = Manifold(2, 'M', start_index=1) # manifold M, y>0
c_xy.<x,y> = M.chart() # chart on M
t = var('t') # symbolic variable t
S = M.curve([t, 1], t) # curve S: x=t, y=1
Y = M.vector_field([-cos(t),sin(t)]) # vector field Y
YS = Y.along(S) # vector field along curve S
graph = S.plot(prange=(0, 2*pi),thickness=3) # plot curve S
graph += YS.plot(c_xy, ranges={t: (0,2*pi)},thickness=3,
arrowsize=1.5,number_values=25,color='grey') # plot vector field
show(graph, ymax=3,ymin=-1) # show plot
Example 21.6
Now take the same $\nabla$ on the upper halfplane but consider the vertical curve $\gamma:\ x=0,\ y=t+1, \ t\in [0,1]$ and the vector field $Y=(t+1)\frac{\partial}{\partial x}.$
First let us check that $Y$ is parallel along $\gamma$.
System (21.9c) takes the form
\begin{equation} \begin{matrix} \frac{dY^1}{dt}-\frac{1}{y}Y^1=0,\\ \frac{dY^2}{dt}-\frac{1}{y}Y^2=0. \end{matrix} \tag{21.9e} \end{equation}from sympy import * # import SymPy
init_printing() # SymPy's latex output
t=var('t') # symbolic variable t
c1=lambda t:0 # first component of the curve
c2=lambda t:1+t # second component of the curve
Y1=lambda t:1+t # first component of Y
Y2=lambda t:0 # second component of Y
Y1(t).diff(t)-1/c2(t)*Y1(t) # LHS of the first equation (21.9e):
Y2(t).diff(t)-1/c2(t)*Y2(t) # LHS of the second equation (21.9e):
Now solve the system (21.9e) (we have restarted the Kernel).
t = symbols('t') # symbolic variable t
Y1 = Function('Y1') # first component of Y
Y2 = Function('Y2') # second component of Y
ics = {Y1(0): 1,Y2(0):0} # initial conditions
# solve system (21.9e)
# y is replaced by c2(t)=t+1
sol = dsolve([Y1(t).diff(t)-1/(t+1)*Y1(t),Y2(t).diff(t)-1/(t+1)*Y2(t)],
ics=ics)
sol # show solution
Example 21.7
Show graphically the vector field $Y$ from the previous example along the curve $x=0,\ y=t+1.$
reset()
%display latex
M = Manifold(2, 'M', start_index=1) # manifold M, y>0
c_xy.<x,y> = M.chart() # chart on M
t = var('t') # symbolic variable t
S = M.curve([ 0,t+1], t) # curve S
Y = M.vector_field([t+1,0]) # vector field Y
YS = Y.along(S) # vector field Y along S
graph = S.plot(prange=(0, 1),thickness=3) # plot S
graph += YS.plot(c_xy, ranges={t: (0,1)}, # plot YS
arrowsize=1.5,number_values=16,color='grey')
show(graph, ymax=2.,ymin=1,xmax=4) # show plot
Example 21.8
Consider the plane $R^2$ with Christoffel symbols $$Γ^1_{11}= Γ^1_{22}=\frac{4u}{1+u^2+4v^2},\\ Γ^2_{11}= Γ^2_{22}=\frac{4v}{1+u^2+4v^2}, $$ and the remaining symbols equal to 0.
reset()
%display latex
N=Manifold(2,name='R2',start_index=1) # manifold M, dim=2
c_uv.<u,v>=N.chart() # coordinates u,v
nab=N.affine_connection('nab') # connection on M
nab[:]=[[[4*u/(4*u^2 + 4*v^2 + 1), 0], # Christoffel symbols
[0, 4*u/(4*u^2 + 4*v^2 + 1)]],
[[4*v/(4*u^2 + 4*v^2 + 1), 0],
[0, 4*v/(4*u^2 + 4*v^2 + 1)]]]
nab.display(coordinate_labels=False,only_nonzero=False)
Assume that the curve $\gamma$ is defined by $\ x=t,\ y=t,\ t\in (0,1)$.
System (21.9b) takes the form
and can be solved with Sympy (with initial conditions $Y^1(0)=1,\ Y^2(0)=0$).
from sympy import *
init_printing()
%display plain
t = symbols('t') # symbolic variable t
w=4*t/(1+8*t**2) # ODE system coefficient
Y1 = Function('Y1') # first component of Y
Y2 = Function('Y2') # second component of Y
ics = {Y1(0):1,Y2(0):0} # initial conditions
sol = dsolve([Y1(t).diff(t) + w*(Y1(t)+Y2(t)), # solve ODE system
Y2(t).diff(t) + w*(Y1(t)+Y2(t))],ics=ics)
list(map(simplify,sol)) # simplify components
Example 21.9
Using the data from the previous example show the parallel transport of the tangent vector at $(0,0)$ with components $(1,0)$ along the curve $x=t, \ y=t, \ t\in [0,1].$
reset()
%display latex
M = Manifold(2, 'M', start_index=1) # manifold M
c_xy.<x,y> = M.chart() # chart on M
t = var('t') # symbolic variable t
S = M.curve([ t,t], t) # curve S
# vector field Y:
Y = M.vector_field([0.5*(1+1/sqrt(1+8*t**2)),0.5*(-1+1/sqrt(1+8*t**2))])
YS = Y.along(S) # vector field Y along S
graph = S.plot(prange=(0, 1),thickness=2) # plot S
graph += YS.plot(c_xy, ranges={t: (0,1)}, # plot YS
arrowsize=1.5,number_values=11,color='grey')
show(graph, ymax=1.1,ymin=0,xmax=2,figsize=[4,3]) # show plot
Remark. In many examples, the exact solutions to ODE systems are not accessible.
Fortunately, the same figure as in previous example can be obtained, solving the system numerically.
Example 21.10
Use numerical tools to obtain the figure from the previous example.
First we check that the connection coefficients from the previous example correspond to an elliptic paraboloid.
%display plain
u, v = var('u, v', domain='real')
eparaboloid = ParametrizedSurface3D([u, v, u^2+v^2], [u, v],
'elliptic paraboloid')
eparaboloid.connection_coefficients()
{(1, 1, 1): 4*u/(4*u^2 + 4*v^2 + 1), (1, 1, 2): 4*v/(4*u^2 + 4*v^2 + 1), (1, 2, 1): 0, (1, 2, 2): 0, (2, 1, 1): 0, (2, 1, 2): 0, (2, 2, 1): 4*u/(4*u^2 + 4*v^2 + 1), (2, 2, 2): 4*v/(4*u^2 + 4*v^2 + 1)}
Now we can use the method
eparaboloid.parallel_translation_numerical(curve, t, v0, tinterval)
.
In the above command
curve
=[x(t),y(t)] can be replaced for example by [s,s],
t
by s,
v0
by [1.0,1.0],
and tinterval
=[t_0,t_1,number_of_subintervals] by [0.0, 1.0, 9].
Use the command eparaboloid.parallel_translation_numerical?
to obtain more information.
s = var('s') # symbolic variable
vector_field = eparaboloid.parallel_translation_numerical([s,s],s,
[1.0,0.0],[0.0, 1.0, 9]) # numerical parallel translations
times, components = zip(*vector_field) # list of t_i and Y_i
vec=[vector(v) for v in components] # vectors corresponding to Y_i
strt=[vector([t,t]) for t in times] # vector of points on the curve
p=plot(s,(s,0,1),thickness=2,color='red') # plot the curve in red
pl=sum([plot(vec[k],start=strt[k],arrowsize=1.5, color='grey')
for k in range(10)]) # plot all vectors Y_i
(p+pl).show(xmax=2,ymin =-0.2,figsize=[4,3]) # combine plots
Let us note that the values of the compositions $\Gamma_{ij}^k\circ\gamma$ in the above calculations are cached, and can be used for example in symbolic computations:
# after above calculations the same command gives different result
eparaboloid.connection_coefficients()
{(1, 1, 1): 4*s/(8*s^2 + 1), (1, 1, 2): 4*s/(8*s^2 + 1), (1, 2, 1): 0, (1, 2, 2): 0, (2, 1, 1): 0, (2, 1, 2): 0, (2, 2, 1): 4*s/(8*s^2 + 1), (2, 2, 2): 4*s/(8*s^2 + 1)}
Remark. In previous examples we have used linear functions to define $\gamma$. If the numerical approach is used we can try more complicated curves.
Example 21.11
Let us investigate the parallel transport from the previous example but along the curve $x=t,\ y=t^2, \ t\in [0,1]$.
u, v = var('u, v', domain='real') # symbolic variables for surf. param.
eparaboloid = ParametrizedSurface3D([u, v, u^2+v^2], [u, v],
'elliptic paraboloid') # elliptic paraboloid - parametric def.
s = var('s') # parameter of curve
vector_field = eparaboloid.parallel_translation_numerical([s,s^2],s,
[1.0,0.0],[0.0, 1.0, 9]) # compute parallel translations Y_i of Y_0
# for i=1,...,9
times, components = zip(*vector_field) # list of t_i and Y_i, i=0,...,9
vec=[vector(v) for v in components] # vectors corresponding to lists Y_i
strt=[vector([t,t^2]) for t in times] # vector of points on the curve
p=plot(s^2,(s,0,1),thickness=2,color='red') # plot curve
pl=sum([plot(vec[k],start=strt[k],arrowsize=1.5,color='grey')
for k in range(10)]) # plot all vectors Y_i
(p+pl).show(xmax=2,ymin =-0.2,figsize=[4,3]) # combine plots
Remark. This time the symbols $\Gamma_{ij}^k\circ\gamma$ are more complicated:
%display plain
eparaboloid.connection_coefficients()
{(1, 1, 1): 4*s/(4*s^4 + 4*s^2 + 1), (1, 1, 2): 4*s^2/(4*s^4 + 4*s^2 + 1), (1, 2, 1): 0, (1, 2, 2): 0, (2, 1, 1): 0, (2, 1, 2): 0, (2, 2, 1): 4*s/(4*s^4 + 4*s^2 + 1), (2, 2, 2): 4*s^2/(4*s^4 + 4*s^2 + 1)}
Example 21.12
Show how the equations (21.9b) of the parallel vector field along a curve can be obtained in SageMath Manifolds for a concrete parametric surface in and concrete curve.
then the right hand sides can be obtained as follows (we use the symmetry of connection coefficients for parametrized surfaces in $R^3$).
u, v = var('u, v', domain='real') # parameters of surface
epar = ParametrizedSurface3D([u, v, u^2+v^2], [u, v],
'elliptic paraboloid') # definition of surface
t=var('t') # parameter of curve
curve=[t,t^2] # definition of curve
surf=epar # renaming of surface
u1 = surf.variables[1] # extract the parameters
u2 = surf.variables[2] # from the surf object
du1 = diff(curve[0], t) # derivatives of
du2 = diff(curve[1], t) # curve components
C = surf.connection_coefficients() # connection coefficients
for coef in C: # compositions of connection coeff
C[coef] = C[coef].subs({u1: curve[0], u2: curve[1]})
# with curve components
Y1,Y2=var('Y1 Y2') # symbolic variables for Y components
# RHS for the first equation:
F1 = - C[(1,1,1)]*Y1*du1 - C[(1,2,1)]*(du1*Y2 + du2*Y1) - \
C[(2,2,1)]*du2*Y2
# RHS for the second equation
F2 = - C[(1,1,2)]*Y1*du1 - C[(1,2,2)]*(du1*Y2 + du2*Y1) - \
C[(2,2,2)]*du2*Y2
Thus the right hand sides of equations for parallel transport on the surface $\ \ z=u^2+v^2\ \ $ along the curve $\ u=t,\ v=t^2,\ $ are:
%display latex
F1
F2
Example 21.13
Make a three-dimensional illustration for parallel transport on the surface $\ \ z=u^2+v^2\ \ $ along the curves $\ u=t,\ v=t,\ $ and $\ u=t,\ v=t^2.\ $
Since the connection from the last example corresponds to the parametrized surface $z=u^2+v^2$ we are able to make a 3d illustration of the parallel transport.
First the case of the curve $x=t, y=t$:
u, v = var('u, v', domain='real') # parameters of surface
epar = ParametrizedSurface3D([u, v, u^2+v^2], [u, v],
'elliptic paraboloid') # definition of surface
s = var('s') # parameter of curve
# numerical parallel transport:
vector_field = epar.parallel_translation_numerical([s,s],s,
[1.0, 0.0], [0.0, 1.0, 9]) # compute parallel transport Y_i
# of Y_0 for i=1,..,9
times, comp = zip(*vector_field) # list of s_i and Y_i, i=0,...,9
# plot obtained vectors:
pl=sum([plot(vector(epar.tangent_vector((times[k],times[k]),
(comp[k][0], comp[k][1]))),
start=vector((times[k],times[k],times[k]^2+times[k]^2)),color='black',thickness=2)
for k in range(8)])
# plot the curve:
p=parametric_plot3d((s,s,s^2+s^2),(s,0,0.88),thickness=4,color='red')
var('r phi') # polar surface parameters
# plot surface:
p1=parametric_plot3d((r*cos(phi),r*sin(phi),r^2),(r,0,1.45),(phi,0,2*pi),
opacity=0.8, color='lightgrey')
# combine plots:
(pl+p+p1).rotateZ(-1.85*pi).rotateY(0.5).rotateX(-0.65).show(frame=False)
# enlarge to obtain a better view