Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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$?

share|cite|improve this question
up vote 1 down vote accepted

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.

share|cite|improve this answer
Thank you, the local and global errors were confusing me a bit but I think I get it now! – Nicky Oct 17 '12 at 19:08
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. – André Nicolas Oct 17 '12 at 19:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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