Show: $\sum_{n=1}^{k}\sum_{m=n}^{k}\int_m^{m+1}f(x)dx=\sum_{m=1}^{k}m \int_m^{m+1}f(x)dx$ What I understand is that $\sum_{n=1}^{k}\sum_{m=n}^{k}\int_m^{m+1}f(x)dx$  means summing $\int_m^{m+1}f(x)dx$ from $1$ to $k$ twice, since we see that  $\sum_{n=1}^{k}=\sum_{m=1}^{k}$ since, $m=n$, but then how we get the identity given above? I am confused!
Please show elaborately that- 
$$\sum_{n=1}^{k}\sum_{m=n}^{k}\int_m^{m+1}f(x)dx$$
$$=\sum_{m=1}^{k}m \int_m^{m+1}f(x)dx$$
Thanks.
 A: It is just a matter of definition.
$$
\sum_{n=1}^{k} \sum_{m=n}^{k} \int_m^{m+1} f(x)dx
$$
Expand along the first sum:
$$
\left( \sum_{m=1}^{k} \int_m^{m+1} f(x)dx \right)
+ \left( \sum_{m=2}^{k} \int_m^{m+1} f(x)dx \right)
+ \cdots
+ \left( \sum_{m=k}^{k} \int_m^{m+1} f(x)dx \right)
$$
Write each term in parentheses as a new line, and expand the sum:
$$
\begin{array}{ccccccc}
\int_1^{2} f(x)dx & + & \int_2^{3} f(x)dx & + & \cdots & + & \int_k^{k+1} f(x)dx \\
& + & \int_2^{3} f(x)dx & + & \cdots & + & \int_k^{k+1} f(x)dx \\
&&&& \ddots && \vdots \\
&&&&& + & \int_k^{k+1} f(x)dx
\end{array}
$$
Now count the number of each integral:
$$
1 \cdot \left( \int_1^{2} f(x)dx \right)
+ 2 \cdot \left( \int_2^{3} f(x)dx \right)
+ \cdots
+ k \cdot \left( \int_k^{k+1} f(x)dx \right)
$$
Recombine using sigma notation:
$$
\sum_{m=1}^{k} m \int_m^{m+1} f(x)dx
$$
A: With $a_m = \int_m^{m+1} f(x)\,dx$, the sum can be written as
$$\sum_{n=1}^k\sum_{m=1}^k \mathbf{1}_{m\geqslant n}a_m = \sum_{m=1}^k \left(\sum_{n=1}^k \mathbf{1}_{m\geqslant n}\right) a_m = \sum_{m=1}^k m a_m$$
A: In general for a sequence $\{a_m\}$:
$$\sum_{n=1}^{k}\sum_{m=n}^{k} a_m =\sum_{m=1}^{k}m a_m.$$
That can be proven by induction on $k$.
Replace $a_m$ with $\int_m^{m+1}f(x)$... and you're done.
A: Another proof without induction
How many points is there in each horizontal line?

A: We can write the index region conveniently to better see what's going on.

We obtain
\begin{align*}
\sum_{n=1}^k\sum_{m=n}^k\int_{m}^{m+1}f(x)\,dx&=\sum_{\color{blue}{1\leq n\leq m\leq k}}\int_{m}^{m+1}f(x)\,dx\tag{1}\\
&=\sum_{m=1}^k\sum_{n=1}^m\int_{m}^{m+1}f(x)\,dx\tag{2}\\
&=\sum_{m=1}^k\int_{m}^{m+1}f(x)\,dx\sum_{n=1}^m1\tag{3}\\
&=\sum_{m=1}^km\int_{m}^{m+1}f(x)\,dx
\end{align*}

Comment:

*

*(1): The inequality chain shows the relationship of the indices $n$ and $m$,


*(2): enabling us to exchange the sums easily.


*(3): The integral does not depend on the index $n$ and can be factored out.
