Simpsons metode

Meir presis numerisk integrasjon

Hans Georg Schaathun

Oktober 2016

$$ y = A + Bx + Cx^2$$

$$ \begin{align} f(x_0) &= A + Bx_0 + Cx_0^2 \\ f(x_1) &= A + Bx_1 + Cx_1^2 \\ f(x_2) &= A + Bx_2 + Cx_2^2 \end{align} $$

 

$$ y = A + Bx + Cx^2$$

$$ h = x_1 - x_0 = x_2 - x_1 $$

$$ \begin{align} A - Bh + Ch^2 & = f(x_0) \\ A + B\cdot0 + C\cdot0^2 & = f(x_1) \\ A + Bh + Ch^2 & = f(x_2) \end{align} $$

$$A = f(x_1)$$

$$2A + 2Ch^2 = f(x_0) + f(x_2)$$

$$C = \frac{f(x_0) - 2f(x_1) + f(x_2)}{2h^2}$$

$$ \begin{align} h & = x_1 - x_0 = x_2 - x_1 \\ A &= f(x_1) \\ C &= \frac{f(x_0) - 2f(x_1) + f(x_2)}{2h^2}\\ \end{align} $$

$$S = \int_{-h}^h A + Bx + Cx^2 dx$$

$$S = \big( Ax + \frac{B}2x^2 + \frac{C}3x^3\big)\bigg|_{-h}^h$$

$$S = 2Ah + 2\frac{C}3h^3$$

$$S = 2f(x_1)h + \frac{f(x_0)-2f(x_1)+f(x_2)}{3}h$$

$$S = \frac{h}{3}\cdot[f(x_0)+4f(x_1)+f(x_2)]$$

$$S_{\mathrm{single}} = \frac{h}{3}\cdot[f(x_0)+4f(x_1)+f(x_2)]$$

 

$$S = \frac{h}{3}\cdot\bigg[ \sum_{i=0,n} f(x_i) +4\sum_{\mathrm{odd}\;i}f(x_i) +2\mathop{\sum_{\mathrm{even}\;i}}\limits_{i\neq0,n}f(x_i) \bigg]$$