If I have
int x : [a, b], indicator (f x)
where f : real -> bool, then I should try to be smart and split up the [a,b] into close to areas where the transitions between tt and ff happen.
This should be able to be done with something along the lines of the Newton's approximation. I'm not sure how this can be made general, but it would help for integrals of the above form.