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 = h/3[f(x0) + 4f(x1) + f(x2)]
S2 = h/3 [f(a) + 4 f((a+b)/2) + f(b)]
Where h = (b - a)/2
This is the Simpson's 1/3 rule for integration.