1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Defining Information About an Inverse</TITLE>
<META NAME="description" CONTENT="Defining Information About an Inverse">
<META NAME="keywords" CONTENT="userman">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="userman.css">
<LINK REL="next" HREF="node56.html">
<LINK REL="previous" HREF="node54.html">
<LINK REL="up" HREF="node52.html">
<LINK REL="next" HREF="node56.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html1225"
HREF="node56.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/lib/latex2html/icons.gif/next_motif.gif"></A>
<A NAME="tex2html1222"
HREF="node52.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/lib/latex2html/icons.gif/up_motif.gif"></A>
<A NAME="tex2html1216"
HREF="node54.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/lib/latex2html/icons.gif/previous_motif.gif"></A>
<A NAME="tex2html1224"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/lib/latex2html/icons.gif/contents_motif.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html1226"
HREF="node56.html">Defining Auxiliary Functions</A>
<B> Up:</B> <A NAME="tex2html1223"
HREF="node52.html">Installing a New Dynamical</A>
<B> Previous:</B> <A NAME="tex2html1217"
HREF="node54.html">Defining Derivative Information</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00623000000000000000"> </A><A NAME="inverse"> </A><A NAME="2017"> </A>
<BR>
Defining Information About an Inverse
</H2>
In this section we show how to define an inverse or an approximate inverse for a
mapping. We recall that the ``inverse function'' for a vector field is trivial, since
integrating the equations of motion backwards in time is the same as integrating
forward in time--except we pass in a negative time step to a numerical integrator.
Thus if we were installing a vector field, we would skip this section. Moreover, it
frequently happens that a mapping does not have an inverse, nor is there any sort of
an approximate inverse. In that case, do not edit the inverse routine at all.
<P>
For diffeomorphisms, it is sometimes difficult to iterate backwards in time.
The Reference Manual<A NAME="2018"> </A> discusses Newton's method<A NAME="2019"> </A>
and implicitly iterating a mapping backwards<A NAME="2020"> </A>;
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.
<P>
For our bouncing ball example, it turns out that we can find an explicit inverse<A NAME="2021"> </A> for <I>f</I>since
<!-- MATH: $\alpha > 0$ -->
74#74.
This inverse is the map given by
<A NAME="bball_inv"> </A>
<BR>
75#75
<BR>
<P>
To enter this inverse into DsTool, locate the section of bball_def.c which looks like
<PRE>
/* ------------------------------------------------------------------------
function used to define inverse or approximate inverse
------------------------------------------------------------------------ */
/*
int user_inv(y,x,p)
double *y,*x,*p;
{
}
*/
</PRE>
and modify this section to produce
<PRE>
/* ------------------------------------------------------------------------
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;
}
</PRE>
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<A NAME="2037"> </A>).
Suppose, for the sake of an example, that we were only interested in the bouncing ball map
<!-- MATH: $f_{\alpha, \gamma}$ -->
72#72in the special case that 17#17
is small. Then <I>f</I> can be thought of as a perturbation
of the linear map <I>g</I> defined by
<BR>
76#76
<BR>
and <I>g</I><SUP>-1</SUP> can be written as:
<BR>
77#77
<BR>
In this case, we could code <I>g</I><SUP>-1</SUP> into DsTool in place of <I>f</I><SUP>-1</SUP>.<A NAME="2056"> </A>
If we were to do this, we would modify bball_def.c to read:
<PRE>
/* ------------------------------------------------------------------------
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];
}
</PRE>
Of course, we must inform DsTool whether to interpret the procedure as a definition of the actual inverse
or merely as an approximation; Section <A HREF="node57.html#ic"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]"
SRC="/usr/lib/latex2html/icons.gif/cross_ref_motif.gif"></A> explains how this is done.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1225"
HREF="node56.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/lib/latex2html/icons.gif/next_motif.gif"></A>
<A NAME="tex2html1222"
HREF="node52.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/lib/latex2html/icons.gif/up_motif.gif"></A>
<A NAME="tex2html1216"
HREF="node54.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/lib/latex2html/icons.gif/previous_motif.gif"></A>
<A NAME="tex2html1224"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/lib/latex2html/icons.gif/contents_motif.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html1226"
HREF="node56.html">Defining Auxiliary Functions</A>
<B> Up:</B> <A NAME="tex2html1223"
HREF="node52.html">Installing a New Dynamical</A>
<B> Previous:</B> <A NAME="tex2html1217"
HREF="node54.html">Defining Derivative Information</A>
<!--End of Navigation Panel-->
<ADDRESS>
<I>John Lapeyre</I>
<BR><I>1998-09-04</I>
</ADDRESS>
</BODY>
</HTML>
|