I would like to graphically show Bendixson’s criterion.
The Bendixson Criterion:
If $f_1$ and $f_2$ are continuous in a region $R$ which is simply-connected (i.e., without holes), and
$$\frac{\partial f_1}{\partial x_1}+\frac{\partial f_2}{\partial x_2}\ne0$$ at any point of $R$,
then the system
$$x_1' = f_1(x_1, x_2)$$
$$x_2' = f_2(x_1, x_2)$$
has no closed trajectories inside $R$.
Basically you can use this theorem to proof that there is no limit cycle within a system:
$$x' = f(x,y) $$
($x$ being a state vector and $f(x,y)$ the dynamic equation vector)
I wanted to visualize graphically that, if we HAVE a limit cycle $\frac{\partial f_1}{\partial x_1}+\frac{\partial f_2}{\partial x_2}$ will be equal to zero at some points.
Hence I draw a limit cycle (simple circle in the $x_1-x_2$ plane). Since $x'=f(x_1,x_2) \rightarrow f(x_1,x_2)$ will be tangent to the circle at all points, if the circle is a limit cycle (the trajectory can not escape).
Clear[t, x, y, z, P];
x[t_] = -Sin[t];
y[t_] = Cos[t];
P[t_] = {x[t], y[t]};
V[t_] = {x'[t], y'[t]};
curveplot =
ParametricPlot[P[t], {t, 0, 2*Pi}, PlotStyle -> Thickness[0.01]];
ar = Table[{P[t], P[t] + V[t]}, {t, 0, 2*Pi, Pi/4}];
Show[curveplot,
Graphics[{Arrow[ar], Red, AbsolutePointSize@10, Point@ar[[All, 1]]}],
PlotRange -> All, AxesLabel -> {"x1", "x2"}, Ticks -> None]
But how could I visualize: $\frac{\partial f_1}{\partial x_1}+\frac{\partial f_2}{\partial x_2}$ ?? Any suggestions ?
Based on a comment from Rahul: $\frac{\partial f_1}{\partial x_1}+\frac{\partial f_2}{\partial x_2}$ is simply the divergence.
Hence I do the follwing:
Angle with x1 and x2:
f1[x1_, x2_] = -Sin[ArcTan[x2/x1]];
f2[x1_, x2_] = Cos[ArcTan[x2/x1]];
a = StreamPlot[{f1[x1, x2], f2[x1, x2]}, {x1, -1, 1}, {x2, -1, 1}];
Show[curveplot, a,
Graphics[{Arrow[ar], Red, AbsolutePointSize@10, Point@ar[[All, 1]]}],
PlotRange -> All, AxesLabel -> {"x1", "x2"}, Ticks -> None]
EDIT: Thanks to J.M, I changed the ArcTan function to:
-Sin[ArcTan[x1, x2]]
and
Cos[ArcTan[x1, x2]]
(putting a comma between x1 and x2, gives the angle for this coordinate)
the output no looks better:
Now the question is:...what could you interpret ? ...and is there a better way to visualize the divergence ?
Any help is highly appreciated ! :)