TITLE: Exactly expressing integral as a sum
QUESTION [9 upvotes]: Apparently (i.e. according to my professor), the following holds:$$\int_a^b f(x) dx = (b-a)\sum_{n=1}^\infty \sum_{m=1}^{2^n-1} (-1)^{m+1}2^{-n}f(a+m(b-a)2^{-n}).$$How would one go about proving such a formula?

REPLY [7 votes]: We can break an alternating sum into the difference of the non-alternating sum and twice the sum of the even terms:
$$
\begin{align}
&\sum_{m=1}^{2^n}(-1)^{m-1}(b-a)2^{-n}f(a+m(b-a)2^{-n})\\
&=\sum_{m=1}^{2^n}(b-a)2^{-n}f(a+m(b-a)2^{-n})
-2\sum_{m=1}^{2^{n-1}}(b-a)2^{-n}f(a+2m(b-a)2^{-n})\\
&=\underbrace{\sum_{m=1}^{2^n}(b-a)2^{-n}f(a+m(b-a)2^{-n})}_{\text{Riemann Sum with $2^n$ partitions}}
-\underbrace{\sum_{m=1}^{2^{n-1}}(b-a)2^{-n+1}f(a+m(b-a)2^{-n+1})}_{\text{Riemann Sum with $2^{n-1}$ partition}}\tag{1}
\end{align}
$$
The sum of $(1)$ telescopes:
$$
\begin{align}
&\sum_{n=1}^\infty\sum_{m=1}^{2^n}(-1)^{m-1}(b-a)2^{-n}f(a+m(b-a)2^{-n})\\
&=\int_a^bf(x)\,\mathrm{d}x-(b-a)f(b)\tag{2}
\end{align}
$$
The terms of $(2)$ where $m=2^n$ sum to
$$
-(b-a)\sum_{n=1}^\infty2^{-n}f(b)=-(b-a)f(b)\tag{3}
$$
Subtracting $(3)$ from $(2)$ yields
$$
\sum_{n=1}^\infty\sum_{m=1}^{2^n-1}(-1)^{m-1}(b-a)2^{-n}f(a+m(b-a)2^{-n})
=\int_a^bf(x)\,\mathrm{d}x\tag{4}
$$