Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
sagemanifolds
GitHub Repository: sagemanifolds/IntroToManifolds
Path: blob/main/21Manifold_Connection.ipynb
Views: 80
Kernel: SageMath 9.6

21. Connection

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 MM, is a rule to calculate the directional derivatives of the vector fields on MM. If XX and YY are two vector fields, XY∇_X Y denotes the vector field whose value at each point pMp ∈ M is equal to the directional derivative of YY in the direction of XpX_p .


Euclidean connection in URnU\subset R^n


Let URnU\subset R^n be an open subset and   (x1,,xn)  \ \ (x^1,\ldots,x^n)\ \ define Cartesian coordinates on UU. For X,YX(U),X,Y\in \mathfrak{X}(U),  X=Xixi, Y=Yixi  \ X=X^i\frac{\partial}{\partial x^i},\ Y=Y^i\frac{\partial}{\partial x^i}\ define  DXYX(U) \ D_XY\in \mathfrak{X}(U)\ by

DXY=X(Yj)xj=XiYjxixj.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 DXYD_XY is the usual directional derivative in RnR^n of YjY^j in the direction of XX.

The map (X,Y)DXY(X,Y)\to D_XY

is RR-linear with respect to YY since

X(αY1j+βY2j)=αX(Y1j)+βX(Y2j),for α,βR.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(U)C^\infty(U) -linear in XX since

(f1X1+f2X2)(Yj)=f1X1(Yj)+f2X2(Yj), for  f1,f2C(U).(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

DXY(fY)=X(fYj)xj=(Xf)Yjxj+fX(Yj)xj=(Xf)Y+fDXY.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.


Affine connection in a manifold


The above observations motivate the following definition.

Let MM be a smooth manifold. A connection on MM assigns to each XX(M)X ∈ \mathfrak{X}(M) an operator X∇_X from X(M)\mathfrak{X}(M) into itself, such that for all X,Y,ZX(M),a,bRX, Y, Z ∈ \mathfrak{X}(M), a, b ∈ R and fC(M)f ∈ C^∞ (M),

ParseError: KaTeX parse error: Multiple \tag

XY∇_X Y is called the covariant derivative of YY with respect to XX.

If  (x1,x2,...,xn) \ (x^1 , x^2 , . . . , x^n )\ is a coordinate system in some neighborhood UU of MM, and  X=Xixi,  Y=Yjxj, \ X = X^i \frac{∂}{∂ x^i},\ \ Y = Y^j \frac{∂}{∂ x^j},\ then from (21.3),(21.4) it follows

XixiY=(X1x1++Xnxn)Y=(3)X1x1Y++XnxnY=(4)X1x1Y++XnxnY=XixiY.\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 xiY=xi(Yjxj)=xi(Y1x1+Ynxn)=(1)xi(Y1x1)++xi(Ynxn) \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) =(2)Y1xi(x1)+(xiY1)x1++Ynxi(xn)+(xiYn)xn=Yjxixj+(xiYj)xj=(xiYj)xj+Yjxixj. \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

XY=Xi[(xiYj)xj+Yjxixj].∇_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 xixj\nabla_{\frac{∂}{∂ x^i}}\frac{∂}{∂ x^j} is a smooth vector field, it is a linear combination of the vector fields {xk}k=1n\{\frac{∂}{∂ x^k}\}_{k=1}^n, so there is a set of n3n^3 smooth functions Γjik\displaystyle\Gamma^k_{ji} on UU, such that

xixj=Γjikxk.\begin{equation} \nabla_{\frac{∂}{∂ x^i}}\frac{∂}{∂ x^j}=\Gamma^k_{ji}\frac{∂}{∂ x^k}. \tag{21.5} \end{equation}

Functions Γjik\displaystyle\Gamma^k_{ji} which are called Christoffel symbols define the connection in the coordinate system (x1,,xn)(x^1,\ldots,x^n) since

XY=Xi[(xiYj)xj+YjΓjikxk]=Xi(xiYk+ΓjikYj)xk.\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=xiX=\frac{∂}{∂ x^i} and Y=xjY=\frac{∂}{∂ x^j}, then the components of YY in Cartesian coordinates are (0,,1,,0), (0,\ldots,1,\ldots,0),\ (11 on jj-th position) and Dxixj=xi(0)x1++xi(1)xj++xi(0)xn=0.\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>0y>0 with connection coefficients defined by   Γ121=Γ211=Γ222=1y  \ \ \Gamma^1_{12}=\Gamma^1_{21}=\Gamma^2_{22}=-\frac{1}{y}\ \ and   Γ112=1y.\ \ \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

