# Visualizing Bendixson’s criterion

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 ! :)

• $\partial f_1/\partial x_1+\partial f_2/\partial x_2$ is nothing but the divergence of the vector field $f$. You could draw the vector field itself and allow the viewer to interpret how much it is spreading out or contracting. – user484 Jan 24 '17 at 19:10
• @Rahul nice suggestion, how do I draw the divergence onto the same plot ? – james Jan 24 '17 at 20:31
• @Rahul have a look at my question. Added your suggestion... but there is probably a mistake. – james Jan 24 '17 at 20:50
• @C.E. Would you mind to explain a bit more, I am still confused ... sorry. – james Jan 24 '17 at 21:12
• @C.E and do you think the result is correct as visualized ? – james Jan 24 '17 at 21:18

Perhaps just exploring the linear case is sufficient. $\{x'(t),y'(t)\}=\vec{F}(x,y)=\{a x + b y, cx+dy\}$. Closed trajectories occurs when $ad-bc>0$ and $a+d=0=\nabla\cdot \vec{F}$:

f[a_, b_, c_, d_, x_, y_] := {{a, b}, {c, d}}.{x, y}
Manipulate[Column[{
Grid[{{"a+d= ",
a + d}, {"ad-bc= ",
a d - b c}}],

Show[
StreamPlot[f[a, b, c, d, x, y], {x, -2, 2}, {y, -2, 2},
Epilog -> {Red, PointSize[0.02], Point[{0, 0}], Green,
Point[{1, 1}]}, ImageSize -> 400],
ParametricPlot[
Evaluate[{x[t], y[t]} /.
First@DSolve[{{x'[t], y'[t]} ==
f[a, b, c, d, x[t], y[t]], {x[0], y[0]} == {1, 1}}, {x[t],
y[t]}, t]], {t, 0, 10}, PlotStyle -> {Red, Thick}] /.
Line[q__] :> Arrow[q]
]
}, Alignment -> Center],
{a, {-1/4, 1/4}}, {b, -1, 1, Appearance -> "Labeled"}, {c, -1, 1,
Appearance -> "Labeled"}, {d, {-1/4, 1/4}}]


• Thanks a lot ! Looks great, but what would be your interpretation ? When circles are formed, a limit cycle exists ? – james Jan 27 '17 at 7:46
• @totyped sorry for the delay in replying. I put this as a way of visually illustrating which also includes case where div F=0 and there are no closed trajectories as well as the contrapositive to the statement of the theorem. I am certain there will be better answers. The linear case is just the simplest case (I thought of), :) – ubpdqn Jan 28 '17 at 8:03