The function uses multiple calls to integrate.
integrate_discont_val(f, from, to, discontinuities = numeric(0), ...)an R function taking a numeric vector of length 1 as its first argument and returning a numeric vector of length 1
the lower limit of integration
the upper limit of integration
nondecreasingly sorted numeric vector which indicates
the points at which f is discontinuous
further arguments to be passed to the integrate function.
Returns the estimate of the integral.