For diffeomorphisms, it is sometimes difficult to iterate backwards in time. The Reference Manual discusses Newton's method and implicitly iterating a mapping backwards; it also briefly indicates some of the ways that Newton's method can fail. One of the most important aspects of Newton's algorithm is its dependence on a ``good'' initial guess. In the present section, we will discuss one way to provide a good guess.
For our bouncing ball example, it turns out that we can find an explicit inverse for f
since .
This inverse is the map given by
To enter this inverse into DsTool, locate the section of bball_def.c which looks like
/* ------------------------------------------------------------------------ function used to define inverse or approximate inverse ------------------------------------------------------------------------ */ /* int user_inv(y,x,p) double *y,*x,*p; { } */and modify this section to produce
/* ------------------------------------------------------------------------ function used to define inverse ------------------------------------------------------------------------ */ int bball_inv(y,x,p) double *y,*x,*p; { double temp; temp = ( p[1] * cos( x[0] ) + x[1] ) / p[0]; y[0] = x[0] - temp; y[1] = temp; }Suppose that our map did not have an explicit inverse (or we could not calculate it). Then we would have to resort to using Newton's method to numerically solve for the inverse iterate at each backward step. To do so requires that we provide an initial guess for the inverse image of the current state. If we provide a good guess for the inverse image, then possibly we will require only a few Newton steps to ``sharpen'' our guess and converge to a solution (See the Reference Manual). Suppose, for the sake of an example, that we were only interested in the bouncing ball map
![]() |
(4.3) |
![]() |
(4.4) |
/* ------------------------------------------------------------------------ function used to define approximate inverse ------------------------------------------------------------------------ */ int bball_approx_inv(y,x,p) double *y,*x,*p; { y[0] = x[0] - x[1] / p[0]; y[1] = x[1] / p[0]; }Of course, we must inform DsTool whether to interpret the procedure as a definition of the actual inverse or merely as an approximation; Section 4.2.5 explains how this is done.