The Dulac’s criterion a negative test for limit-cycles

Ex. 1: Linear analysis

Clear[diffX,diffY,x,y];
diffX=x (2 x-x-y);
diffY=y (4 x-x^2-3);
fixedpoints=Solve[{diffX==0,diffY==0},{x,y}];
a={diffX,diffY};
Print[Style["System matrix",18,Blue]]
MatrixForm[a]
Print[Style["Jacobian matrix",18,Blue]]
D[a,{{x,y}}]//MatrixForm (*Jacobian*)
Jfp=D[a,{{x,y}}]/.fixedpoints ; (*lin. systems' matrices about f.p.s*)
Print[Style["Jacobian matric about f.p.s",18,Blue]]
Map[MatrixForm][Jfp]

Print[Style["Determinants",18,Blue]]
Map[Det][Jfp]
Print[Style["Trace",18,Blue]]
Map[Tr][Jfp]
Print[Style["Eigenvalues",18,Blue]]
Map[Eigenvalues][Jfp]
Print[Style["Eigenvektors",18,Blue]]
Map[Eigenvectors][Jfp]
Print[Style["F.p.s coordinates",18,Blue]]
coordinates={x,y}/.fixedpoints

fixedp=Graphics[{PointSize[0.03],Red,Point[coordinates]}];
sp=StreamPlot[{diffX,diffY},{x,0,4},{y,0,4},FrameLabel->{x[t],y[t]},LabelStyle->20,ImageSize->Large];
Show[sp,fixedp]

Ex 1: Integrated solution (interactive)

Clear[diffX,diffY,x,y]
imagesize=350;maxT=5;

diffX=x (2 x-x-y);
diffY=y (4 x-x^2-3);

difX=diffX/.{x->x[t],y->y[t]};
difY=diffY/.{x->x[t],y->y[t]};
splot=StreamPlot[{diffX,diffY},{x,-1,4},{y,-1,4},FrameLabel->{x[t],y[t]},ImageSize->imagesize,LabelStyle->17];
fixedpoints=Solve[{diffX==0,diffY==0},{x,y}];
coordinates={x,y}/.fixedpoints;
fixedp=Graphics[{PointSize[0.03],Red,Point[coordinates]}];
Manipulate[
integration=NDSolve[{
x'[t]==difX,
y'[t]==difY,
x[0]==point[[1]],y[0]==point[[2]]},
{x,y},{t,0,T}];
trajectory=ParametricPlot[
Evaluate[{x[t],y[t]}/.integration],
{t,0,T},PlotStyle->Black,LabelStyle->17];
solx=Plot[
Evaluate[x[t]/.integration],
{t,0,T},PlotRange-> All,AxesLabel-> {t,x[t]},ImageSize->imagesize,LabelStyle->17,PlotStyle->Black];
soly=Plot[
Evaluate[y[t]/.integration],
{t,0,T},PlotRange-> All,AxesLabel-> {t,y[t]},ImageSize->imagesize,LabelStyle->17,PlotStyle->Black];
rP=RegionPlot[0<x<4&&0<y<4,{x,-1,4},{y,-1,4},PlotStyle->Opacity[0.25],BoundaryStyle->None];
Grid[{{Show[splot,rP,trajectory,fixedp],soly},{solx}},Frame->All],
{{T,0.4 maxT,"Integration time, t"},0.1,maxT,Appearance->"Labeled"},
{{point,{1.5,1}},Locator}, SaveDefinitions->True,TrackedSymbols:>{T,point}]

Creation of this notebook was supported by IT Academy program of Information Technology Foundation for Education (HITSA).