(PC-12xx~14xx) qthsh Tanh-Sinh quadrature
|
04-06-2021, 11:36 PM
Post: #30
|
|||
|
|||
RE: (PC-12xx~14xx) qthsh Tanh-Sinh quadrature
(04-06-2021 04:19 PM)Albert Chan Wrote: Default 0.0 + ArithmeticError + Inf/NaN test, we get this: It may not be necessarily the case that choosing zero as default is better than reusing the previous point, or vice versa. However, I suspect that if a function in the limit approaches a nonzero finite value, then reusing previous points as an approximation of that value could be more accurate, if these weighted values contributes to the sum. Among the 818 integrations with qthsh, I found that almost all of them produced the same integral regardless of the choice of zero or reuse by default. There are only 8 integrals that differ (I've added the limits): When fp=0 and fm=0 is better as default for f on [a,b]: Code: LN(COS(x)) [0,1.570796327] lim x->pi/2+ f(x)=-inf When reusing previous points is better as default for f on [a,b]: Code: 1/(1+COS(x)^x) [-1.570796327,1.570796327] lim x->pi/2+ f(x)=1 lim x->-pi/2- f(x)=0 To determine these 8 integrals and categorize them I've used the absolute error of the method compared to the exact result, i.e. NOT the estimated error by the method. When reusing previous points by default is better, then the absolute error with the exact value is substantially better by several orders in magnitude: Code: 1/(1+COS(x)^x) 4.44E-16 versus 6.89E-11 For the other default case of zero being better, the absolute error difference is small, mostly by a factor of about 2, so this looks more like noise. Not a formal proof, but the empirical support appears somewhat convincing. - Rob "I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx... |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)