Question: If the trapezoidal rule is used to approximate the integral of the function $f$ over the interval $[a,b]$ with 201 evenly spaced dissection points, estimate the quadrature error for


For this style of question would I use the formula

$$error \le \sum_{i=1}^{N} \frac{-1}{12}\left(\frac{b-a}{N}\right)^3 f''(c_i)$$

to find the error?

Where N is the number of equal length intervals, [a,b] is the full inteval, $c_i$ is the midpoint of each interval and $f$ is $log(1+x^2)$.

If this is the case, how do I find $c_i$?


1 Answer 1


Instead of adding up the estimates for the local errors, we can use the standard expression for the global error, which in general is $$-\frac{(b-a)^3}{12N^2}f''(c),$$ where $c$ is a number between $a$ and $b$. In our case, $a=0$ and $b=1$. The number $N$ of subintervals is $200$.

Now we need an estimate for $f''(c)$. The second derivative is, I think, $\dfrac{2(1-x^2)}{(1+x^2)^2}$. As $x$ increases, the numerator is decreasing, and the denominator is increasing. Thus $f''(x)$ is steadily decreasing. It is equal to $2$ at $x=0$, so $0\le f''(x)\lt 2$.

Remark: Or else use the local errors, and add them up. Since the second derivative is everywhere positive and $\lt 2$, the local error is always negative and $\lt \dfrac{1}{12}\cdot\dfrac{1}{(200)^3}\cdot 2$ in absolute value, so in absolute value the total error is $\le 200\cdot \dfrac{1}{12}\cdot\dfrac{1}{(200)^3}\cdot 2$.

Typically, the error estimates produced by this kind of calculation are unduly pessimistic. One can ordinarily get more useful information by comparing $T_{100}$ with $T_{200}$. The number $T_{100}$ is typically computed on the way to computing $T_{200}$, so it involves no additional cost.

  • $\begingroup$ Thank you, the local and global errors were confusing me a bit but I think I get it now! $\endgroup$
    – Nicky
    Oct 17, 2012 at 19:08
  • $\begingroup$ You can use the "local" errors version. The $N$ individual errors are bounded as given by your formmula, so their sum is $\le N$ times the maximum local error. For that maximum, maximimize the second derivative as I did. $\endgroup$ Oct 17, 2012 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.