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

18. Integral curves

This notebook is part of the Introduction to manifolds in SageMath by Andrzej Chrzeszczyk (Jan Kochanowski University of Kielce, Poland).

'SageMath version 9.6, Release Date: 2022-05-15'

Let XX be a vector field on a smooth manifold MM. A curve γ:IM\gamma : I → M is an integral curve of X\mathbf{X} if

γt=Xγ(t), for tI.\begin{equation} \displaystyle \gamma'_t = X_{\gamma(t)} , \mbox{ for } t ∈ I. \tag{18.1} \end{equation}

Let us recall that γt \gamma'_t\ is the tangent vector to γ\gamma at tt (defined in (8.9)).

If γ(0)=xM\gamma(0) = x\in M, we say that the curve γ\gamma starts at xx.

Let ϕ be a one-parameter group of transformations on MM (defined in a previous notebook) and let XX be its infinitesimal generator. If we put y=ϕt0(x)=ϕ(x,t0)y = ϕ_{t_0} (x) = ϕ(x, t_0 ), we get

ϕy(t)=ϕ(y,t)=ϕ(ϕ(x,t0),t)=ϕ(x,t0+t)=ϕx(t0+t).ϕ_y (t) = ϕ(y, t) = ϕ(ϕ(x, t_0 ), t) = ϕ(x, t_0 + t) = ϕ_x (t_0 + t).

The tangent vector to the curve ϕy\phi_y at t=0t=0 satisfies (ϕy)0(f)=ddt(f(ϕy(t)))t=0=ddt(f(ϕx(t+t0)))t=0=dds(f(ϕx(s)))s=t0=(ϕx)t0(f),(ϕ_y )'_0 ( f ) =\frac{d}{dt}(f (ϕ_y (t)))\Big|_{t=0}= \frac{d}{dt}(f (ϕ_x (t+t_0)))\Big|_{t=0}= \frac{d}{ds}(f (ϕ_x (s)))\Big|_{s=t_0}=(ϕ_x)'_{t_0} ( f ),
for any fC(M)f ∈ C^∞ (M), and therefore (ϕx)t0=(ϕy)0=Xy=Xϕx(t0)(ϕ_x )'_{t_0} = (ϕ_y )'_0 = X_y = X_{ ϕ_x (t_0 )}.

We have checked that:
if y=ϕx(t0)y = ϕ_x (t_0 ), for some t0Rt_0 ∈ R then (ϕx)t0=(ϕy)0(ϕ_x )'_{t_0} = (ϕ_y )'_0 and, therefore, (ϕx)t0=Xϕx(t0)(ϕ_x )'_{t_0} = X_{ϕ_x (t_0 )} ; that is, the tangent vector to the curve ϕxϕ_x, at any point of the curve, coincides with the value of the infinitesimal generator of ϕ at that point.

Thus if ϕϕ is a one-parameter group of transformations and XX is its infinitesimal generator, then the curve ϕxϕ_x is an integral curve of X that starts at xx.

Let us recall that if ϕ=(x1,,xn)\phi=(x^1,\ldots,x^n) are local coordinates on a smooth manifold MM, γ\gamma is a smooth curve in MM, then from (8.10) it follows γt=ddt(xiγ)txiγ(t).\gamma'_t=\frac{d}{dt}(x^i\circ\gamma)\Big|_t\frac{\partial}{\partial x^i}\Big|_{\gamma(t)}.

Since from   (Xf)(p)=Xp(f) \ \ (Xf)(p)=X_p(f)\ we obtain X(xi)(γ(t))=Xγ(t)(xi)X(x^i)(\gamma(t))=X_{\gamma(t)}(x^i), then by (8.5) the right hand side of (18.1) can be written as Xγ(t)=Xγ(t)(xi)xiγ(t)=X(xi)(γ(t))xiγ(t)=(Xiγ)(t)xiγ(t),X_{\gamma(t)} = X_{\gamma(t)}(x^i)\frac{∂}{∂ x^i}\Big|_{\gamma(t)}= X(x^i)(\gamma(t)) \frac{∂}{∂ x^i}\Big|_{\gamma(t)}= (X^i\circ\gamma)(t) \frac{∂}{∂ x^i}\Big|_{\gamma(t)}, where Xi=X(xi).X^i=X(x^i).
The last two equations imply, that the integral curves γ\gamma of XX defined by (18.1) satisfy the system of ordinary differential equations ddt(xiγ)=Xiγ,i=1,,n.\begin{equation} \frac{d}{dt}(x^i\circ\gamma)=X^i\circ\gamma,\quad i=1,\ldots,n. \tag{18.2} \end{equation}

