Why Curvature Bounds Matter
The composite trapezoidal rule estimates an integral using function values at equally spaced points. Its error estimate depends on how large the function’s second derivative can be over the whole interval. The challenge in using the estimate is therefore not just differentiating twice: it is finding a constant that is guaranteed to bound the absolute second derivative everywhere on the interval.
A bound does not need to be the smallest possible one. It does need to be valid throughout the interval. A valid but loose bound still gives a guarantee; a bound that fails at even one point does not.
The Error Estimate and Its Requirements
For the composite trapezoidal rule with \(n\) equal panels, let \(T_n\) denote the approximation to \(\int_a^b f(x)\,dx\). If \(f\) has a continuous second derivative on \([a,b]\), and \(|f''(x)|\le M\) throughout that interval, the composite trapezoidal error estimate is
Here \(n\) is a positive integer, and \(M\) is any valid curvature bound. If \(h=(b-a)/n\) is the panel width, the same estimate can be written as \(\frac{(b-a)h^2}{12}M\). The earlier material on the composite trapezoidal error bound establishes this estimate; the task here is to determine a suitable \(M\).
For a continuous function \(f''\) on a closed, bounded interval, \(|f''|\) attains a maximum there. Thus the smallest valid bound is \(M=\max_{a\le x\le b}|f''(x)|\). In practice, finding that exact maximum may take more work than needed. Any simpler upper bound that holds everywhere can be substituted into the estimate.
A Practical Method for Finding a Bound
Start by differentiating twice and then use information valid on the entire interval. Common tools include known ranges of elementary functions, monotonicity, denominator lower bounds, and the triangle inequality. If the interval crosses a point where the expression changes sign, split the interval into pieces or bound its absolute value directly.
Write down \(f''(x)\) and identify the factors that can vary across the interval.
Bound \(|f''(x)|\), not merely \(f''(x)\). A negative second derivative can have a large absolute value.
Justify each bound for every \(x\in[a,b]\). Endpoint checks alone do not generally establish a maximum.
Use the panel count \(n\), interval length \(b-a\), and a bound \(M\) verified on the full interval.
Worked Example: Exponential Curvature on a Unit Interval
Worked Example: Exponential Curvature on a Unit Interval
Find a curvature bound for \(f(x)=e^x\) on \([0,1]\), then use it to bound the composite trapezoidal error with \(n=2\) panels.
Differentiate twice:
On \([0,1]\), \(e^x\) is positive and increasing. Its largest value on this interval is \(e^1=e\), so \(|f''(x)|=e^x\le e\) throughout. We can therefore take \(M=e\).
The interval length is \(b-a=1\), and \(n=2\). Substitution gives
As a check, the two-panel trapezoidal approximation has \(h=1/2\) and is
The exact integral is \(\int_0^1e^x\,dx=e-1\approx1.718282\). Thus the actual absolute error is approximately \(1.753931-1.718282=0.035649\), which is less than the guaranteed bound \(0.056631\). The bound is conservative, as an error estimate may be.
Bounding a Rational Second Derivative
Rational expressions often require more care: a numerator may change sign, and the denominator may provide a useful lower bound. It is important to bound the absolute value of the whole expression, rather than treating a signed numerator as though it were always positive.
Worked Example: A Rational Function on \([0,1]\)
For \(f(x)=\frac{1}{1+x^2}\), find a valid curvature bound on \([0,1]\), then use it for \(n=3\) panels.
Differentiating,
Set \(t=x^2\). Since \(0\le x\le1\), we have \(0\le t\le1\), and
For \(0\le t\le 1/3\), the numerator’s absolute value is \(2-6t\), which is at most \(2\), while \((1+t)^3\ge1\). Hence \(|f''(x)|\le2\) on that part of the interval.
For \(1/3\le t\le1\), we have \(0\le6t-2\le4\) and \((1+t)^3\ge(4/3)^3=64/27\). Therefore,
Together, these inequalities prove \(|f''(x)|\le2\) throughout \([0,1]\), so take \(M=2\). With \(b-a=1\) and \(n=3\),
As a numerical check, the trapezoidal estimate is
The exact integral is \(\arctan(1)-\arctan(0)=\pi/4\approx0.785398\). The absolute error is approximately \(0.004629\), below \(1/54\). The inequalities above, not the numerical check, establish that \(M=2\) is valid.
Using Standard Function Bounds
Sometimes a concise bound is more useful than a tight one. If the second derivative is a sum or product, standard inequalities can bound it without finding its exact maximum. For example, \(|\sin u|\le1\) and \(|\cos u|\le1\) for every real \(u\). The triangle inequality then gives \(|A+B|\le|A|+|B|\), allowing separate terms to be bounded and added.
Worked Example: A Trigonometric Composition
For \(f(x)=\sin(x^2)\) on \([0,1]\), find a curvature bound and use it with \(n=5\).
The chain rule gives
For \(0\le x\le1\), the trigonometric factors have absolute value at most \(1\), and \(x^2\le1\). Therefore,
This proves that \(M=6\) is valid on the whole interval. Since \(b-a=1\) and \(n=5\),
The final substitution checks the bound’s value: \(6/(12\cdot25)=6/300=1/50\). This estimate does not require calculating the trapezoidal sum; it certifies the maximum possible error for that sum.
Common Pitfalls
Another tempting shortcut is to inspect only the interval endpoints. The largest absolute value can occur inside the interval, so endpoint values alone are insufficient unless an additional argument proves that they control the entire interval. A third pitfall is to substitute a valid bound for \(f''\) without taking its absolute value. The error estimate requires a nonnegative \(M\) satisfying \(|f''(x)|\le M\) at every point.
A bound can also be correct but unnecessarily large. In the trigonometric example, separate worst-case bounds on the sine and cosine terms may not occur at the same \(x\). That does not invalidate \(M=6\); it only means the estimate may be conservative. Tightening a bound is useful when practical, but proving that a bound holds everywhere comes first.
Check Your Understanding
For each question, pay attention to whether the proposed bound applies throughout the specified interval.
- What two conditions on \(f\) and \(M\) are needed to use the composite trapezoidal error estimate?
- If \(|f''(x)|\le7\) on \([2,5]\) and \(n=3\), what upper bound does the estimate give for the absolute error?
- Why does checking \(|f''|\) at only the endpoints not generally prove a curvature bound?
- If \(f''(x)\le0\) throughout an interval, does that alone imply \(M=0\)? Explain.
- For \(g(x)=\cos x\) on \([0,\pi]\), use a standard trigonometric inequality to give a valid curvature bound \(M\).