code: def _uminUmaxFindStart(u,
                         E,Lz,I3U,delta,u0,sinh2u0,v0,sin2v0,
                         potu0v0,pot,umax=False):
      
      if umax:
          utry= u*1.1
      else:
          utry= u*0.9
      prevu= u
      while _JRStaeckelIntegrandSquared(utry,
                                        E,Lz,I3U,delta,u0,sinh2u0,v0,sin2v0,
                                        potu0v0,pot) >= 0. \
                                        and utry > 0.000000001:
          prevu= utry
          if umax:
              if utry > 100.:
                  raise UnboundError("Orbit seems to be unbound")
              utry*= 1.1
          else:
              utry*= 0.9
      if utry < 0.000000001: return (0.,prevu)
      return (utry,prevu)
docs: NAME:
         _uminUmaxFindStart
      PURPOSE:
         Find adequate start or end points to solve for umin and umax
      INPUT:
         same as JRStaeckelIntegrandSquared
      OUTPUT:
         rstart or rend
      HISTORY:
         2012-11-30 - Written - Bovy (IAS)