We fix an integer $n \in \mathbb{N}^*$ and consider a function $g : [0,n] \rightarrow \mathbb{R}$ of class $\mathcal{C}^\infty$. The polynomial $B_1$ is as defined in the sequence $(B_m)$.
Show that
$$\int_0^n g(x)\,\mathrm{d}x = \sum_{k=0}^{n-1} \frac{g(k) + g(k+1)}{2} - \int_0^n B_1(x - \lfloor x \rfloor) g'(x)\,\mathrm{d}x.$$