Tutorials › AP Calculus › Concavity and the Direction of Trapezoidal Error

Numerical and BC Integration Methods · Tutorial 513 of 999

Concavity and the Direction of Trapezoidal Error

Use concavity to predict and verify the direction of trapezoidal error on single intervals and across partitions.

Advanced 9 min read

What You'll Learn

  • Relate the sign of the second derivative to the position of a function’s graph relative to its secant line.
  • Explain why concave-up functions give trapezoidal overestimates of signed integrals.
  • Explain why concave-down functions give trapezoidal underestimates of signed integrals.
  • Apply the prediction to a single trapezoid and to a composite estimate.
  • Check a predicted error direction by comparing exact and approximate values.
  • Identify why a single direction of error may not follow when concavity changes.

Why Concavity Predicts the Direction of Error

A trapezoidal estimate replaces part of a function’s graph with a straight line segment joining its endpoint values. If the graph bends upward, that segment tends to lie above the graph; if it bends downward, the segment tends to lie below it. Since the area of a trapezoid is the integral of its straight-line top, this comparison predicts whether the estimate is greater or less than the signed integral.

The prediction is useful before doing any arithmetic: it provides a way to check whether an estimate is plausible. The comparison concerns signed integrals, so it remains meaningful even when a graph lies below the horizontal axis.

Definition: On an interval, a twice-differentiable function is concave up if \(f''(x)\ge 0\) throughout the interval, and concave down if \(f''(x)\le 0\) throughout the interval. If the inequality is strict in the interval’s interior, the function is strictly concave up or strictly concave down, respectively.

The Trapezoidal Estimate and Its Sign

For one interval \([a,b]\), the trapezoidal estimate uses the line through \((a,f(a))\) and \((b,f(b))\). The width is \(b-a\), and the average of the two endpoint heights is \(\frac{f(a)+f(b)}{2}\). Thus the estimate is

$$ T=\frac{b-a}{2}\bigl(f(a)+f(b)\bigr). $$

For a partition \(a=x_0<x_1<\cdots<x_n=b\), the composite trapezoidal estimate adds the estimate on each subinterval:

$$ T=\sum_{i=1}^{n}\frac{x_i-x_{i-1}}{2} \bigl(f(x_{i-1})+f(x_i)\bigr). $$

Here, “overestimate” means \(T\ge \int_a^b f(x)\,dx\), and “underestimate” means \(T\le \int_a^b f(x)\,dx\). These comparisons refer to signed quantities, not necessarily to ordinary geometric area.

Theorem: If \(f\) is continuous on \([a,b]\), twice differentiable in its interior, and \(f''(x)\ge 0\) there, then the one-panel trapezoidal estimate satisfies \(T\ge \int_a^b f(x)\,dx\). If \(f''(x)\le 0\), then \(T\le \int_a^b f(x)\,dx\). The same conclusions hold for a composite estimate when the corresponding concavity condition holds on every subinterval.

Why the Chord Lies on the Predicted Side

Let \(L(x)\) be the line through the endpoints of the graph on \([a,b]\). Its equation is

$$ L(x)=\frac{b-x}{b-a}f(a)+\frac{x-a}{b-a}f(b). $$

Suppose \(f''\ge 0\). The mean value theorem applied to \(f'\) shows that \(f'\) is nondecreasing: for \(u<v\), some \(c\in(u,v)\) satisfies \(f'(v)-f'(u)=f''(c)(v-u)\ge 0\). Now choose any \(x\) with \(a<x<b\). Applying the mean value theorem to \(f\) on \([a,x]\) and \([x,b]\) gives points \(u\in(a,x)\) and \(v\in(x,b)\) such that

$$ \frac{f(x)-f(a)}{x-a}=f'(u) \qquad\text{and}\qquad \frac{f(b)-f(x)}{b-x}=f'(v). $$

