Tutorials › AP Calculus › Numerical Integration from Data Tables
← All AP Calculus Tutorials
AP Calculus AB & BC Intermediate

Numerical Integration from Data Tables

How to approximate a definite integral when you are given a table of values instead of a formula. Learn the trapezoidal rule, how to handle unequal intervals, and how to interpret your answer on AP Calculus free-response questions.

What Numerical Integration Is For

A definite integral such as represents the accumulated change or signed area between two values of . When you know an exact formula for , you can sometimes evaluate the integral analytically using antiderivatives.

But what if you do not have a formula? On the AP Calculus exam, you may be given a table of values for a function and asked to approximate a definite integral. In that situation, you can estimate the area under the curve by replacing pieces of the curve with simpler shapes.

The most important method for AP Calculus is the trapezoidal rule. It uses the values in the table directly and works even when the intervals between the data points are not all the same size.

The Trapezoidal Rule

Between two points, a trapezoid has a width equal to the horizontal distance between the points and a height based on the average of the two function values.

If the data points are , then the integral can be approximated by adding the trapezoidal areas over each interval:

There is an important detail here: each interval gets its own width. If the table has unequal spacing, you cannot simply use one common for the entire calculation.

How to Read a Data Table

0 4
2 7
5 6
8 10

Suppose the table gives values of . The first interval runs from to , so its width is .

The next interval runs from to , so its width is . Notice that the widths are not all equal.

When calculating a trapezoidal approximation from a table, always look at the values first. The differences between consecutive values determine the width of each trapezoid.

A Step-by-Step Method

  1. Identify the limits of integration. Determine which rows of the table are needed.
  2. Calculate each interval width. For consecutive points, compute .
  3. Average the two function values. For an interval from to , use .
  4. Multiply average height by width. This gives the approximate area of that trapezoid.
  5. Add all trapezoidal areas. The resulting sum is your numerical approximation to the definite integral.
  6. Include units when appropriate. If the table represents a rate, the integral often represents a quantity such as distance, volume, or total amount.

Worked Examples

Example 1: Equal Intervals

The table gives values of . Use the trapezoidal rule to approximate .

03
25
48
66
Step 1: The interval width is .
Step 2: On , the trapezoid has average height .
Step 3: On , the average height is .
Step 4: On , the average height is .
Step 5: Add the three trapezoidal areas:
Result:
Example 2: Unequal Intervals

The table gives values of . Approximate using the trapezoidal rule.

14
37
65
109
Step 1: The widths are , , and .
Step 2: The first trapezoid contributes .
Step 3: The second trapezoid contributes .
Step 4: The third trapezoid contributes .
Result:
Example 3: A Rate Table

A car's velocity is recorded at several times. The values are shown below. Use the trapezoidal rule to approximate the car's displacement from to .

020
226
530
724
Step 1: Because velocity is a rate of change of position, displacement is found by integrating velocity with respect to time: .
Step 2: From , the approximate displacement is .
Step 3: From , the contribution is .
Step 4: From , the contribution is .
Result:
Example 4: Signed Area Matters

Suppose a table gives the following values of a function:

04
21
4-2
6-1
Step 1: The trapezoid from has contribution .
Step 2: The trapezoid from has contribution .
Step 3: The trapezoid from has contribution .
Result:

The negative function values matter. A definite integral represents signed accumulation, so portions below the -axis contribute negatively.

Why the Trapezoidal Rule Works

Imagine the actual graph of between two data points. The graph may curve between them, but the trapezoidal rule replaces that curved section with a straight line.

The area under that straight-line approximation is a trapezoid. When you repeat this process across the entire interval, you obtain a collection of trapezoids that approximate the area under the original curve.

More data points generally mean narrower trapezoids and, when the function behaves reasonably between the points, a better approximation.

Data Tables vs. Known Formulas

A common AP Calculus skill is recognizing what information you actually have. If the problem gives you a formula for the function, you may be able to evaluate the integral exactly. If it gives you only a table of values, you cannot invent an antiderivative that is not provided.

For example, if the table gives , you know the values of the function at the listed points. You do not know the exact behavior of the function between those points.

Therefore, a numerical method such as the trapezoidal rule is appropriate:

Common Mistakes

Using one width when the intervals are unequal

This is one of the most common errors. If the table has values such as , the widths are different. Calculate the width of every interval separately.

Adding the function values without averaging them

A trapezoid uses the average of its two endpoint heights. For an interval from to , the contribution is , not simply .

Forgetting that an integral is signed

If the function is negative on part of the interval, that portion contributes negatively to the definite integral. Do not automatically replace negative values with positive values unless the question specifically asks for total geometric area.

Confusing displacement with total distance

If a velocity table contains negative velocities, integrating velocity gives displacement, not total distance traveled. Total distance requires accounting for the magnitude of velocity.

Reporting an exact answer when the method is approximate

A trapezoidal calculation from a data table is an approximation. Use or an equivalent approximation notation when appropriate.

AP Exam Strategy

On an AP Calculus free-response question, the arithmetic is usually not the difficult part. The important skill is setting up the approximation correctly.

  1. Write the trapezoidal setup. This makes your method clear to the reader.
  2. Use the actual table values. Do not try to reconstruct a formula for the function.
  3. Check every interval. Especially look for unequal spacing.
  4. Keep the sign. Negative function values should produce negative contributions.
  5. Use appropriate units. A rate integrated over time produces the corresponding accumulated quantity.

A good free-response setup often looks like:

Even before doing the arithmetic, this tells the grader exactly which numerical method you are using and which table values are involved.

Practice Problems

Question 1

The table gives values of . Use the trapezoidal rule to approximate .

02
15
34
46
Show answer
Question 2

The table gives values of . Approximate using the trapezoidal rule.

28
56
910
Show answer
Question 3

A particle's velocity is given by the table below. Use the trapezoidal rule to approximate the particle's displacement from to .

05
27
43
6-1
Show answer
Question 4 (Interpretation)

A function represents the rate at which water enters a tank, in gallons per minute. Using the table below, approximate the total amount of water entering the tank from to minutes.

012
518
1015
Show answer

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