The right-hand side of (18.2) ca be written in the form (Xiγ)(t)=(Xiφ1)φ(γ(t))=(Xiφ1)(x1(γ(t)),...,xn(γ(t)))=(Xiφ1)((x1γ)(t),...,(xnγ)(t)), (X^i ◦ \gamma)(t) = (X^i ◦ φ^{−1} ) φ(\gamma(t))\\ = (X^i ◦ φ^{−1} ) (x^1 (\gamma(t)), . . . , x^n (\gamma(t)))\\ = (X^i ◦ φ^{−1} ) ((x^1 ◦ \gamma)(t),..., (x^n ◦ \gamma)(t)), so (18.2) is equivalent to d(xiγ)dt=(Xiφ1)(x1γ,...,xnγ).\begin{equation} \frac{d(x^i\circ\gamma)}{dt}= (X^i ◦ φ^{−1} )(x^1 ◦ \gamma, . . . , x^n ◦ \gamma). \tag{18.3} \end{equation} If we put fi=Xiφ1f^i = X^i ◦ φ^{−1} and replace xiγx^i ◦ \gamma by xix^i we obtain the simplified form of the system (18.3) dxidt=fi(x1,,xn),i=1,,n.\begin{equation} \frac{dx^i}{dt}=f^i(x^1,\ldots,x^n),\quad i=1,\ldots,n. \tag{18.4} \end{equation}

For a smooth vector field XX, on a smooth manifold MM, given xMx\in M there exist a unique integral curve γ\gamma of the vector field XX starting at xx, defined in some interval IRI\subset R. Define

ϕ(x,t)=γ(t).\begin{equation} \phi(x,t)=\gamma(t). \tag{18.5} \end{equation}

We want to check that **if the integral curves of XX are defined for all tRt\in R, then ϕ\phi is a one-parameter group of transformations**.

Consider the curve χ\chi defined by χ(t)=γ(t+s),sfixed.\chi(t)=\gamma(t+s),\quad s-\mbox{fixed}. The curve χ\chi is an integral curve of XX, since for fC(M)f\in C^\infty(M)

χt(f)=d(fχ)dtt=limh0f(χ(t+h))f(χ(t))h=limh0f(γ(t+h+s))f(γ(t+s))h=γt+s(f)=Xγ(t+s)(f)=Xχ(t)(f).\chi'_t(f)=\frac{d(f\circ\chi)}{dt}\Big|_t =\lim_{h\to 0}\frac{f(\chi(t+h))-f(\chi(t))}{h}\\ =\lim_{h\to 0}\frac{f(\gamma(t+h+s))-f(\gamma(t+s))}{h} =\gamma'_{t+s}(f)=X_{\gamma(t+s)}(f)=X_{\chi(t)}(f).

The curve χ\chi starts at χ(0)=γ(s)\chi(0)=\gamma(s) and the curve ϕ(γ(s),t)\phi(\gamma(s),t) also starts at γ(s)\gamma(s). By the uniqueness of the integral curves of smooth vector fields we have

χ(t)=ϕ(γ(s),t)=ϕ(ϕ(x,s),t).\chi(t)=\phi(\gamma (s),t)=\phi(\phi(x,s),t).

We have also χ(t)=γ(t+s)=ϕ(x,t+s), \chi(t)=\gamma(t+s)=\phi(x,t+s), so ϕ(ϕ(x,s),t)=ϕ(x,t+s).\begin{equation} \phi(\phi(x,s),t)=\phi(x,t+s). \tag{18.6} \end{equation}

