# Error behavior for numerical integration in the case of nonanalytic functions.

In Rethinking Rigor in Calculus: The Role of the Mean Value Theorem (TW Tucker), the author derives error behavior of multiple numerical integration rules (left, right, midpoint,...).

To do that he uses the fact that they are equal to their Taylor series. He does not mention that the functions should be analytic for this to hold. Since numerical integration is not the focus of that short article, the author may be glossing over detail, but my first question is:

1. Is it true that his specific derivation is then only valid for analytic functions? He says that:

With $$I(h) = \int_{-h}^{h}f(x)\,dx$$ We have the Taylor series $$I(h)=2\,f(0)h+2\,f^{''}(0)\frac{h^3}{3!}+\dots$$ $$\text{Trapezoid}(h)= 2h \left[ f(0)+f^{''}(0)\frac{h^2}{2}+\dots \right]$$ And by subtracting the two and looking for the first term that doesn't cancel we get $$Error \approx 2\,f^{''}(0)\left( \frac{1}{2}-\frac{1}{6} \right) h^3$$

I have searched for other derivations of the error bounds of rules (e.g An Introduction to Numerical Analysis (Atkinson)), and I have the impression that

1. One usually derives the same results as the author without passing through Taylor series, is this correct?
What confuses me is statements such as Numerical Integration of Non-analytic Functions (Waterman, et.):

For analytic functions, It is well known that the error in the Euler-Maclaurin formula for numerical Integration can be expressed as an asymptotic series Involving derivatives of the integrand at the endpoints of Integration. This expression must be modified, however, if the Integrand is not analytic over the entire range of integration. Appropriate modified error terms In the Euler-Maclaurin formula were obtained by Navot specifically for the case of a branch sIngulanty at one endpoint of integration, and his work was later extended to apply to a loganthmic singularity. In the present note we obtain a somewhat more general expression for the error which includes the usual formula for analytIC functions, as well as Navot's results, as special cases Extension of the results to higher Newton-Cotes formulas is also discussed, specifically for Simpson's rule.

Finally,

1. If one uses Taylor's theorem instead of Taylor series, can one easily fix the author's derivation? The author subtracts the Taylor series of the function from that of its approximation. One could instead subtract the Taylor expansions (valid for nonanalytic functions as well) of some finite order, is this correct?

And

1. Being nonanalytic is in general not an obstacle when deriving error bounds for basic integration techniques, is this correct?
An example of a paper that specifically targets analytic functions is An Error Analysis for Numerical Multiple Integration (Barnhill) where we read:

However, these bounds are only applicable to functions that are analytic on the region of integration and that are bounded in norm over some cross-product of ellipses containing the region of integration. Sard's error estimates are applicable to a much wider class of functions. (This is, of course, a reason for conjecturing that the Davis-type estimates will be better for analytic functions.)

What you're looking at is really an asymptotic expansion. First let's define little oh notation: $o(f(h))$ is an unspecified function of $h$, say $g(h)$, such that $\lim_{h \to 0} \frac{g(h)}{f(h)}=0$. This is standard notation, but maybe you haven't seen it before, and I'm going to need it here.

When $f$ is continuous, $I(h)=2f(0)h+o(h)$. When $f$ is $C^2$, $I(h)=2f(0)h+2f''(0)h^3/6+o(h^3)$. And so forth. Except when $f$ is analytic, these are not really series...but the result is the same as you would get from finite truncation of the series, so it can be convenient to "pretend" that you have a proper series. That said, it turns out that when $f$ is $C^\infty$ but not necessarily analytic, one can actually write all of these equalities, but they typically will start giving you worse results at a certain finite order for each fixed $h$. This is a typical characteristic of an asymptotic expansion.

These derivations don't really need to go through Taylor's theorem necessarily but they'll wind up reinventing the wheel if the hypotheses are the same. Of course the situation is different in the presence of singularities.

For the explicit application of these ideas to numerical analysis, see Richardson extrapolation and in particular Romberg integration.

• Thanks for the answer despite the vagueness of my question. - Did you mean 'Except when f is nonanalytic'?
• By 'the result is the same' do you mean the result of comparing both sides of the equality? By 'giving you worse results at a certain finite order for each fixed $h$' do you mean that for a fixed h, as the order is increased, the error between the function and its approximation gets worse, but the equality still holds because the error is swallowed by the remainder that was truncated?
• @weakmoons In regards to the first question, no, there's a double negative: they're proper series when $f$ is analytic and only asymptotic expansions otherwise. Yes, "the result is the same" means that when you have analyticity and truncate the (convergent!) series, you get the same result as when you have just finitely many derivatives and truncate the (nonconvergent!) expansion.
• And for the last thing, also yes. The point is that if you have a sequence $f_k(h)$ with $f_k(h)=o(h^k)$, $f_k(h)$ is not necessarily decreasing even though their "order" is increasing. Typically it decreases for a while and then increases, except when you have analyticity.