In Tom Apostol's expository article ~~(here's a free link)~~, upon seeing the figure below (or this from the Wolfram project) I was expecting more diagrams to come to continue the error decomposition of the shaded regions in the shape of "curved triangular pieces".

For each horizontal unit interval, *it seems that* the hypotenuse of an implicit triangle (within shaded region) is the linear correction. Then, there's a "cap" that fills in the gap between the hypotenuse and the actual curve. In this figure, each cap is attached to the implicit hypotenuse from below due to the curve being convex.

It was a disappointment not seeing further decomposition of the "cap" into regions described by parabolic, cubic, then quartic curves etc. Somehow none of the textbooks and other materials I've read have such diagrams for higher orders.

## Question Statement

What is the correct analysis to demonstrate the 'geometry' of the successive orders of the Euler-Maclaurin formula?

Is there any existing source with such diagrams (visualization) similar to the above regarding higher order?

#### General Remarks

I'm actually not sure whether my proposal is a valid idea (that such a demonstration is possible). Below is a more detailed description (repeating things said above) of what I mean by the *tentative* decomposition of pieces as the terms of Euler-Maclaurin formula.

Basically it is approximating the definite integral $F(b)-F(a)$ where $b>a$, unfolding in the direction "opposite" to Euler-Maclaurin formula itself. $$ \int_{a}^b f(x) \,\mathrm{d}x \approx F_0 + F_1 + F_2 + \cdots $$ The approximation is done by columns of unit width (summation of $f(k)$, discretely sampled points) plus corrections to get close to the curve (via derivatives of end points). $$ \int_{a}^b f(x) \,\mathrm{d}x \approx \overbrace{ \underbrace{ \sum_{k = a}^b f(k) }_{ \textbf{unit columns} } - \frac{f(a)+f(b)}2 }^{ \textbf{unit columns centered} } - \underbrace{ \frac{f'(b) - f'(a)}{12} - 0 }_{ \textstyle\genfrac{}{}{0pt}{}{\textbf{net result of} }{ \textbf{triangular & parabolic cap} } } - \overbrace{ \frac{f'''(b) - f'''(a)}{720} - 0}^{ \textbf{cubic & guartic cap} } - \cdots$$

The correct analysis would have to account for both the emergence of Bernoulli numbers and the individual orders of correction ... and the remainder if possible.

#### Elaboration on the Ideas

For simplicity, consider $(a,b) \in \mathbb{N}^2$ and let the summation be in unit steps as usual, then pretend that things will scale nicely.

The zero-th order approximation for the integral is the columns of unit width $$F_0 = \sum_{k=a}^b f(k)$$ Note that each column of height $f(k)$ is left-aligned. For example, the first column for $k = a$ occupies $x \in [a, a+1]$. This means the last column at $k = b$ is entirely outside of the range of integration.

The $2$nd term (still zero-th order) shifts all the columns by $\frac12$ to make them centered. That is, each column of height $f(k)$ now resides at $x \in [a-\frac12, a+\frac12]$. The last column is now half-outside, and so is the first column. Thus we remove half of each of them. $$ F_1 = -\frac{f(a) + f(b)}2$$

The $3$rd term ($1$st order, linear) correction is supposed to shave off a triangular top from each column (note that the outermost are half-columns at $k = b$ and $k = a$). The height of each triangle is $f'(k)$ and the width is unity. $\color{brown}{\textit{Somehow}}$ there should be a telescoping of terms (combine or cancellation) with the $3$rd order correction and we end up with $$F_2 = - \frac16 \frac{f'(b) - f'(a)}2$$

The $4$th term ($2$nd order, parabolic) correction is supposed to be something involving both $f''(k)$ and $f'(k)$. It should be a parabolic piece on top of the triangular (linear) correction of the previous order, similar in spirit

^{**}to what one sees in the quadrature of parabola. Note that there's a fixed ratio of $\frac13$ (or $\frac23$) between the parabolic area and the rectangle it spans. $\color{brown}{\textit{Somehow}}$ there should be telescoping with the $2$nd as well as the $4$th order so that $$F_3 = 0~.$$

^{**Here one uses parabolic pieces to fill the gaps for one iteration then uses cubic pieces for the next iteration and so on, while in ancient quadrature one keeps using triangular pieces that are linear.}The $5$th term ($3$rd order, cubic) is supposed to some kind of lune (moon crest) on top of the parabolic correction, and $\color{brown}{\textit{somehow}}$ after cancellation it will end up being $$F_4 = -\frac{f'''(b) - f'''(a)}{720}$$

So on and so forth ....

In the end, one shall keep the summation $F_0$ on one side of the equation by itself, moving the terms $F_1$, $F_2$, $F_3$ etc to the side of the integral, to have the Euler-Maclaurin summation formula. $$F_0 \approx \int_{a}^b f(x) \,\mathrm{d}x - F_1 - F_2 - \cdots$$