Because \(u<v\) and \(f'\) is nondecreasing, the first slope is no greater than the second. Multiplying by the positive number \((x-a)(b-x)\) and rearranging gives

$$ (b-x)\bigl(f(x)-f(a)\bigr) \le (x-a)\bigl(f(b)-f(x)\bigr), $$ $$ f(x)\le \frac{b-x}{b-a}f(a)+\frac{x-a}{b-a}f(b) =L(x). $$

Thus, when \(f\) is concave up, its graph is at or below the chord. Integrating \(f(x)\le L(x)\) over \([a,b]\) preserves the inequality. The integral of \(L\) is the trapezoidal estimate, so \(\int_a^b f(x)\,dx\le T\). If \(f''\le 0\), the slope comparisons reverse, giving \(f(x)\ge L(x)\) and therefore \(\int_a^b f(x)\,dx\ge T\). This proves the stated direction of error.

For a composite estimate: Apply the chord comparison on each subinterval and add the resulting integral inequalities. If \(f\) is concave up throughout the full interval, each trapezoid’s contribution is at least the corresponding integral. If \(f\) is concave down throughout, each contribution is at most the corresponding integral.

Worked Examples: Testing the Prediction

Worked Example: A Concave-Up Function

Estimate \(\int_0^2 x^2\,dx\) using one trapezoid, and compare the estimate with the exact value.

First, \(f(x)=x^2\), so \(f''(x)=2>0\). The function is concave up on \([0,2]\), which predicts an overestimate. The endpoint values are \(f(0)=0\) and \(f(2)=4\). Therefore,

$$ T=\frac{2-0}{2}\bigl(f(0)+f(2)\bigr) =\frac{2}{2}(0+4)=4. $$

An antiderivative is \(\frac{x^3}{3}\), so the exact integral is

$$ \int_0^2 x^2\,dx =\left[\frac{x^3}{3}\right]_0^2 =\frac{2^3}{3}-\frac{0^3}{3} =\frac{8}{3}. $$

Since \(4=\frac{12}{3}>\frac{8}{3}\), the estimate is indeed an overestimate. The difference is \(4-\frac{8}{3}=\frac{4}{3}\).

Worked Example: A Concave-Down Function

Estimate \(\int_0^2 (4-x^2)\,dx\) using one trapezoid, and check the predicted direction.

For \(f(x)=4-x^2\), the second derivative is \(f''(x)=-2<0\), so the function is concave down. The theorem predicts an underestimate. Its endpoint values are \(f(0)=4\) and \(f(2)=4-4=0\), giving

$$ T=\frac{2-0}{2}\bigl(4+0\bigr) =1\cdot 4=4. $$

An antiderivative is \(4x-\frac{x^3}{3}\). Thus

$$ \int_0^2 (4-x^2)\,dx =\left[4x-\frac{x^3}{3}\right]_0^2 =\left(8-\frac{8}{3}\right)-0 =\frac{16}{3}. $$

Because \(4=\frac{12}{3}<\frac{16}{3}\), the trapezoidal estimate is an underestimate, as predicted. The difference between the exact integral and the estimate is \(\frac{16}{3}-4=\frac{4}{3}\).

Worked Example: A Composite Estimate on a Concave-Up Interval

Use two equal subintervals to estimate \(\int_0^2 x^2\,dx\), then compare with the exact integral.

The partition points are \(x_0=0\), \(x_1=1\), and \(x_2=2\). The function is concave up because \(f''(x)=2>0\), so the composite estimate should be an overestimate. The function values are

$$ f(0)=0^2=0,\qquad f(1)=1^2=1,\qquad f(2)=2^2=4. $$

Each subinterval has width \(1\). The first trapezoid contributes \(\frac{1}{2}(0+1)=\frac{1}{2}\), and the second contributes \(\frac{1}{2}(1+4)=\frac{5}{2}\). Therefore,

$$ T=\frac{1}{2}+\frac{5}{2}=3. $$

The exact value is \(\frac{8}{3}\), as calculated from the antiderivative \(\frac{x^3}{3}\). Since \(3=\frac{9}{3}>\frac{8}{3}\), this composite estimate is also an overestimate. Its difference from the exact value is \(3-\frac{8}{3}=\frac{1}{3}\).

Common Mistake: Reversing the Chord Comparison

A common error is to think that a concave-up graph lies above the line segment joining its endpoints. That reverses the relationship. For example, on \([0,1]\), \(f(x)=x^2\) is concave up and its endpoint chord is \(L(x)=x\). At \(x=\frac12\),

$$ f\left(\frac12\right)=\frac14 \qquad\text{while}\qquad L\left(\frac12\right)=\frac12. $$

The chord is above the graph, not below it. The trapezoidal estimate is \(T=\frac{1}{2}(0+1)=\frac12\), while the exact integral is \(\int_0^1 x^2\,dx=\frac13\). Thus \(T>\frac13\), confirming that the concave-up case is an overestimate.

When the Prediction Needs Care

The direction-of-error theorem requires the stated concavity condition over the interval being estimated. If \(f''\) changes sign, the graph may be below its chord on some parts and above it on others. Their contributions can compete, so concavity alone may not determine the direction of the total error. Check the second derivative on the entire interval, or on each subinterval of a composite estimate, before applying the prediction.

If \(f''\) is zero throughout an interval, then \(f\) is linear there and its chord matches the graph; the trapezoidal estimate is exact. More generally, non-strict concavity gives a non-strict comparison: equality is possible, while strict concavity throughout the interior gives a strict inequality.

The practical value of this result is that it connects a local visual feature—the direction of bending—to a reliable comparison of numerical and exact integrals. Compute \(f''\), determine its sign on the interval, predict the direction, and then use exact values when available to check the estimate.

Check Your Understanding

For each question, use the second derivative to predict the direction of error before carrying out any requested calculation.

  1. For \(f(x)=x^2+1\) on \([0,2]\), does a one-panel trapezoidal estimate overestimate or underestimate the signed integral? Explain using \(f''\).
  2. For \(f(x)=9-x^2\) on \([0,3]\), which direction of error is predicted?
  3. What geometric comparison between the graph and its endpoint chord explains the concave-up case?
  4. Why can the direction of the total error be unclear if the second derivative changes sign within an interval?
  5. If \(f\) is linear on an interval, what is the relationship between its trapezoidal estimate and its exact integral?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon