Post Reply 
HP71B Integral Questions
02-10-2020, 01:33 PM (This post was last modified: 02-10-2020 01:35 PM by Albert Chan.)
Post: #27
RE: HP71B Integral Questions
(02-09-2020 08:33 PM)Wes Loewer Wrote:  
Quote:For this example, extrapolated trapezoid numbers seems to converge with half the error.

This makes perfect sense.
The error bounds for midpoint and trapezoid methods are: |Em | < k(b-a)^3/(24n^2) and |Et | < k(b-a)^3/(12n^2)
So for a given number of intervals (n) the midpoint method has about half the error of the trapezoid method. But for a given number of evaluation points, the trapezoid will have twice as many intervals, so now trapezoid will have about half the error.

The constant k of |Em| and |Et| are not the same k, but depends on actual curve.
Even if the k's are the same, the formulas only give the upper bound, not equality.

Also, INTEGRAL never return raw trapezoid numbers, but a minimum of 3 extrapolations.
(even more extrapolations on top with more than 7 sample points).

When I try compare errors of 2 methods, error ratios goes all over the place. Sad
The two schemes likely bracketed the true area (but, I also found exceptions)

Example, from Kahan's article, Handheld Calculator Evaluates Integrals, page 30

f(x) = sqrt(x)/(x-1) - 1/log(x), x=0 to 1        → Et/Em ≈ -10
u-transformed f(x), u=-1 to 1                    → Et/Em ≈ -0.4
u-transformed f(x), 2 times                      → Et/Em ≈ -0.06

Equivalent formula, with x=w^2 substitution:

g(w) = 2*w^2/((w+1)*(w-1)) - w/log(w), w=0 to 1  → Et/Em ≈ -0.4
u-transformed g(w), u=-1 to 1                    → Et/Em ≈ -0.05
u-transformed g(w), 2 times                      → Et/Em ≈ -0.02 to +0.02

Note: error ratios only consider final few iterations, initial numbers can go wild.

u-transformation make the curve "bumpy", creating area strips errors of opposite signs, cancelling each other.
If u-transformed more than once, area converge faster (at the cost of more time to evaluate functions).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP71B Integral Questions - Albert Chan - 02-02-2020, 03:31 PM
RE: HP71B Integral Questions - Albert Chan - 02-03-2020, 01:58 PM
RE: HP71B Integral Questions - J-F Garnier - 02-03-2020, 03:00 PM
RE: HP71B Integral Questions - Albert Chan - 02-03-2020, 04:15 PM
RE: HP71B Integral Questions - Albert Chan - 02-03-2020, 11:15 PM
RE: HP71B Integral Questions - J-F Garnier - 02-05-2020, 08:43 AM
RE: HP71B Integral Questions - Albert Chan - 02-05-2020, 05:09 PM
RE: HP71B Integral Questions - Wes Loewer - 02-06-2020, 06:53 PM
RE: HP71B Integral Questions - Albert Chan - 02-06-2020, 11:16 PM
RE: HP71B Integral Questions - Wes Loewer - 02-07-2020, 03:49 AM
RE: HP71B Integral Questions - Albert Chan - 02-07-2020, 08:14 AM
RE: HP71B Integral Questions - J-F Garnier - 02-07-2020, 08:23 AM
RE: HP71B Integral Questions - Wes Loewer - 02-07-2020, 01:19 PM
RE: HP71B Integral Questions - Albert Chan - 02-07-2020, 05:08 PM
RE: HP71B Integral Questions - J-F Garnier - 02-07-2020, 05:54 PM
RE: HP71B Integral Questions - Wes Loewer - 02-07-2020, 08:16 PM
RE: HP71B Integral Questions - Wes Loewer - 02-07-2020, 08:12 PM
RE: HP71B Integral Questions - J-F Garnier - 02-05-2020, 06:20 PM
RE: HP71B Integral Questions - Albert Chan - 02-05-2020, 07:52 PM
RE: HP71B Integral Questions - J-F Garnier - 02-06-2020, 08:37 AM
RE: HP71B Integral Questions - Wes Loewer - 02-08-2020, 10:46 AM
RE: HP71B Integral Questions - J-F Garnier - 02-08-2020, 10:59 AM
RE: HP71B Integral Questions - Wes Loewer - 02-08-2020, 03:04 PM
RE: HP71B Integral Questions - Albert Chan - 02-09-2020, 01:43 PM
RE: HP71B Integral Questions - Wes Loewer - 02-09-2020, 08:33 PM
RE: HP71B Integral Questions - Albert Chan - 02-10-2020 01:33 PM
RE: HP71B Integral Questions - Wes Loewer - 02-09-2020, 09:03 PM
RE: HP71B Integral Questions - Albert Chan - 02-11-2020, 05:03 PM
RE: HP71B Integral Questions - Albert Chan - 02-11-2020, 11:57 PM
RE: HP71B Integral Questions - Albert Chan - 02-21-2020, 11:23 PM



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