For Simpson’s rule take 10 intervals
Here (b−a)/n = (10−0)/10 = 1 = Δx
The area under the curve y = x2 is given by
Δx/3(y0 + 4y1 + 2y2 + 4y3 + 2y4 +···+ 4yn−1 + yn)
The ordinates are found by substituting x = 0, 1, 2 ··· 10 in the equation y = x2. Thus
area = 1/3 (0 + 4 + 8 + 36 + 32 + 100 + 72 +196 +128 + 324 + 100) = 333.3
In this case Simpson’s rule happens to give exactly the same result as that from direct integration.