We can get a quick approximation for definite integrals when we divide a small interval [a, b]
into two parts. Therefore, after dividing the interval, we get;
x0= a, x1= a + b, x2 = b
Hence, we can write the approximation as;
a∫b f(x) dx ≈ S2 = 3h/8[f(x0) + 2f(x1) + 3f(x2)]
S2 = 3h/8 [f(a) + 2f(x1)+3f(x2) + f(b)]
Where h = (b - a)/2
This is the Simpson's 3/8 rule for integration.