Accuracy of Integral with epsilon
|
10-09-2021, 08:37 PM
Post: #18
|
|||
|
|||
RE: Accuracy of Integral with epsilon
(10-09-2021 02:27 AM)Paul Dale Wrote:(10-09-2021 02:22 AM)Valentin Albillo Wrote: Are you saying that a complex state-of-the-art Tanh-Sinh method requires 27 evaluations of the integrand (the constant 2) to integrate the constant 2 from -10 to 10 ? Really !? There is never a guarantee that a given function is constant by probing a few points. That should be obvious, no? Naive implementations of Gauss-Legendre quadrature methods may stop at two or three points to fit a constant (polynomial). However, it would be detrimental to give up that early. Evidently, calculators run quite a bit longer on this function for a good reason. My point about Tanh-Sinh was simply that this method doesn't require a huge number of points to converge accurately and it is used in the WP 34S... so make your own conclusions. Tanh-Sinh simply works well for this type of function based on its syntactical structure (duh). More importantly, the function is NOT numerically constant in its present non-simplified form, which is to be expected: noise increases quickly towards -10 and beyond. This noise is already in the order of 10^-2 at x=-18. Tabulating the error in Excel from -10 to -8.9 gives: -5.31248E-08 -6.01538E-08 -5.39791E-08 -1.77564E-08 -1.86315E-08 -1.64802E-08 -5.18465E-10 -8.54069E-09 -1.47008E-08 1.40072E-08 -6.26628E-09 -5.77673E-09 This amount of noise is sufficient to trip up quadrature methods. Of course, the noise may differ with non-IEEE 754 double precision and different implementations of the constituent functions EXP, SINH and COSH. However, a general consequence of the noise and floating point limitations, you can either get lucky to get to the exact result 40 with a few points or unlucky, which can cost you a great deal of time wasted to evaluate points in the presence of noise. The WP 34S and qthsh points reported show exactly what I mean. Also, attempting to push the accuracy beyond 10^8 (or about) is pointless. There is too much noise to make definitive conclusions. - Rob "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)