Let $f\colon \mathbb{R}\to \mathbb{R}$ be a function with $k$ continuous derivatives. We want to find an expression for $$ S=f(1)+f(2)+f(3)+\ldots+f(n). $$ I'm currently reading Analysis by Its History by Hairer and Wanner. They first consider the shifted sum and arrive at the expression $$f(n)-f(0)=\sum_{i=1}^{n} f^{\prime}(i)-\frac{1}{2 !} \sum_{i=1}^{n} f^{\prime \prime}(i)+\frac{1}{3 !} \sum_{i=1}^{n} f^{\prime \prime \prime}(i)-\frac{1}{4 !} \sum_{i=1}^{n} f^{\prime \prime \prime \prime}(i)+\ldots$$
using Taylor series (provided that the Taylor series actually converges to $f$).
In order to turn this formula for $\sum f^{\prime}(i)$ into a formula for $\sum f(i)$, we replace $f$ by its primitive (again denoted by $f$ ): $$\sum_{i=1}^{n} f(i)=\int_{0}^{n} f(x) d x+\frac{1}{2 !} \sum_{i=1}^{n} f^{\prime}(i)-\frac{1}{3 !} \sum_{i=1}^{n} f^{\prime \prime}(i)+\frac{1}{4 !} \sum_{i=1}^{n} f^{\prime \prime \prime}(i)-\ldots$$ The second idea is to remove the sums $\sum f^{\prime}, \sum f^{\prime \prime}, \sum f^{\prime \prime \prime}$, on the right by using the same formula, with $f$ successively replaced by $f^{\prime}, f^{\prime \prime}, f^{\prime \prime \prime}$ etc.
I don't really understand the step which replaces $f$ by its primitive. Using $F$ for denoting the primitive of $f$ I obtain $$F(n)-F(0)=\sum_{i=1}^{n} F^{}(i)-\frac{1}{2 !} \sum_{i=1}^{n} F^{\prime}(i)+\frac{1}{3 !} \sum_{i=1}^{n} F^{\prime \prime}(i)-\frac{1}{4 !} \sum_{i=1}^{n} F^{\prime \prime \prime}(i)+\ldots$$ but I don't obtain any expression in terms of an integral. Clearly, $$ F(n) - F(0) = \int_0^n f(x) \textrm{d}x $$ but since the author mentions that he again denotes the primitive by $f$ this doesn't match up with the above formula. Can anyone explain me what my mistake is here?