Interpolando tres puntos \( (x_{0}, f(x_{0})) \), \( (x_{1}, f(x_{1})) \) y \( (x_{2}, f(x_{2})) \), mediante un polinomio de Lagrange $$ \begin{equation*} f(x) = \begin{bmatrix} \cfrac{(x - x_{1})(x - x_{2})}{(x_{0} - x_{1})(x_{0} - x_{2})} \\ \cfrac{(x - x_{0})(x - x_{2})}{(x_{1} - x_{0})(x_{1} - x_{2})} \\ \cfrac{(x - x_{0})(x - x_{1})}{(x_{2} - x_{0})(x_{2} - x_{1})} \end{bmatrix}^{T} \begin{bmatrix} f(x_{0}) \\ f(x_{1}) \\ f(x_{2}) \end{bmatrix} \end{equation*} $$
Integrando $$ \begin{equation*} \int_{x_{0}}^{x_{2}} f(x) \ dx = \begin{bmatrix} -\cfrac{(2 x_{0} - 3 x_{1} + x_{2})(x_{0} - x_{2})}{6 (x_{0} - x_{1})} \\ -\cfrac{(x_{0} - x_{2})^{3}}{6 (x_{0} - x_{1})(x_{1} - x_{2})} \\ \cfrac{(x_{0} - x_{2})(x_{0} - 3 x_{1} + 2 x_{2})}{6 (x_{1} - x_{2})} \end{bmatrix}^{T} \begin{bmatrix} f(x_{0}) \\ f(x_{1}) \\ f(x_{2}) \end{bmatrix} \end{equation*} $$