Post Reply 
Numerical integration vs. integrals that are zero
03-05-2019, 08:36 PM (This post was last modified: 03-05-2019 09:04 PM by Thomas Okken.)
Post: #4
RE: Numerical integration vs. integrals that are zero
(03-05-2019 07:47 PM)Thomas Klemm Wrote:  
(03-05-2019 02:21 PM)Thomas Okken Wrote:  Does anyone have any insights as to how the HP-42S integrator, or other versions of HP INTEG, deal with relative errors vs. integrals that are zero?

Maybe it is related to this:
Quote:The Romberg terminates when three passes evaluate to the same value under the current display setting.

The 42S ignores the display setting, but it could check for three passes evaluating to the same result. With limits 0 to 360, I assume every pass evaluates to exactly zero, and it does stop after 3 passes (7 evaluations of the integrand), with an absolute error of 2.19e-4 while ACC=1e-6.

(03-05-2019 07:47 PM)Thomas Klemm Wrote:  Just out of curiosity: What happens with the integral of \(\sin(x)\) if you shift the interval from say 7 to 367?
I don't have my HP-42S here to test but the HP-48GX returns -2.61E-12 instead of 0.

That depends on ACC. With ACC=1e-6, it returns 3.03e-7 with an absolute error of 2.29e-4, so a relative error of 757, after 6 steps, or 63 evaluations of the integrand.

With ACC=1e-3 => -7.56e-4 ± 2.30e-1 (4 steps)
With ACC=1e-6 => 3.03e-7 ± 2.29e-4 (6 steps)
With ACC=1e-9 => 3.42e-11 ± 2.29e-7 (7 steps)
With ACC=1e-12 => 1.19e-10 ± 2.29e-10 (8 steps)
With ACC=1e-15 => 1.19e-10 ± 2.29e-10 (8 steps)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Numerical integration vs. integrals that are zero - Thomas Okken - 03-05-2019 08:36 PM



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