1
$\begingroup$

Given a set of datapoints, I was thinking about when to use which (closed) Newton-Cotes formula?

I developed a decision tree which would go like this:

  1. Are the given datapoints equally spaced? No --> Composite trapezoidal rule
  2. Yes! Is the number of split-intervals multiple of 4? (ex. 4,8,12,16,..) Yes! ---> Composite Boole's Rule
  3. No! Is the number of split-intervals multiple of 3? (ex. 3,9,12,15,..) Yes! ---> Composite Simpson's 3/8
  4. No! Is the number of split-intervals even? (ex. 2,4,6,8,10,..) Yes! ---> Composite Simpson's 1/8
  5. No! Use composite trapezoidal!

Is it right? If not please correct me. And it would be really helpful, if someone could provide me with the formulas of the composite Simpson's 1/8 and composite Simpson's 3/8, as I am not sure I have the right ones.

And last question: for 3 split-intervals, is it better to use composite trapezoidal rule or 1 simpson's 3/8 rule?

Thank you in advance!

$\endgroup$
  • $\begingroup$ Studying the error terms for the Newton-Cotes-formulas, you easily see that usually the $3/8$-rule is far better than composite trapeziodal rule. Basically, I would agree to your check-list, but this might be a subjective matter. $\endgroup$ – Peter Jul 13 '18 at 20:01
  • $\begingroup$ Thanks for the answer! Yeah in pratice I wouldn't. But as it is an exam, he wouldn't give something really so much complicated.. So basically a number of datapoints, and we would have to say which method we should use I pretend.. So preparing such a check-list would help I think $\endgroup$ – ZelelB Jul 13 '18 at 20:05
  • $\begingroup$ So you actually are given points and have to choose the proper method for numerical integration ? $\endgroup$ – Peter Jul 13 '18 at 20:07
  • $\begingroup$ exactly.. A possible question would be: we have 21 points (without precisely give the values of the points) and would approximate the integral. Which method would you choose? Or they could give us 6 or 7 datapoints (with values) and tell us to numerically approximate the integral with the best method for this points. That's why I'm asking you, what do you think of my decision tree above, and about the formulas of composite Simpson's 1/3 and 1/8. Could you please check in details my conditions, and tell me, if that's right? Thanks so much! $\endgroup$ – ZelelB Jul 13 '18 at 20:20
  • $\begingroup$ In the case of equally spaced nodes : If the number of nodes is odd and at least $3$, you can choose the composite $3$-point-simpson-rule, which is a good choice , but not necessarily the best choice. For seven nodes for example, the composite $4$-point-simpson-rule is better. If the number is even and at least $4$, you can (when you have more than $4$ nodes) combine the $3$-point rule and the $4$-point rule (which only applies for the first $4$ nodes, for example). This gives you a reasonable choice, but to find the optimal choice, is harder. $\endgroup$ – Peter Jul 13 '18 at 20:49
0
$\begingroup$

Assuming that you are restricted to Newton-Cotes, if your data points aren't equally spaced, all you've got is the trapezoidal rule, crappy though it is. There are better things you can attempt, but my guess is that they aren't allowed for you at this point. Cases $2$ and $4$ could be consolidated to the plan to use $n$ steps of Romberg's rule if the number of split-intervals is a multiple of $2^n$. Simpson's $1/3$ rule is the result of one step of Romberg's rule and Boole's rule is two steps. Romberg's rule is easier to remember than Boole's rule in that you just take $4^n$ times the result obtained at step $n-1$ for the current interval width minus $1$ times the result obtained at step $n-1$ for double the current width and divide by $4^n-1$ to get the step $n$ result. Step $0$ is the trapezoidal rule. Romberg's rule gives you some kind of idea about how accurate your results are because they should start agreeing with each other as the steps progress. Also it gets high-order results without the error explosion that occurs if you try to do the same via Newton-Cotes.

If the split-intervals are equally spaced but there is an odd number of them, the normal thing to do is to apply Simpson's $3/8$ rule to the first $3$ split-intervals and then apply Simpson's composite $1/3$ rule to the rest of them. This way you don't have to fall back on the horrible trapezoidal rule just because the number of split-intervals is odd

$\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.