1

In my numerical analysis lecture notes, the following proof of the error of (simple) trapezoidal rule of $f\in C^2[a,b]$ is presented, based on the error of a linear polynomial interpolation $p$ (with nodes $a,b$): $$ \begin{align*} &\quad \int_a^b f(x)\,dx - \frac{1}{2}(b-a)(f(a)+f(b)) \\ &= \int_a^b f(x)-p(x)\, dx \\ &= \frac{1}{2}\int_a^b f''(\xi_x) (x-a)(x-b)\,dx \\ &\color{red}{= \frac{1}{2}f''(c)\int_a^b (x-a)(x-b)\, dx }\\ &= -\frac{1}{12}f''(c)(b-a)^3 \end{align*} $$ My question is about the red line (the third equality). It seems that the author made use of mean value theorem. However, doesn't this require $\xi_x$ to be continuously chosen? Technically, $\xi_x$ depends on $x$, so $\xi$ is a function of $x$. To apply mean value theorem, we then need $f''\circ\xi$ to be continuous. From the proof of error of polynomial interpolation, I can't really see how $\xi$ can be continuously chosen. Is it true that the above proof is invalid? If so, is there any easy way to rectify it?

durianice
  • 2,624
  • This seems really really weird. I suggest you look at the proof on Wikipedia, which has appropriate detail and handles the general case of multiple interpolation points – FShrike Dec 06 '22 at 17:04
  • 1
    I just found out that this is a duplicate of https://math.stackexchange.com/questions/1819875/error-in-trapezoidal-rule-via-integral-mean-value-theorem?rq=1. My apology. – durianice Dec 06 '22 at 17:09
  • 1
    You can also write $f(x)-p_2(x)=fa,b,x(x-b)$, so that you have an explicitly continuous function for the mean value theorem. Then for the mean value you get $f[a,b,\xi]=\frac{1}{2!}f''(c)$. – Lutz Lehmann Dec 06 '22 at 21:36

0 Answers0