So, my clever integrator is determined Dmax and Dmin the wrong way because the function is not so smooth.
Let's return to classic.