Thus ϕ\phi defines a one-parameter group of transformations.

Example 18.1

For  X=yx+xy\ X=y\frac{\partial}{\partial x}+x\frac{\partial}{\partial y}, the system (18.4) takes the form dxdt=y,dydt=x.\frac{dx}{dt}=y,\quad \frac{dy}{dt}=x.

Let us solve the system with Sympy.

from sympy import * # import Sympy init_printing() # use latex to output results t,x0,y0 = symbols('t,x0,y0') # Sympy variables x = Function('x') # Sympy function x(t) y = Function('y') # Sympy function y(t) ics = {x(0): x0,y(0):y0} # initial conditions # solve ODE system in Sympy: sol = dsolve([x(t).diff(t)-y(t), y(t).diff(t) -x(t)],ics=ics) import sympy # "sympy" not defined previously (sol[0].rhs).rewrite(sympy.sin).simplify() # use Sympy rewrite method # to simplify first component

x0cosh(t)+y0sinh(t)\displaystyle x_{0} \cosh{\left(t \right)} + y_{0} \sinh{\left(t \right)}

(first component of the solution),

(sol[1].rhs).rewrite(sympy.sin).simplify() # do the same for second comp.

x0sinh(t)+y0cosh(t)\displaystyle x_{0} \sinh{\left(t \right)} + y_{0} \cosh{\left(t \right)}

(second component).

Example 18.2

Check, that the integral curves from previous example define one-parameter group of transformations.

Let us define the components of the one-parameter group of transformations ϕ\phi corresponding to the vector field

X=(𝑥0cosh(𝑡)+𝑦0sinh(𝑡))x+(𝑥0sinh(𝑡)+𝑦0cosh(𝑡))yX=(𝑥_0\cosh(𝑡)+𝑦_0\sinh(𝑡))\frac{\partial}{\partial x} +(𝑥_0\sinh(𝑡)+𝑦_0\cosh(𝑡))\frac{\partial}{\partial y}

from the previous example, using (18.5):

reset() var('t,s,x,y') # symbolic variables # \phi[Tab] gives the greek letter phi ϕ1(x,y,t)=x*cosh(t) + y*sinh(t) # define ϕ1 ϕ2(x,y,t)=x*sinh(t) + y*cosh(t) # define ϕ2

Now let us compute the difference between the right and left hand sides of the first components of (18.6):

a1=ϕ1(x,y,t+s).trig_expand().expand() # right hand side of (18.6) for ϕ1 b1=ϕ1(ϕ1(x,y,t),ϕ2(x,y,t),s).expand() # left hand side of (18.6) for ϕ1 a1-b1 # rhs-lhs

The same for the second components:

a2=ϕ2(x,y,t+s).trig_expand().expand() # right hand side of (18.6) for ϕ2 b2=ϕ2(ϕ1(x,y,t),ϕ2(x,y,t),s).expand() # left hand side of (18.6) for ϕ2 a2-b2 # rhs-lhs

We have checked that (18.6) is fulfilled.

Example 18.3

For the vector field X=x2x+2xyy\displaystyle X = x^2 \frac{∂}{∂ x} + 2x y \frac{∂}{∂ y} the system (18.4) takes the form dxdt=x2,dydt=2xy.\frac{dx}{dt}=x^2,\quad \frac{dy}{dt}=2xy.
Solve it.

from sympy import * # import Sympy x0=symbols('x0') # initial value for x in Sympy y0=symbols('y0') # initial value for y in Sympy t = symbols('t') # symbolic variable t in Sympy x = Function('x') # function x(t) in Sympy y = Function('y') # function y(t) in Sympy ics = {x(0): x0,y(0):y0} # initial conditions # solve ODE system in Sympy: sol = dsolve([x(t).diff(t) - x(t)**2, y(t).diff(t) - 2*x(t)*y(t)],ics=ics)

The system has the following solution:

init_printing() list(map(simplify,sol))

