FUN WITH THE POINCARE MAP

Reference: Hisrch/Smale/Devaney, section  1.5

The Poincare map is a tool that helps you locate periodic solutions and
determine their stability, for a non-autonomous first-order equation
x'=f(t,x), x=x(t), where f is T-periodic in the variable t.

Given x0 in a suitable interval (a,b), the map P assigns to x0 the value
x(T), where x(t) is the solution with x(0)=x0. Fixed points of P (i.e.,
those x0 s.t. P(x0)=x0) correspond to periodic solutions.

I've written a primitive function M-file to compute the Poincare map,
found here:
poincare.m
It is based on the ode solver ode45, so make sure you have that.
This is an html page, but it is probably best to save it as a text file,
to avoid extraneous invisible symbols in your file.

This M-file assumes your f(t,x) is already stored as a function
M-file called field. For example, if I wanted the Poincare map
for the example in the book (p. 15), I would edit the following function
M-file:
function f=field(t,x)
f=5*x*(1-x)-0.8*(1+cos(2*pi*t));

(In the fututre I'll find out how to make this work seamlessly
with the input window in dfield- I said this was primitive).

The function poincare has T (the period), a and b as inputs.
It computes the Poincare map on the interval [a,b], and returns its graph.
For this example T=1. How do you find a and b?  That's
tricky- if you pick the wrong ones, you may get nasty overflow error
messages. First use dfield to plot some solutions,  and try to determine the
largest interval [a,b] so that if x(0) is in this interval, the solution is still finite
when t=T.  This takes some trial and error.

Then what? The poincare M-file opens a new graphic window, showing the graphs of
P and of the identity. With some luck, some fixed points should be clearly visible.
Then you can zoom in on each fixed point to find a good approximation of the
corresponding x0. Going back to dfield, this will let you "zero in" on the corresponding
periodic solutions (use keyboard input, with x0 as your IC.)

Alex Freire- Math 431, U.T.K.- September 6. 2005