Mathaversity Tutors

Trapezoidal Rule – Formula, Error Bound and Examples

Introduction to Numerical Integration

The definite integral \int_a^b f(x)\,dx represents the accumulated area under a curve. In many AP Calculus BC problems, we cannot always compute an exact antiderivative. The function may be given in a table, graph, or complicated expression.

In such cases, we use numerical integration. One of the most important numerical methods tested in AP Calculus BC is the Trapezoidal Rule.

Unlike Riemann sums (which use rectangles), the trapezoidal rule uses trapezoids to better approximate curved regions.

Partitioning the Interval

Let f(x) be a continuous on [a,b]. Divide the interval into n equal subintervals.
h=\dfrac{b-a}{n}
Partition points:
x_0=a,\quad x_1=a+h,\quad x_2=a+2h,\dots,x_n=b
Each adjacent pair [x_{i-1},x_i] forms one trapezoid.
As n increases:
trapezoids

Derivation of the Formula

Area of one trapezoid:
A_i=\frac{1}{2}h\left[f(x_{i-1})+f(x_i)\right]
Summing all trapezoids:
T_n=\frac{h}{2} \left[ f(x_0)+2f(x_1)+2f(x_2)+\dots+2f(x_{n-1})+f(x_n) \right]
Interior values are multiplied by 2 because each belongs to two trapezoids.

Error Formula and Analysis

If f''(x) is continuous on [a,b], then:
E_T=-\frac{(b-a)}{12}h^2 f''(c)
for some c\in(a,b).

Important Conclusions:

Concavity Rule:

When is the Trapezoidal Rule Exact?

If f(x) is linear, the trapezoidal rule produces the exact value because straight lines perfectly match the function.

Solved Problems

Problem 1

Approximate \int_0^4 x^2 dx using n=4.
Solution:
Step 1: Compute h
h=\dfrac{4-0}{4}=1
Step 2: Evaluate function values
0,1,4,9,16
Step 3: Apply formula
T_n=\dfrac{h}{2} \left[ f(x_0)+2f(x_1)+2f(x_2)+\dots+2f(x_{n-1})+f(x_n) \right]
T_4=\dfrac{1}{2}[0+2(1)+2(4)+2(9)+16]
T_4=\dfrac{1}{2}(44)=22
Exact value:
\dfrac{64}{3}\approx21.33
Since f''(x)=2>0, the result is an overestimate.

Problem 2

Approximate \int_1^3 e^x dx using n=2.
Solution:
Step 1: Compute h
h=\dfrac{3-1}{2}=1
Step 2: Apply formula
T_2=\dfrac{1}{2}[e+2e^2+e^3]
\approx18.79

Problem 3

Approximate the value of f\int_{0}^{8} f(x)\,dx using the Trapezoidal Rule with x=2 subintervals.

The table of values is given below:

Solution:
Step 1: Find the width of each subinterval
h = \dfrac{8-0}{4} = 2
Step 2: Write the Trapezoidal Rule formula
For n=4,
T_4 = \dfrac{h}{2}\Big[f(x_0) + 2f(x_1) + 2f(x_2) + 2f(x_3) + f(x_4)\Big]
Step 3: Substitute the values
From the table:
f(0)=3, \quad f(2)=7, \quad f(4)=11, \quad f(6)=9, \quad f(8)=3
T_4 = \dfrac{2}{2}\Big[3 + 2(7) + 2(11) + 2(9) + 3\Big]
Step 4: Simplify
T_4 = 1\Big[3 + 14 + 22 + 18 + 3\Big]
T_4 = 60
\int_{0}^{8} f(x)\,dx \approx 60

Problem 4

Determine whether the Trapezoidal Rule gives an overestimate or underestimate for \int_{1}^{4} \ln(x)\,dx.
Solution:
To determine whether the trapezoidal approximation overestimates or underestimates the true value, we analyze the concavity of the function.
Step 1: Find the first derivativet
f(x) = \ln(x)
f'(x) = \dfrac{1}{x}
Step 2: Find the second derivative
f''(x) = -\dfrac{1}{x^2}
Step 3: Determine the sign of f''(x) \textbf{ on } [1,4]
Since x>0 on [1,4],
-\dfrac{1}{x^2} < 0
Therefore,
f''(x) < 0 \quad \text{for all } x \in [1,4]
Step 4: Interpret the result
If f''(x) < 0, the function is concave down.
For concave down functions:
The Trapezoidal Rule gives an UNDERestimate.

Problem 5

Find an upper bound for the error when approximating: \int_{0}^{2} x^3\,dx using the Trapezoidal Rule with n=4 subintervals.
Solution:
The error bound formula for the trapezoidal rule is:
|E_T| \le \dfrac{(b-a)}{12} h^2 \max |f''(x)|
where:
Step 1: Identify a, b, and n
a=0, \quad b=2, \quad n=4
Step 2: Compute h
h = \dfrac{2-0}{4} = \dfrac{2}{4} = 0.5
Step 3: Find the second derivative
Given:
f(x)=x^3
First derivative:
f'(x)=3x^2
Second derivative:
f''(x)=6x
Step 4: Find the maximum of |f''(x)| \textbf{ on } [0,2]
Since 6x is increasing on [0,2],
Maximum occurs at x=2:
f''(2)=6(2)=12
Thus,
\max |f''(x)| = 12
Step 5: Substitute into the error formula
|E_T| \le \dfrac{(2-0)}{12} (0.5)^2 (12)
Step 6: Simplify step by step
= \dfrac{2}{12} (0.25) (12)
= \dfrac{1}{6} (0.25) (12)
= \dfrac{1}{6} (3))= 0.5
|E_T| \le 0.5

Frequently Asked Questions (FAQs)

Yes, it is part of Applications of Integration and appears in FRQs.
Each interior point belongs to two trapezoids.
Generally yes, especially compared to left or right sums.

Conclusion

The Trapezoidal Rule is one of the most important numerical integration techniques in AP Calculus BC. It provides a systematic way to approximate definite integrals when an antiderivative is difficult or impossible to compute analytically.
Mathaversity is ready to help you get the highest grades if you need professional, targeted help to fill in the last gaps in your knowledge.