Γ112112=1yΓ121121=1yΓ211211=1yΓ222222=1y\displaystyle \begin{array}{lcl} \Gamma_{\phantom{\, 1}\,1\,2}^{\,1\phantom{\, 1}\phantom{\, 2}} & = & -\frac{1}{y} \\ \Gamma_{\phantom{\, 1}\,2\,1}^{\,1\phantom{\, 2}\phantom{\, 1}} & = & -\frac{1}{y} \\ \Gamma_{\phantom{\, 2}\,1\,1}^{\,2\phantom{\, 1}\phantom{\, 1}} & = & \frac{1}{y} \\ \Gamma_{\phantom{\, 2}\,2\,2}^{\,2\phantom{\, 2}\phantom{\, 2}} & = & -\frac{1}{y} \end{array}

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

Γ111111=0Γ112112=1yΓ121121=1yΓ122122=0Γ211211=1yΓ212212=0Γ221221=0Γ222222=1y\displaystyle \begin{array}{lcl} \Gamma_{\phantom{\, 1}\,1\,1}^{\,1\phantom{\, 1}\phantom{\, 1}} & = & 0 \\ \Gamma_{\phantom{\, 1}\,1\,2}^{\,1\phantom{\, 1}\phantom{\, 2}} & = & -\frac{1}{y} \\ \Gamma_{\phantom{\, 1}\,2\,1}^{\,1\phantom{\, 2}\phantom{\, 1}} & = & -\frac{1}{y} \\ \Gamma_{\phantom{\, 1}\,2\,2}^{\,1\phantom{\, 2}\phantom{\, 2}} & = & 0 \\ \Gamma_{\phantom{\, 2}\,1\,1}^{\,2\phantom{\, 1}\phantom{\, 1}} & = & \frac{1}{y} \\ \Gamma_{\phantom{\, 2}\,1\,2}^{\,2\phantom{\, 1}\phantom{\, 2}} & = & 0 \\ \Gamma_{\phantom{\, 2}\,2\,1}^{\,2\phantom{\, 2}\phantom{\, 1}} & = & 0 \\ \Gamma_{\phantom{\, 2}\,2\,2}^{\,2\phantom{\, 2}\phantom{\, 2}} & = & -\frac{1}{y} \end{array}


Covariant derivative along a curve


