Using Simpson's 1/3 rule with 4 equal intervals, approximate the definite integral of sin(x) from x = 0 to x = pi/2. Give your answer rounded to 3 decimal places.
Show the solution
Simpson's 1/3 rule approximates the integral as (h/3)*[f(x0) + 4f(x1) + 2f(x2) + 4f(x3) + f(x4)], where h is the interval width and the coefficients alternate 4, 2, 4 between the endpoints. With a = 0, b = pi/2, n = 4 intervals, h = (pi/2 - 0)/4 = pi/8. Evaluating f(x) = sin(x) at the five points x = 0, pi/8, pi/4, 3pi/8, pi/2 and combining with the Simpson weights gives an approximation of 1.0001, which rounds to 1.000. This matches the exact value of the integral (the antiderivative -cos(x) evaluated from 0 to pi/2 gives -cos(pi/2)+cos(0) = 0+1 = 1) to three decimal places, illustrating how quickly Simpson's rule converges for a smooth function like sine.