2

I would like to prove that, if $g\in C^3([a,b])$, then:

$$\left|\displaystyle\frac{g(t_n+h)-g(t_n)}{h}-\displaystyle\frac{g'(t_n)+g'(t_n+h)}{2}\right|\leq \displaystyle\frac{h^2}{12}\|g^{(3)}(x)\|,$$

for $t_n, t_n+h \in [a,b]$.

I'm pretty sure this is done by expressing $g(t_n+h)$ in terms of $g(t_n)$ via a Taylor expression, viceversa and then do the difference of the expressions, so that's what I did.

Nonetheless, I reached an expression of the form:

$$\displaystyle\frac{h^2}{6}g^{(3)}(\epsilon_1)-\displaystyle\frac{h^2}{4}g^{(3)}(\epsilon_2).$$

Although, $$\displaystyle\frac{h^2}{6}-\displaystyle\frac{h^2}{4}=-\displaystyle\frac{h^2}{12}.$$ Obviously you cannot do that.

Any help on this one?

whpowell96
  • 5,530
  • Have you tried using Taylor's formula with integral remainder instead? You do have $g \in \mathcal{C}^3$. – Bruno B Jun 10 '23 at 00:13
  • 1
    This is the basic error estimate for the trapezoidal quadrature rule, and also for the implicit trapezoidal method for numerical ODE integration. You can find posts with details under these keywords. – Lutz Lehmann Jun 10 '23 at 05:32
  • @LutzLehmann I didn't find anything doing It this way, therefore I asked this question. – user10000024 Jun 10 '23 at 09:59
  • https://math.stackexchange.com/questions/3463689/deriving-error is perhaps one step too far, my answer in https://math.stackexchange.com/questions/4646783/midpoint-rule-vs-trapezoidal might be too rapid, the same idea is more explicit in what I wrote in https://math.stackexchange.com/questions/1819875/error-in-trapezoidal – Lutz Lehmann Jun 10 '23 at 11:34

1 Answers1

4

You have found out that using separate formulas for both terms leads to apparently unrelated midpoints, and the inability to apply an intermediate-value argument to their difference.

The answer to this situation is to analyze these terms together, and to apply the mean-value theorem only once, for all terms combined, to get only one midpoint. Thus define $$ f(h)=2(g(t+h)-g(t))-h(g'(t+h)+g'(t)) $$ and compute the derivatives and their values at $h=0$ \begin{align} f'(h)&=2g'(t+h)-(g'(t+h)+g'(t))-hg''(t+h)\\ &=g'(t+h)-g'(t)-hg''(t+h),& f'(0)&=0,\\ f''(h)&=-hg'''(t+h),&f''(0)&=0. \end{align} The next derivative is in general non-zero at $h=0$. So we get a point of cubic tangency, via mean value theorems thus $$ \frac{f(h)}{h^3}=\frac{f'(h_1)}{3h_1^2}=\frac{f''(h_2)}{6h_2}=-\frac{g'''(t+h_2)}{6} $$ with $h>h_1>h_2>0$. Restoring the original expression we find thus (with $h_2=\theta h$) $$ \frac{g(t+h)-g(t)}{h}-\frac{g'(t+h)+g'(t)}2=-\frac{h^2}{12}g'''(t+\theta h). $$

This is as equality only valid for scalar functions $g$. For vector-valued functions this is true for every scalar component, but the midpoints can be different.

Lutz Lehmann
  • 126,666