If γ:IM\gamma:I\to M is a smooth curve in a smooth manifold MM and YY is a smooth vector field defined on the image of γ\gamma, then the covariant derivative of YY along  γ\ \gamma is the vector field γY∇_{\gamma'} Y on γ\gamma defined by

(γY)γt=γtYfor tI.\begin{equation} \displaystyle (∇_{\gamma'} Y)_{\gamma_t } = ∇_{\gamma'_t} Y\quad \text{for } t ∈ I. \tag{21.7} \end{equation}

(γt\gamma'_t denotes the tangent vector to γ\gamma at tt, defined in (7.6))

Recall that in local coordinates the tangent vector γ\gamma' can be represented by (cf. (8.10))

γt0=d(xiγ)dtt0xiγ(t0),\gamma'_{t_0}=\frac{d(x^i\circ \gamma)}{dt}\Big|_{t_0}\frac{\partial}{\partial x^i}\Big|_{\gamma(t_0)},

furthermore d(xiγ)dttYkxiγ(t)=Ykxiγ(t)d(xiγ)dtt=d(Ykγ)dtt,\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 γ(t)Y=d(xiγ)dtt(Ykxi+ΓjikYj)γ(t)xkγ(t)=(d(Ykγ)dt+d(xiγ)dt(ΓjikYj)γ)txkγ(t).\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}


Vector field parallel along a curve


A vector field YY is parallel along the curve γ\gamma if γY=0.∇_{\gamma'}Y = 0.

YY is parallel along γ\gamma if and only if its components with respect to the basis {xi}i=1n\{\frac{∂}{∂ x^i} \}_{i=1}^n satisfy the system of linear (with respect to YkY^k) differential equations

d(Ykγ)dt+d(xiγ)dt(Γjikγ)(Yjγ)=0.\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 dYkdt+dxidtΓjikYj=0,\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=2n=2 we obtain

dY1dt+dx1dtΓ1,11Y1+dx2dtΓ1,21Y1+dx1dtΓ2,11Y2+dx2dtΓ2,21Y2=0,dY2dt+dx1dtΓ1,12Y1+dx2dtΓ1,22Y1+dx1dtΓ2,12Y2+dx2dtΓ2,22Y2=0.\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 Pt,t0:Tγ(t0)MTγ(t)MP_{t,t_0} :T_{\gamma(t_0)}M\to T_{\gamma(t)}M, defined by

Pt,t0(Y0)=Y(γ(t)),P_{t,t_0}(Y_0)=Y(\gamma(t)),

where YY is parallel along γ\gamma and Y(γ(t0))=Y0Y(\gamma(t_0)) = Y_0 , is called parallel transport along of γ\gamma from γ(t0)\gamma(t_0) to γ(t)\gamma(t).

If R2R^2 is endowed with the connection Γijk=0Γ_{ij}^k = 0 for i,j,k=1,2i, j, k = 1, 2, then the system (21.9b) takes the form dY1dt=0,dY2dt=0, \frac{dY^1}{dt}=0,\\ \frac{dY^2}{dt}=0, i.e., the vector field YY is parallel along γ\gamma iff YY is constant.


Example 21.2

Consider (again) the connection \nabla on the upper halfplane U={(x,y)  y>0}U = \{(x, y)\ | \ y > 0\} with Christoffel symbols

Γ111=0,Γ112=1/y,Γ121=Γ211=1/y,Γ122=Γ212=0,Γ221=0,Γ222=1/y.\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=1x=t,\ y=1, the vector field  Y=costx+sinty \ Y=-\cos t \frac{\partial}{\partial x}+\sin t\frac{\partial}{\partial y}\ is parallel.


The system (21.9b) reduces to

dY1dt+dxdt0Y1+dydt(1y)Y1+dxdt(1y)Y2+dydt0Y2=0,dY2dt+dxdt(1y)Y1+dydt0Y1+dxdt0Y2+dydt(1y)Y2=0.\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 dxdt=1, y=1, dydt=0\frac{dx}{dt}=1,\ y=1, \ \frac{dy}{dt}=0 we obtain dY1dt1yY2=dY1dtY2=0,dY2dt+1yY1=dY2dt+Y1=0.\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 Y1=cost, Y2=sint,Y^1=-\cos t, \ Y^2=\sin t, then both equations are fulfilled.


Example 21.3

Use Sympy to prove that the vector field YY 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)

0\displaystyle 0

# 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)

0\displaystyle 0


Example 21.4

Solve the system (21.9d) with respect to Y1,Y2 Y^1,Y^2\ with initial conditions  Y1(0)=1, Y2(0)=0.\ 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

[Y1(t)=cos(t), Y2(t)=sin(t)]\displaystyle \left[ \operatorname{Y_{1}}{\left(t \right)} = - \cos{\left(t \right)}, \ \operatorname{Y_{2}}{\left(t \right)} = \sin{\left(t \right)}\right]


Example 21.5

Let us show graphically that the vector field YY from the previous example realizes the parallel transport of the vector Y0Y_0 with components (1,0)(-1,0) at (0,1)(0,1) to the vector Y1Y_1 with the same components at (2π,1)(2\pi,1) along the curve x=t, y=1, t[0,2π].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
Image in a Jupyter notebook



Example 21.6

Now take the same \nabla on the upper halfplane but consider the vertical curve γ: x=0, y=t+1, t[0,1]\gamma:\ x=0,\ y=t+1, \ t\in [0,1] and the vector field Y=(t+1)x.Y=(t+1)\frac{\partial}{\partial x}.


First let us check that YY is parallel along γ\gamma.

System (21.9c) takes the form

dY1dt1yY1=0,dY2dt1yY2=0.\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):

0\displaystyle 0

Y2(t).diff(t)-1/c2(t)*Y2(t) # LHS of the second equation (21.9e):

0\displaystyle 0

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

[Y1(t)=t+1, Y2(t)=0]\displaystyle \left[ \operatorname{Y_{1}}{\left(t \right)} = t + 1, \ \operatorname{Y_{2}}{\left(t \right)} = 0\right]


Example 21.7

Show graphically the vector field YY from the previous example along the curve x=0, y=t+1.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
Image in a Jupyter notebook

Example 21.8

Consider the plane R2R^2 with Christoffel symbols Γ111=Γ221=4u1+u2+4v2,Γ112=Γ222=4v1+u2+4v2,Γ^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)

