Estimate the error in the trapezoidal rule

137 Views Asked by At

I have the following exercise:

We numerically approximate the integral $\int_{x_{L}}^{x_{R}}f(x)dx$ with the trapezoidal rule, using $x_{L}$ and $x_{R}$ as the only nodes. Next, we halve the interval $[x_{L},\frac{x_{L}+x_{R}}{2}]$ and $[\frac{x_{L}+x_{R}}{2},x_{R}]$ and apply the trapezoidal rule over each of these two subintervals to approximate $\int_{x_{L}}^{x_{R}}f(x)dx$.

Estimate the error in the trapezoidal rule with step size $h=x_{R}-x_{L}$, using Richardson extrapolation.

I determined that integral can be rewritten as \begin{equation}T_{2}(f)=(x_{R}-x_{L})(\frac{1}{2}f(x_{L})+f(\frac{x_{L}+x_{R}}{2})+\frac{1}{2}f(x_{R}))\end{equation}

Now I believe the error is given by \begin{equation}error=\frac{-h^{2}}{12}(f^{\prime}(x_{R})-f^{\prime}(x_{L}))\end{equation} I don't understand how I should be using the halve of the interval to compute the error here. Could someone help me with that?