Simpson's Improved rule help?
2 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
John D'Errico
on 15 Nov 2020
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.
0 Comments
See Also
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!