Forced Van der Pol (Ch 17, page 252)

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

<<VectorFieldPlots`;

System

Parameters

ε=0.002;
a=1.8;
ω=1.342043;
Ω=2π ω;

{(Subscript[x, min]),(Subscript[x, max])}={-3,3};
{(Subscript[y, min]),(Subscript[y, max])}={-3,3};
{(Subscript[z, min]),(Subscript[z, max])}={-3,3};

f[x_,y_,z_,u_]:=(1/ε)(-((x^3)/3)+x+y)

g[x_,y_,z_,u_]:=-x+a z

h[x_,y_,z_,u_]:=Ω u

i[x_,y_,z_,u_]:= - Ω z

Vector field

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

Fixed Points

(Subscript[x, 1])=.
(Subscript[y, 1])=.
(Subscript[z, 1])=.
(Subscript[u, 1])=.

fp=Solve[{f[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])]==0,g[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])]==0,h[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])]==0,i[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])]==0},{(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 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,u],x]]

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

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

a14=Simplify[D[f[x,y,z,u],u]]

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

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

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

a24=Simplify[D[g[x,y,z,u],u]]

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

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

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

a34=Simplify[D[h[x,y,z,u],u]]

a41=Simplify[D[i[x,y,z,u],x]]

a42=Simplify[D[i[x,y,z,u],y]]

a43=Simplify[D[i[x,y,z,u],z]]

a44=Simplify[D[i[x,y,z,u],u]]

J={{a11,a12,a13,a14},{a21,a22,a23,a24},{a31,a32,a33,a34},{a41,a42,a43,a44}}

MatrixForm[J]

Fixed Points Stability - Eigenvalues

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

Phase Portrait

solution=NDSolve[{x'[t]==f[x[t],y[t],z[t],u[t]],x[0]==.85,

y'[t]==g[x[t],y[t],z[t],u[t]],y[0]==.96,

z'[t]==h[x[t],y[t],z[t],u[t]],z[0]==0,

u'[t]==i[x[t],y[t],z[t],u[t]] ,u[0]==-1},{x,y,z,u},

{t,0,9},Method->Automatic];phaseplot=ParametricPlot3D[Evaluate[{x[t],y[t],z[t]}/.solution],{t,3,9},PlotPoints->5000,PlotRange->All,PlotStyle->{RGBColor[1,0,0],Thickness[0.005]},ImageSize->{400,400},BoxRatios->{1,1,1},AxesLabel->{"X","Y","Z"}]

phaseplotXY=ParametricPlot[Evaluate[{x[t],y[t]}/.solution],{t,3,9},PlotPoints->5000,PlotRange->All,PlotStyle->{RGBColor[1,0,0]},ImageSize->{400,400},AspectRatio->1,AxesLabel->{"X","Y"}]

plotX=Plot[Evaluate[x[t]/.solution],{t,0,9},PlotRange->{(Subscript[x, min]),(Subscript[x, max])},PlotStyle->{RGBColor[0,0,1]}]

plotY=Plot[Evaluate[y[t]/.solution],{t,0,9},PlotRange->{(Subscript[y, min]),(Subscript[y, max])},PlotStyle->{RGBColor[0,1,0]}]

plotZ=Plot[Evaluate[z[t]/.solution],{t,0,9},PlotRange->{(Subscript[z, min]),(Subscript[z, max])},PlotStyle->{RGBColor[1,0,0]}]

plotU=Plot[Evaluate[u[t]/.solution],{t,0,9},PlotRange->{(Subscript[z, min]),(Subscript[z, max])},PlotStyle->{Cyan,Thickness[0.005]}]

Show[plotX,plotY,plotZ,plotU]

Flow Curvature Manifold

V1={f[x,y,z,u],g[x,y,z,u],h[x,y,z,u],i[x,y,z,u]}

V2=Dt[V1]/.{Dt[x]->f[x,y,z,u],Dt[y]->g[x,y,z,u], Dt[z]->h[x,y,z,u],Dt[u]->i[x,y,z,u]}

V3=Dt[V2]/.{Dt[x]->f[x,y,z,u],Dt[y]->g[x,y,z,u], Dt[z]->h[x,y,z,u],Dt[u]->i[x,y,z,u]};

V4=Dt[V3]/.{Dt[x]->f[x,y,z,u],Dt[y]->g[x,y,z,u], Dt[z]->h[x,y,z,u],Dt[u]->i[x,y,z,u] };

K={V1,V2,V3,V4};

ϕ=Factor[Det[K]/.{u->0}]//Chop

flowmanifoldL=ContourPlot3D[ϕ==0,{x,-2.1,-1.05},{y,-2.1,1.1},{z,-1.1,1.1},PlotPoints->{7,7,20},ColorFunction->Function[{x,y,z,f},Hue[Sin[x]Sin[y]]],ColorFunctionScaling->False,Mesh->None,Axes->True,AxesLabel->{"x","y","z"},BoxRatios->{1,1,1}]

flowmanifoldR=ContourPlot3D[ϕ==0,{x,1.05,2.1},{y,-1.1,2.1},{z,-1.1,1.1},PlotPoints->{7,7,20},ColorFunction->Function[{x,y,z,f},Hue[Sin[x]Sin[y]]],ColorFunctionScaling->False,Mesh->None,Axes->True,AxesLabel->{"x","y","z"},BoxRatios->{1,1,1}]

Show[phaseplot,flowmanifoldL,flowmanifoldR,Boxed->False,Axes->False,ImageSize->{600,600}]