I think this would be better done by integraing between each pair of points, rather than starting at xmin each time.  1) It will be more likely to remain monotonic, since each integral is likely to end up positive.  2) For difficult functions it will be much more efficient, since the problematic ranges will only get integrated once.

In fact, these single step integrations _are_ the dcdf values.  So you can build that here as you go.