1

Let $I(f)=\int_a^b f(x)\, dx$. The midpoint rule (open Newton-Cotes for $n=0$) is $I_0(f)=(b-a)f(\frac{a+b}{2})$

Show: For $f\in C^1([a,b])$ holds $|I(f)-I_0(f)|\leq \frac{(b-a)^2}{4}\|f'\|_\infty$

In the lecture we have shown some error estimations, which should not work here. They require, that $I_n$ is exact of order $n$. But $I_0(f)$ should not be exact at all:

Let $I_n$ be a quadrature formula, which is exact of order $n$. Let $f\in C^1([a,b])$, $W(x)=\prod_{j=0}^n (x-x_j)$, then is $|I(f)-I_n(f)|\leq C_n\|f^{n+1}\|_\infty$ where $C_n=\frac{1}{(n+1)!}\int_a^b w(x)|W(x)|\, dx$.

[w(x) should be the polynomial \prod_{k=0}^m (x-x_k), where $x_0,\dotso, x_k$ are the support points of a polynomial interpolation.]

An other error estimation requires $n>0$ because in the formula you have $h=\frac{b-a}{n}$, but here $n=0$.

Let $f\in C^{n+1}([a,b])$. For the closed Newton-Cotes formula is $|I(f)-I_n(f)|\leq h^{n+2}c_n\|f^{(n+1)}\|_\infty$, $h=\frac{b-a}{n}$ where $c_n=\frac{1}{(n+1)!}\int_0^n\prod_{k=0}^n |t-k|\, dt \|w\|_\infty$

So both error estimations should not work here. How can I approach this problem? It should not be to difficult, but I am stuck.

Do you have a hint? Thanks in advance.

Cornman
  • 11,065
  • 4
  • 30
  • 57
  • Unless I am mistaken, $I_0$ is exact of order $n=0$, i.e. for constant functions. – Martin R May 04 '19 at 22:30
  • @MartinR Yes, that is what I thought too, so I wanted to use the first error estimation I have quoted. But I failed. – Cornman May 04 '19 at 22:35

1 Answers1

2

Define interval length $h =b-a$ and midpoint $c = (a+b)/2$.

Note that $b-c = c-a = (b-a)/2 = h/2.$

The midpoint approximation error is

$$E_M = \int_{a}^{b} f(x) \, dx - hf(c) = \int_{a}^{b} [f(x) - f(c)] \, dx.$$

Using a Taylor approximation (or MVT), there exists $\xi_x$ between $x$ and $c$ such that

$$f(x) = f(c) + f'(\xi_x)(x-c) $$

We get

$$|E_M| = \left|\int_{a}^{b} f'(\xi_x)(x-c) \, dx\right| \leqslant\int_{a}^{b} |f'(\xi_x)||x-c| \, dx\leqslant \|f'\|_\infty\int_{a}^{b} |x-c| \, dx = \frac{h^2}{4} \|f'\|_\infty$$

Note that

$$\int_{a}^{b} |x-c| \, dx = \int_c^b (x-c)\, dx + \int_a^c (c - x) \, dx = \frac{1}{2}(b-c)^2 + \frac{1}{2} (c-a)^2 = \frac{1}{2} \frac{h^2}{4} + \frac{1}{2} \frac{h^2}{4} = \frac{h^2}{4}$$

RRL
  • 90,707
  • How do you get $f(x)=f(c)+f'(\xi_x)(x-c)$ from the Taylor approximation? I see, that we have $T_1 f(x,c)=\sum_{k=0}^1 \frac{f^{(k)}}{k!}(x-c)^k=f(c)+f'(c)(x-c)$ but how do you get your equation $f(x)=f(c)+f'(\xi_x)(x-c)$, and how is it justified to use the MVT, when we have the intervall $[x,c]$, but $x$ is variable, isn't it?Also: How do you get $|E_M|=|\int_a^b f'(\xi_x)(x-c), dx|$, do we not get $|E_M|=|\int_a^b f(c)+f'(\xi_x)(x-c), dx+hf(c)|$ ? That is what I do not understand. Thank you! – Cornman May 04 '19 at 23:00
  • @RPL I see $|E_M|=|\int_a^b f'(\xi_x)(x-c), dx| now. It is a simple calculation... sorry, should have seen it immediatly. – Cornman May 04 '19 at 23:09
  • @Cornman: We really don’t have to understand much about the nature of $\xi_x$. All we need is that in the interval $|f(x) -f(c)| = |f’(\xi_x)||x-c| \leqslant |f’|_\infty|x-c|$ and use this estimate for bounding the integral. – RRL May 04 '19 at 23:23
  • @RPL Yes, I noticed that we just estimate $f'(\xi_x)$ by $|f'|_\infty$ but still, it seems odd, to have an interval depending on a variable $x$. And I wonder if it is sound. – Cornman May 04 '19 at 23:27
  • Like I said we can bypass the entire issue of the mapping $x \mapsto \xi_x$. The intermediate point may not be unique in fact. We are just estimating the error by integrating $|f(x) - f(c)|$ and the bound for that in terms of $|f’|_\infty$ is sound — since the derivative is assumed to be continuous and bounded here. – RRL May 04 '19 at 23:36
  • @RPL Ah, I think I understand it now. We give for every $x\in [a,b]$ a $\xi_x$ such that $f(x)=f(c)+f'(\xi_x)(x-c)$. So we do not actually view the interval $[a,x]$, but we can choose such an $\xi_x$ for every $x$. We 'pretend' that x is constant for a moment and can do that for every $x$ in the interval. So is this one of those sneaky applications of the axiom of choice? I think I got it now, but I have never seen something like this befor. Interesting! – Cornman May 04 '19 at 23:44
  • I just posted a similar question: https://math.stackexchange.com/questions/3215189/midpoint-rule-error-estimation-for-f-in-c2 which might be of your interest. I would be thankful if you look at it too, and might give a hint how to approach this inequality. – Cornman May 05 '19 at 22:54