Γ111111=4u4u2+4v2+1Γ112112=0Γ121121=0Γ122122=4u4u2+4v2+1Γ211211=4v4u2+4v2+1Γ212212=0Γ221221=0Γ222222=4v4u2+4v2+1\displaystyle \begin{array}{lcl} \Gamma_{\phantom{\, 1}\,1\,1}^{\,1\phantom{\, 1}\phantom{\, 1}} & = & \frac{4 \, u}{4 \, u^{2} + 4 \, v^{2} + 1} \\ \Gamma_{\phantom{\, 1}\,1\,2}^{\,1\phantom{\, 1}\phantom{\, 2}} & = & 0 \\ \Gamma_{\phantom{\, 1}\,2\,1}^{\,1\phantom{\, 2}\phantom{\, 1}} & = & 0 \\ \Gamma_{\phantom{\, 1}\,2\,2}^{\,1\phantom{\, 2}\phantom{\, 2}} & = & \frac{4 \, u}{4 \, u^{2} + 4 \, v^{2} + 1} \\ \Gamma_{\phantom{\, 2}\,1\,1}^{\,2\phantom{\, 1}\phantom{\, 1}} & = & \frac{4 \, v}{4 \, u^{2} + 4 \, v^{2} + 1} \\ \Gamma_{\phantom{\, 2}\,1\,2}^{\,2\phantom{\, 1}\phantom{\, 2}} & = & 0 \\ \Gamma_{\phantom{\, 2}\,2\,1}^{\,2\phantom{\, 2}\phantom{\, 1}} & = & 0 \\ \Gamma_{\phantom{\, 2}\,2\,2}^{\,2\phantom{\, 2}\phantom{\, 2}} & = & \frac{4 \, v}{4 \, u^{2} + 4 \, v^{2} + 1} \end{array}

Assume that the curve γ\gamma is defined by  x=t, y=t, t(0,1)\ x=t,\ y=t,\ t\in (0,1).

System (21.9b) takes the form

dY1dt+4t1+8t2(Y1+Y2)=0,dY2dt+4t1+8t2(Y1+Y2)=0.\frac{dY^1}{dt}+\frac{4t}{1+8t^2}(Y^1+Y^2)=0,\\ \frac{dY^2}{dt}+\frac{4t}{1+8t^2}(Y^1+Y^2)=0.

and can be solved with Sympy (with initial conditions Y1(0)=1, Y2(0)=0Y^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

[Y1(t)=12+128t2+1, Y2(t)=12+128t2+1]\displaystyle \left[ \operatorname{Y_{1}}{\left(t \right)} = \frac{1}{2} + \frac{1}{2 \sqrt{8 t^{2} + 1}}, \ \operatorname{Y_{2}}{\left(t \right)} = - \frac{1}{2} + \frac{1}{2 \sqrt{8 t^{2} + 1}}\right]


Example 21.9

Using the data from the previous example show the parallel transport of the tangent vector at (0,0)(0,0) with components (1,0)(1,0) along the curve x=t, y=t, t[0,1].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
Image in a Jupyter notebook

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
Image in a Jupyter notebook

Let us note that the values of the compositions Γijkγ\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=t2, t[0,1]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
Image in a Jupyter notebook

Remark. This time the symbols Γijkγ\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.


If the equations (21.9b) of the parallel transport system are written in the form
dY1dt=F1(Y1,Y2),  dY1dt=F1(Y1,Y2),\frac{dY^1}{dt}=F^1(Y^1,Y^2),\ \ \frac{dY^1}{dt}=F^1(Y^1,Y^2),

then the right hand sides can be obtained as follows (we use the symmetry of connection coefficients for parametrized surfaces in R3R^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=u2+v2  \ \ z=u^2+v^2\ \ along the curve  u=t, v=t2, \ u=t,\ v=t^2,\ are:

%display latex F1

8Y2t24t4+4t2+14Y1t4t4+4t2+1\displaystyle -\frac{8 \, Y_{2} t^{2}}{4 \, t^{4} + 4 \, t^{2} + 1} - \frac{4 \, Y_{1} t}{4 \, t^{4} + 4 \, t^{2} + 1}

F2

8Y2t34t4+4t2+14Y1t24t4+4t2+1\displaystyle -\frac{8 \, Y_{2} t^{3}}{4 \, t^{4} + 4 \, t^{2} + 1} - \frac{4 \, Y_{1} t^{2}}{4 \, t^{4} + 4 \, t^{2} + 1}


Example 21.13

Make a three-dimensional illustration for parallel transport on the surface   z=u2+v2  \ \ z=u^2+v^2\ \ along the curves  u=t, v=t, \ u=t,\ v=t,\ and  u=t, v=t2. \ u=t,\ v=t^2.\


Since the connection from the last example corresponds to the parametrized surface z=u2+v2z=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=tx=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