Adaptive Simpson and Romberg integration methods
|
03-25-2021, 10:13 PM
(This post was last modified: 03-25-2021 10:17 PM by robve.)
Post: #13
|
|||
|
|||
RE: Adaptive Simpson and Romberg integration methods
(03-25-2021 08:43 PM)Albert Chan Wrote: As you had mentioned, with bisecting intervals, you cannot reuse previous points. It looks like (in the code?) you're aligning the midpoints to derive a closed formula to compare trapezoidal to midpoint and reuse points, right? I got that. It makes sense to do this to compare the errors of the trapezoidal versus midpoint results. I expect the Romberg open interval method to converge slower, not only in practice, but also in theory, as we know by the error behaviors: at each midpoint step the error decreases by 1/9th it size (while evaluating three times as many points), whereas at each trapezoidal step the error decreases by 1/4th its size (while evaluating two times as many points). What I was trying to say is that the extended midpoint points of the open interval are not aligned to the extended trapezoidal points of the closed interval. So that everyone understands to avoid confusion. We can also illustrate this by running the code. The first 9 points for each method on a=0 to b=1 are: - Closed (extended trapezoidal): x=0 x=1 x=0.5 x=0.25 x=0.75 x=0.125 x=0.375 x=0.625 x=0.875 - Open (extended midpoint): x=0.5 x=0.166667 x=0.833333 x=0.0555556 x=0.277778 x=0.388889 x=0.611111 x=0.722222 x=0.944444 The same number of points, not aligned except the first and only one x=0.5. - Rob "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)