my professor gave us this formula--but I was curious--how it is derived? Where does it come from? $$U(f,P_n)-L(f,P_n)=\frac{b-a}{n}[f(b)-f(a)]$$
I found it useful by plugging in that $$U(f,P_n)-L(f,P_n)=\frac{\ln2}{n}$$ for a function $\ln x$ from $1$ to $2$, $\forall n\geq1$. I just don't see how to derive it--so that I can memorize it. We were just told it was "useful". FYI I know the definitions of upper and lower sums, how to calculate the Riemann integral etc.
It is for a monotone increasing function.
The (b-a)/n factor is $\Delta x$.
$U(f,P_n)$ is the sum of the values on the right-hand side of each interval.
$L(f,P_n)$ is the sum of the values on the left-hand side of each interval.
The right-hand side of one interval is the left-hand side of the next one. So when you subtract one sum from the other, most of the terms cancel, leaving just f(b) from $U(f,P_n)$ and f(a) from $L(f,P_n)$
It also works for monotone decreasing functions.