Talk:Simpson's rule
This is the talk page for discussing improvements to the Simpson's rule article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Archives: 1 |
This article is rated B-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
Alternative Extended Simpson's rule
- This is another formulation of a Composite Simpson's rule. Instead of applying Simpson's rule to disjoint segments of the integral to be approximated, Simpson's rule is applied to overlapping segments.
The above text was added to the article. Something seems to be wrong with the formula since the coefficients do not average to 1. Could we please have a reference to this formula? In the mean time, I moved the text from the article to here. -- Jitse Niesen (talk) 08:42, 13 September 2008 (UTC)
- Yes, they do (if you combine the 17's into a 34 rather than counting an extra interval). But you're right to be suspicious of it, since it was preseneted without a source. Dicklyon (talk) 17:02, 13 September 2008 (UTC)
- I didn't check what happens if you average all the coefficients listed; indeed, you then get 1. I tried a short cut: locate the bit that is repeated (4/3, 2/3 in the composite Simpson's rule) and compute the average for that. I don't see how the new rule works for general n. Perhaps the coefficients depend on n? Anyway, it does not make much sense to discuss it without a reference. -- Jitse Niesen (talk) 01:45, 15 September 2008 (UTC)
- I'm presuming that at the dot dot dot, the 48 is repeated; so the average remains 1 always. But yes we need a source to understand it better. Dicklyon (talk) 05:23, 15 September 2008 (UTC)
- Here it is, the "alternative extended Simpson's rule" in Numerical Recipes in Pascal, By William H. Press, Brian P. Flannery, William T. Vetterling, Saul A. Teukolsky. Dicklyon (talk) 05:29, 15 September 2008 (UTC)
- Also equation 35 in https://mathworld.wolfram.com/Newton-CotesFormulas.html which is more easily accessible. -- Avi (talk) 22:11, 14 December 2022 (UTC)
too many implementations
There are too many implementations of the algorithm. From MOS:CODE: "Multiple source code implementations are not appropriate unless they contrast specific aspects of the code and that contrast is important to the encyclopedic content of the article." 00:57, 5 December 2013 (UTC)
- I agree. Having an Octave version in addition to a Matlab version is especially silly. I'm removing everything except the python version. Ragnarstroberg (talk) 15:21, 9 December 2013 (UTC)
- I agree with that. Bubba73 You talkin' to me? 23:37, 9 December 2013 (UTC)
- I added an R version as that language is used more often for statistics than Python -- Avi (talk) 22:10, 14 December 2022 (UTC)
Cartwright 2017 - Necessary adjustments
This section is pinned and will not be automatically archived. |
The substitutions needed are:
- replacing with and vice versa
- replacing with and vice versa
Both of these reflect the fact we are trying to calculate the last slice instead of the first. It's easier to crunch through the algebra if you then replace the subtractions with their associated differences:
- with
- with
- with
Doing the above, crunching through, and simplifying the results produces the values for and seen in the text. -- Avi (talk) 21:51, 18 December 2022 (UTC)