Qualitative Behavior of Non-Linear Systems:  Limit Cycles.

Needs["Graphics`PlotField`"]

We again consider a non-linear autonomous 2 x 2 system of ODE's.
       x' = f(x,y)
       y' = g(x,y)
where for simplicity we assume that all partial derivatives of f and g with respect to x and y exist and are continuous.  The Poincare-Bendixson Theorem asserts that any solution (x(t), y(t)) of such a system exhibits one of three behaviors as t goes to infinity.  The first possibility is divergence--i.e. (x,y) goes to infinity as t increases.  The second possibility is convergence to
a critical point--i.e. 

       \(TextForm
      \`lim\+\(t⟶∞\)\((x \((t)\), y \((t)\))\)\  = 
        \ \((x\_0, y\_0)\)\),
       
where ((Subscript[x, 0]), (Subscript[y, 0])) is a constant solution of the system.  The last possibility,
and the one we will illustrate here, is that of convergence to a so-called
limit cycle.  That is, it can happen for some systems and some intial conditions that ( x(t), y(t) ) is asymptotically periodic.  A simple example of such behavior is exhibited by solutions of the linear system 

             x'(t) = y(t)
             y'(t) = -x(t).
             
The general solution is 

             ( x(t), y(t) ) = ( r cos (t+(Subscript[t, 0])),  r sin (t + (Subscript[t, 0])) ), 
             
where \(TextForm
      \`\(t\_0\) and\ r\ are\ constants . \ \ One\ can\ easily\ see\ that\ 
        when\ r\ is\) not zero that
all solution curves are circles, and (x(t), y(t) ) moves around one of these
circles at a constant rate.  In this case, non-zero solutions are not just asymptotically periodic; they are simply periodic... period.

A more complicated example of a limit cycle is provided by changing the previous example slightly so that it becomes non-linear.  That is, we take the right side of the system

f[x_, y_]  =  yg[x_, y_]  =  -x  +   .2 (1 - x^2) y

for some small but non-zero number a.  Note that (0,0) is still a critical point of this system.  We   look at a direction field

\(\(\(PlotVectorField[{f[x, y], g[x, y]}, {x, \(-4\), 4}, {y, \(-4\), 4}, 
      
	AxesOrigin -> {0, 0}, 
	Axes -> \ True, 
	
      ScaleFunction -> \((1&)\), Ticks -> None, Frame -> True, 
      AspectRatio -> 1, \ PlotPoints\  -> \ 20]; \)
\)\)

We definitely see a lot of rotation in this vector field--not surprising considering
the fact that the system under scrutiny is a slight variation on a linear system with
purely imaginary eigenvalues.  To see if anything else is going on, we linearize about
the origin and look at the eigenvalues of the linearization.

\(Jac[x_, y_]\  = 
      \ {{D[f[x, y], x], D[f[x, y], y]}, 

        		{D[g[x, y], x], D[g[x, y], y]}}; 
MatrixForm[Jac[x, y]]\)

Eigenvalues[Jac[0, 0]]

So actually the eigenvalues have become complex with positive real parts.  Hence we expect solutions starting near zero to spiral outward.   We check this  for the nonlinear system by plotting  a solution curve with initial condition (0,.01).

\(\(soln[t1_, t2_, a_, b_]\  := 
      \ {x[t], y[t]} /. 
        First[
			
          NDSolve[\ {\(x'\)[t] == f[x[t], y[t]], \(y'\)[t] == g[x[t], y[t]], 
              
					\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x[0]\  == \ a, \ 
              y[0]\  == \ b}, 

            				\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {x[t], y[t]}, 

            				\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, t1, t2}]
			]
          
\)\)

\(\(ParametricPlot[Evaluate[soln[0, 100, 0, \  .1]], 

      	\ \ \ {t, 0, 100}, 
	AspectRatio -> Automatic, 
	
      AxesOrigin -> {0, 0}, 
	PlotRange -> {{\(-4\), 4}, {\(-4\), 4}}, 
	
      Ticks -> None, 
	Frame -> True	\ \ \ 
]; \)\)

That is, the solution spirals outward until it settles down into a sort of
circular pattern.  The limiting shape is what we mean by a limit cycle. We now replot this solution together with two solution curves 
beginning outside the limit cycle.

\(\(ParametricPlot[
      Evaluate[{soln[0, 50, 0, \  .1], 

          		\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ soln[0, 50, 0, \ 4], 

          		\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ soln[0, 50, 0, \ \(-4\)]}], 

      	\ \ \ {t, 0, 50}, 
	AspectRatio -> Automatic, 
	
      AxesOrigin -> {0, 0}, 
	PlotRange -> {{\(-4\), 4}, {\(-4\), 4}}, 
	
      Ticks -> None, 
	Frame -> True	\ \ \ 
]; \)\)

So solutions starting from outside the limit cycle can also spiral in toward
the limit cycle.  It is interesting to explore the limits of this behavior.
If we increase the scale of the picture, and consider solutions with
starting points evenly space along the line y=-x, we obtain the following

\(\(ParametricPlot[
      Evaluate[Table[soln[0, 50, c, \ \(-c\)], 
	{c, \(-50\), 50, 4}]], 
      	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
\ \ {t, 0, 50}, 
	AspectRatio -> Automatic, 
      
	AxesOrigin -> {0, 0}, 
	
      PlotRange -> {{\(-50\), 50}, {\(-50\), 50}}, 
	Ticks -> None, 

      	Frame -> True	\ \ \ 
]; \)\)

It's looking like no matter how far out we start, the solution spirals
in toward the limit cycle.