0
$\begingroup$

I am trying to work with Simpson's 3/8 rule, but I wanted to double check my formula:

$$I(f) = \int_a^bf(x) dx \ \approxeq \ \frac{3h}{8}\left(f(a) \ + \ 3f\left(\frac{a+b}{3}\right) \ + \ 3f\left(2\left(\frac{a+b}{3}\right)\right) \ + f(b)\right)$$

However, wikipedia has the formula as:

$$I(f) = \int_a^bf(x) dx \ \approxeq \ \frac{3h}{8}\left(f(a) \ + \ 3f\left(\frac{2a+b}{3}\right) \ + \ 3f\left(\frac{a+2b}{3}\right) \ + f(b)\right)$$

I arrived at my formula by thinking I was calculating $f(x)$ at evenly spaced values of x, but now I'm not so sure.

$\endgroup$
1
$\begingroup$

Note that the wiki has evenly spaced values, for any consecutive pair in their formula the gap is $\frac{b-a}{3}$. Your steps do not obey that, the gaps I think are $\frac{b-2a}{3}$, $\frac{a+b}{3}$, and $\frac{2a+b}{3}$.

$\endgroup$
  • $\begingroup$ Thanks guys, I can see why I was wrong now - I just wanted to know if I was, and more importantly, why, so I don't make the mistake again :) $\endgroup$ – user152118 Feb 25 '15 at 14:34
0
$\begingroup$

The Wikipedia formula is right. Note that with your formula, if $a,b$ are reasonably large, your interior points fall outside the range of interest. If $a=9,b=12$, your second point is $f(7)$ and your third is $f(14)$, while Wikipedia's are $f(10)$ and $f(11)$ as desired.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.