I am reading about second mean value theorem and have questions about some parts of the proof
Here $f$ is decreasing and positive function on $[a,b]$ and $g$ is integrable on $[a,b]$
$p=\sum_{i=0}^{n-1}\int_{x_i}^{x_{i+1}}[f(x)-f(x_i)]g(x)dx$
Author says because $g$ is bounded $|g(x)|\leq L$
Therefore
$|p|$ $\leq$ $\sum_{i=0}^{n-1}\int_{x_i}^{x_{i+1}}|f(x)-f(x_i)||g(x)|dx$ $\leq$$L\sum_{i=0}^{n-1}w_i(f)\Delta x_i$
where $w_i(f)$ is oscilation of function on $i$-th interval.
Can you in detail explain how last inequality is derived?