[x(t)=x0tx01, y(t)=y0(tx01)2]\displaystyle \left[ x{\left(t \right)} = - \frac{x_{0}}{t x_{0} - 1}, \ y{\left(t \right)} = \frac{y_{0}}{\left(t x_{0} - 1\right)^{2}}\right]

The expression is not defined for t=1/x0t = 1/x_0 , and therefore we are not dealing with a one-parameter group of transformations (by definition defined for tRt\in R), despite the fact that XX is smooth.

Example 18.4

Show that the integral curve from the previous example defines a local version of one parameter group of transformations ϕ\phi with tt in a sufficiently small neighborhood of zero.

Define components of ϕ\phi:

reset() var('t,s,x,y') # symbolic variables ϕ1(x,y,t)=-x/(t*x - 1) # define ϕ1 ϕ2(x,y,t)=y/(t*x - 1)**2 # define ϕ2

next, the right and left hand sides of (18.6):

a1=ϕ1(x,y,t+s).normalize() # right hand side of (18.6) for ϕ1 b1=ϕ1(ϕ1(x,y,t),ϕ2(x,y,t),s).normalize() # lhs of (18.6) for ϕ1 a2=ϕ2(x,y,t+s).normalize() # right hand side of (18.6) for ϕ2 b2=ϕ2(ϕ1(x,y,t),ϕ2(x,y,t),s).normalize() # lhs of (18.6) for ϕ2

and the differences between the right and left hand sides

a1-b1,a2-b2 # lhs - rhs
(0, 0)

So (18.6) is fulfilled for sufficiently small tt and ss.

Example 18.5

For X=12(x2y2)x+xyy\displaystyle X = \frac{1}{2} (x^2 − y^2 ) \frac{∂}{∂ x} + x y \frac{∂}{∂ y} on M={(x,y)R2:y>0}M = \{(x, y) ∈ R^2 : y > 0\} we have dxdt=12(x2y2),dydt=xy.\frac{dx}{dt}=\frac{1}{2}(x^2-y^2),\quad \frac{dy}{dt}=xy. Solve the system.

The system implies the single differential equation dydx=2xy/(x2y2).\frac{dy}{dx} = 2x y/(x^2 − y^2 ). We can solve this equation with Sympy:

from sympy import * # import Sympy init_printing(False) # we want to copy-paste the result x=symbols('x') # Sympy variable x y = Function('y') # Sympy function y(x) sol = dsolve(y(x).diff(x) -2*x*y(x)/(x**2-y(x)**2))#,ics=ics var('C1') # C1 is the constant from solution solve(sol,C1) # solve the result with respect to C1
[(log(x**2/y(x) + y(x)),)]

The result means that C1=log(x2/y+y).C1=\log(x^2/y+y). If we replace C1C1 by logC\log C, we obtain C=x2/y+y.C=x^2/y + y. or x2+y2=Cy,x^2+y^2=Cy, so the integral curves are circles centered at (0,C/2)(0,C/2) with radius C/2.C/2.

Example 18.6

Show the integral curves from the previous example.

reset() var('x y') # symbolic variables # show curves x^2/y+y=C for 30 values of C selected by the system p=contour_plot(log(x^2/y + y),(x,-8,8),(y,0,16), fill=false,contours=30,linewidths=2)
Image in a Jupyter notebook

Remark. In many cases exact solutions of the ODE systems defining the integral curves are not available. In that case one can use numerical tools.

Example 18.6

Using numerical tools find selected integral curve of the vector field from previous example.

x,y,t=var('x y t') # find numerically the integral curve of X=(X1,X2), where # X1=1/2(x^2-y^2), X2=xy, passing through (0.1,0.01) P=desolve_system_rk4([0.5*(x^2-y^2),x*y],[x,y],ics=[0,0.1,0.01],ivar=t, end_points=60) Q=[ [j,k] for i,j,k in P] # list of points of the integral curve LP=list_plot(Q,plotjoined=True,color='grey') # line through points of Q plot(LP).show(aspect_ratio=1) # show with the same scale on both axes
Image in a Jupyter notebook

What's next?

Take a look at the notebook Lie derivative.