Subject: proposal to cut out romberg and quanc8 functions
From: Robert Dodier
Date: Wed, 3 Jan 2007 10:35:26 -0700
On 1/3/07, Michel Van den Bergh <michel.vandenbergh at uhasselt.be> wrote:
> > Robert> quad_qags (lambda ([y], quad_qags (lambda ([x], x^2 + y^2), x, 0,
> > Robert> y)[1]), y, 0, 1);
> > Robert> => [.3333333333333333, 3.70074341541719E-15, 21, 0]
> >
> > Just a note for the unwary: The error estimate produced here
> > (3.7e-15) is probably way off because it doesn't take into account the
> > error produced by the inner quad_qags.
>
> Hmm true! I assume the original romberg did not have this problem?
romberg and quanc8 are susceptible to the same problem, for the same
reason: the error estimate of the inner integration is ignored.
To do a 2-d integral correctly as a nested 1-d integration, the outer
integration should take into account the error. It could be done with
interval arithmetic.
Better still is to use a method specifically for multidimensional problems.
best
Robert