Simpson's Improved rule help?

1 次查看(过去 30 天)
Steve
Steve 2011-10-16
Hello Experts,
Given interval [a,b], function f
S(a,b) = h/3 * [f(a) + 4*f(a+h) + f(b)]
S(a,(a+b)/2) = h/6 * [f(a) + 4*f(a + h/2) + f(a+h)]
S((a+b)/2,b) = h/6 * [f(a+h)+4*f(a+3*h/2) +f(b)]
h = (b-a)/2
S(a,b) is the Simpson app. in the intervals [a,(a+b)/2] and [(a+b)/2,b] with partition of each to 2 sub-intervals. This makes S(a,(a+b)/2) + S((a+b)/2,b) is the Simpson complicated method to approx. int from a to b of f(x) dx in the [a,b] interval with partition to 4 sub-intervals (equal) of length h/2 = (b-a)/4.
I also know that if I calculate S(a,b) ,S(a,(a+b)/2), S((a+b)/2,b) and if for epsilon>0 :
S(a,b) - S(a,(a+b)/2) - S((a+b)/2,b) < 15*epsilon then int from a to b of f(x) dx is approx. ~ S(a,(a+b)/2) + S((a+b)/2,b).
QUESTION:
What is the name of this method? And given a,b,f,tol(=epsilon) and max number of partitions n how to build an algorithm to approximate the integral?
Thanks a lot for your patience and hope for your informative answer.

回答(1 个)

John D'Errico
John D'Errico 2020-11-15
What is the name for this method? It is just a basic Simpson scheme where the interval is subdivided, recursively. As such, it formed the basis for many of the older numerical integration tools such as quad. At the same time, you can gain in the recursive subdivision if you use a Richardson extrapolation. Since that is not described in your question at all, the algorthm described is a comparatively poor one, since it does not take advantage of Richardson extrapolation, which effectively gives you a higher order scheme, while also telling you when to stop the recursive subdivision.

类别

Help CenterFile Exchange 中查找有关 Signal Generation and Preprocessing 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by