Error propagation in adaptive Simpson algorithm

07312018, 06:37 PM
Post: #5




RE: Error propagation in adaptive Simpson algorithm
Quote:Worse, integral may converge very well, but converged to a wrong result Great example, this is a badly behaved integral, all numerical methods will suffer due to massive cancellation. So I requested a tolerance of 1e6 and my algorithm converged to a completely wrong value in a couple of seconds. It clearly stopped prematurely, which can happen because of the function, not really anything bad about the algorithm. Then I requested 8 digits, giving a tolerance of 1E8. Now it took some time (didn't time it but felt close to a minute) and gave a good answer with 16 digits correct. It seems now the tighter tolerance avoided the premature stop and the algorithm was able to deal with the cancellation of areas. I would've expected all the smaller areas to cancel each other out with errors around 1E10, to provide a final area close to the 1E8 requested tolerance, but it seems it had to subdivide a lot to get the result. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)