Using a successive double integration by parts show that the integral of $f(x)$ between $x_i$ and $x_{i+2}$ is equal the following expression [closed]

Show using a successive double integration by parts show that the integral of <span class=$f(x)$ between $x_i$ and $x_{i+2}$ is equal to this expression :" />

Show using a successive double integration by parts show that the integral of $f(x)$ between $x_i$ and $x_{i+2}$ is equal to this expression :


Solution 1:

As follows:

\begin{align} &\int_{x_i}^{x_{i+2}}f(x)\,\text{d}x=\underbrace{\frac{1}{2}\int_{x_i}^{x_{i+2}}f(x)\,\text{d}x}_{\text{p.p.}\begin{array}{ll}u=f~&~u'=f'\\v=x-x_i&v'=1\end{array} }+\underbrace{\frac{1}{2}\int_{x_i}^{x_{i+2}}f(x)\,\text{d}x}_{\text{p.p.}\begin{array}{ll} u=f~&~u'=f'\\v=x-x_{i+2}&~v'=1\end{array} }=\nonumber \\ &\frac{1}{2}f(x_{i+2})(x_{i+2}-x_i)+\frac{1}{2}f(x_{i})(x_{i+2}-x_i)-\frac{1}{2}\int_{x_i}^{x_{i+2}}f'(x)(x-x_i)\,\text{d}x-\frac{1}{2}\int_{x_i}^{x_{i+2}}f'(x)(x-x_{i+2})\,\text{d}x=\nonumber\\ &(x_{i+2}-x_i)\frac{f(x_{i+2})+f(x_i)}{2}-\underbrace{\int_{x_i}^{x_{i+2}}f'(x)\left[x-\frac{x_i+x_{i+2}}{2}\right]\,\text{d}x}_{\text{p.p.}\begin{array}{ll} u=f'~&~u'=f''\\v=\frac{1}{2}(x-x_i)(x-x_{i+2})&v'=x-\frac{x_i+x_{i+2}}{2}\end{array}}=\nonumber \\ &(x_{i+2}-x_i)\frac{f(x_{i+2})+f(x_i)}{2}+\frac{1}{2}\int_{x_i}^{x_{i+2}}f''(x)(x-x_i)(x-x_{i+2})\,\text{d}x. \nonumber \end{align}