Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
It's the step changes that the integration routine doesn't like. One workaround is to do the integration piecewise:
Alan
Thanks you very for your help Alan. My problem solve.
David,Allen is, as is normal, correct.
For more complicated functions, numerical integration with large vertical steps is difficult. You can study the problem by currpting the data a little to replace the vertical line transition with a sloping one. It introduces some error, but on the other hand assuming an infinite slope step is probably not correct either. Anyway for what its worth, see attached.