Adaptive Simpson and Romberg integration methods
|
03-26-2021, 07:12 AM
Post: #16
|
|||
|
|||
RE: Adaptive Simpson and Romberg integration methods
(03-25-2021 07:19 PM)robve Wrote: No, that approach has problems and is not in the right direction, though it could work but obviously not as well. Just for clarification... Since HP's implementation of the Romberg method did not evaluate the endpoints, I incorrectly jumped to the conclusion that midpoints were being used rather than trapezoids. However, as was indicated, the midpoint method would require trisections to reuse previous values, but the implementation is clearly bisecting which points back to trapezoids. What I was missing was the fact that the reason the endpoints don't need to be evaluated isn't because of the method but rather because of the substitution: integral from -1 to 1 of f(x) dx = integral from -1 to 1 of f( (1/2)*(3u - u^3) ) * (3/2)(1-u^2) du At the endpoints (1 - u^2) becomes zero, so there is no need to evaluate the function at the endpoints since the result will be multiplied by zero. (This assumes you have a proper integral.) For some improper integrals, such as integral from -1 to 1 of 1/sqrt(1-x^2) dx, the endpoints after substitution don't approach zero but are still finite, so using midpoints instead of trapezoids would produce much better results. I guess the simplicity of bisections outweighed the advantages of using midpoints. When you look at the memory restrictions of those early calculators, it's understandable that they would go with the simplest method possible. -wes |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)