How to monitor quad_qags error codes for the inner integral?



On Thu, Dec 15, 2011 at 12:12 PM, Edwin Woollett <woollett at charter.net>wrote:

>
> I am so far not successful in trying to use quad_qags
> for a double integral in which I monitor the error code returned by the
> inner integral:
>

I think you need to do something like this:

quad_qags(lambda([x], block([r : quad_qags(x*y^2,y,0,1)], print(r[4]),
r[1])), x, 0, 1);

0
0
0
...
0
[.166666, 1.85e-15, 21, 0]

Of course, the final returned error estimate is highly suspect because it
doesn't include any of the inaccuracies of the inner integral.  And no
check is made if the inner quad_qags doesn't achieve the desired accuracy.

Ray