For a closed interval ##[a,b]## I have learned that ##U(f,P)-L(f,P)=\frac{(f(b)-f(a))\cdot(b-a)}{N}## where ##N## is the number of subintervals of ##[a,b]## (if ##f## is monotonically decreasing, change the numerator of the fraction to ##f(a)-f(b)##). However, if the interval is half-open, then...