Example 12.3: First integral of Volterra-Lotka system (Ch 12, page 204)

Clear["Global`*"]
Off[General::spell1]

<<VectorFieldPlots`;

System

Parameters

{(Subscript[x, min]),(Subscript[x, max])}={0,2.25};
{(Subscript[y, min]),(Subscript[y, max])}={0,2.25};
{(Subscript[z, min]),(Subscript[z, max])}={0,2.25};

a=1 ;a'=1  ;a''=1 ;b= -1;b'= -1;b''= -1;

a a'a''+b b'b''

f[x_,y_,z_]:=x(a' y +b z)

g[x_,y_,z_]:=y(a'' z +b' x)

h[x_,y_,z_]:=z(a x + b'' y)

Vector field

V={f[x,y,z],g[x,y,z],h[x,y,z]}

Fixed Points

fp=Solve[{f[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])]==0,g[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])]==0,h[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])]==0},{(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])}]

fp1=Sort[fp[[1]]];

{(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])}={0,0,0};
fixedpoint1=Show[Graphics3D[{PointSize[0.025],Hue[0.33],Point[{(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])}]},PlotRange->{{(Subscript[x, min]),(Subscript[x, max])},{(Subscript[y, min]),(Subscript[y, max])},{(Subscript[z, min]),(Subscript[z, max])}}]];

Jacobian

a11=Simplify[D[f[x,y,z],x]]

a12=Simplify[D[f[x,y,z],y]]

a13=Simplify[D[f[x,y,z],z]]

a21=Simplify[D[g[x,y,z],x]]

a22=Simplify[D[g[x,y,z],y]]

a23=Simplify[D[g[x,y,z],z]]

a31=Simplify[D[h[x,y,z],x]]

a32=Simplify[D[h[x,y,z],y]]

a33=Simplify[D[h[x,y,z],z]]

J={{a11,a12,a13},{a21,a22,a23},{a31,a32,a33}}

MatrixForm[J]

Acceleration

γ=J . V

Over-Acceleration (jerk)

Γ=(J . γ +Dt[J] . V)/.{Dt[x]->f[x,y,z],Dt[y]->g[x,y,z],Dt[z]->h[x,y,z],Dt[parameters]->0}

Fixed Points Stability - Eigenvalues

Eigenvalues[J]/.{x-> (Subscript[x, 1]),y->(Subscript[y, 1]),z->(Subscript[z, 1])}//N

Phase Portrait

solution=NDSolve[{x'[t]==f[x[t],y[t],z[t]],x[0]==2,

y'[t]==g[x[t],y[t],z[t]],y[0]==1,

z'[t]==h[x[t],y[t],z[t]],z[0]==1},{x,y,z},

{t,0,100},Method->"ExplicitRungeKutta",MaxSteps->Infinity,StartingStepSize->0.001];phaseplot=ParametricPlot3D[Evaluate[{x[t],y[t],z[t]}/.solution],{t,50,100},PlotPoints->2000,PlotRange->All,PlotStyle->{Red,Thickness[0.007]},ImageSize->{400,400},BoxRatios->{1,1,1},AxesLabel->{"X","Y","Z"}]

Show[phaseplot,fixedpoint1]

Flow Curvature Manifold

ϕ=Factor[Γ  . Cross[V,γ]]

Osculating Plane

X={x,y,z};

ϕ=Factor[X  . Cross[V,γ]]

ϕ=(x+y+z)

flowmanifold1=ContourPlot3D[ϕ==4,{x,(Subscript[x, min]),(Subscript[x, max])},{y,(Subscript[y, min]),(Subscript[y, max])},{z,(Subscript[z, min]),(Subscript[z, max])},PlotPoints->{7,7,7},Mesh->None,ContourStyle->Directive[Blue,Opacity[0.5]],BoxRatios->{1,1,1},Axes->True,AxesLabel->{"x","y","z"}]

ϕ=((((x+y+z))^3)/(x y z))

flowmanifold2=ContourPlot3D[ϕ==32,{x,(Subscript[x, min]),(Subscript[x, max])},{y,(Subscript[y, min]),(Subscript[y, max])},{z,(Subscript[z, min]),(Subscript[z, max])},PlotPoints->{10,10,10},Mesh->None,ContourStyle->Directive[Orange,Opacity[0.5]],BoxRatios->{1,1,1},Axes->True,AxesLabel->{"x","y","z"}]

Show[phaseplot,flowmanifold1,flowmanifold2,fixedpoint1,ImageSize->{600,600},Boxed->False,Axes->False]

Flow Curvature Invariance

ϕ=((((x+y+z))^3)/(x y z))

Normal vector

η={D[ϕ,x],D[ϕ,y],D[ϕ,z]}

Invariance

Ψ=Factor[(V . η)]