How do you write the Simpson’s rule and Trapezoid rule approximations to the intsinx/x over the inteval [0,1] with n=6?

1 Answer
Mar 7, 2015

Simpson's sule with n=6 is simply:
int_0^1f(x)=1/18[f(0)+4f(1/6)+2f(2/6)+4f(3/6)+2f(4/6)+4f(5/6)+f(1)]

Here f(x) is just sinx/x and so one must calculate this for x=0, 1/6, ... 5/6, 1 and put the results into the formula.

The Trapezoidal rule is similar:
int_0^1f(x)=1/12[f(0)+2f(1/6)+2f(2/6)+2f(3/6)+2f(4/6)+2f(5/6)+f(1)]

Note that, although f(0) does not exist, we know that lim_(xrarr0)f(x)=lim_(xrarr0)sinx/x=1.

Use 1 where the formula calls for f(0).