Most iterative numerical methods should give the exact result if you used an infinite number of iterations (e.g. if h = 0 in numerical integration). If the Answer = A and you could only run up to Nmax iterations:

A(1/N) = A(1/Nmax) + A'(1/Nmax) [ (1/N) - (1/Nmax) ] + ...

and the exact N wpeF.jpg (813 bytes)result:

A(0) A(1/Nmax) + A'(1/Nmax) [- (1/Nmax)]

The numerical derivative can be evaluated if you also ran a calculation with a different number of iterations:

A'(1/Nmax) [ A(1/Nother) - A(1/Nmax) ] / [(1/Nother) - (1/Nmax)]

plug in and simplify to:

exact result [ Nmax A(1/Nmax) - Nother A(1/Nother) ]/(Nmax-Nother)

Sometimes it is important to consider higher order terms in the Taylor series... for example, if you have a second-order method, with error O(N^2), use N^2 instead of N throughout all the equations above.