Tutorials › AP Calculus › Sample Points and Rectangle Heights

Riemann Sums and Definite Integrals · Tutorial 423 of 999

Sample Points and Rectangle Heights

See how choosing one point in each subinterval turns function values into rectangle heights and a sum of signed rectangle areas.

Beginner 8 min read

What You'll Learn

  • Identify a valid sample point in each subinterval of a partition.
  • Calculate a rectangle’s height from the function value at its sample point.
  • Multiply height by subinterval width to find signed rectangle area.
  • Combine rectangle contributions to form a Riemann-sum approximation.
  • Distinguish net signed area from total geometric area when function values have different signs.

From Subintervals to Rectangle Heights

A partition divides an interval into smaller pieces. To estimate accumulation across the interval, we can represent the function on each piece by a rectangle. The rectangle’s width comes from the subinterval, and its height comes from the function’s value at a chosen sample point in that subinterval.

The sample point matters: choosing a different point can produce a different height and therefore a different approximation. This tutorial focuses on how that choice builds each rectangle and how the rectangles combine.

Definition: Let \(a=x_0<x_1<\cdots<x_n=b\) be a partition of \([a,b]\). The \(i\)th subinterval is \([x_{i-1},x_i]\), with width \(\Delta x_i=x_i-x_{i-1}\). Choose a sample point \(x_i^*\) in that subinterval. The rectangle based on that subinterval has signed height \(f(x_i^*)\) and signed area \(f(x_i^*)\Delta x_i\). The sum of these signed rectangle areas is a Riemann sum.

Here, \(i\) identifies a subinterval; it runs from \(1\) through \(n\). The point \(x_i^*\) is an input to the function, while \(f(x_i^*)\) is the corresponding output. The star is a label for the chosen sample point; it does not mean that the point is a maximum or a special kind of point.

A sample point may be any point in the corresponding closed subinterval, including an endpoint. The key condition is that the point belongs to the subinterval whose rectangle it determines. The choices for different subintervals need not follow the same rule.

Why the Rectangle Area Has This Form

A rectangle’s area is its width times its height. On the \(i\)th subinterval, the width is \(\Delta x_i\), and the selected function value supplies the height. If the graph is above the horizontal axis at the sample point, the height and signed area are positive; if it is below, they are negative.

1
Choose a sample point.
Pick \(x_i^*\) from the \(i\)th subinterval.
2
Evaluate the function.
Compute the height \(f(x_i^*)\).
3
Find the rectangle’s signed area.
Multiply the function value by the positive subinterval width \(\Delta x_i\).
4
Combine the contributions.
Add the signed areas from all the subintervals.

For a partition with \(n\) subintervals, the resulting Riemann sum can be written by listing the contributions:

$$ f(x_1^*)\Delta x_1 +f(x_2^*)\Delta x_2 +\cdots +f(x_n^*)\Delta x_n. $$

Each term is one rectangle’s signed area. The expression estimates the net accumulation represented by the function over the interval. It is an approximation in general: each rectangle uses one function value to represent the behavior across an entire subinterval.

Why this construction works: A rectangle with constant signed height \(f(x_i^*)\) across a width \(\Delta x_i\) has signed area \(f(x_i^*)\Delta x_i\). Placing one such rectangle over each subinterval and adding their signed areas gives the total signed area of the rectangles. Thus the Riemann sum is exactly the rectangles’ combined signed area, and it serves as an estimate of the function’s accumulation.

Worked Example: A Linear Function

Worked Example: A Linear Function

Approximate the accumulation of \(f(x)=2x+1\) on \([0,4]\) using four subintervals of width \(1\). Choose the sample points \(x_1^*=0.5\), \(x_2^*=1.5\), \(x_3^*=2.5\), and \(x_4^*=3.5\).

The partition points are \(0,1,2,3,4\), so each width is \(1\): \(1-0=1\), \(2-1=1\), \(3-2=1\), and \(4-3=1\).

Evaluate the function at each sample point:

$$ f(0.5)=2(0.5)+1=2,\qquad f(1.5)=2(1.5)+1=4, $$
$$ f(2.5)=2(2.5)+1=6,\qquad f(3.5)=2(3.5)+1=8. $$

The rectangle contributions are height times width: \(2(1)=2\), \(4(1)=4\), \(6(1)=6\), and \(8(1)=8\). Therefore, the Riemann-sum approximation is \(2+4+6+8=20\).

Check: Each sample point lies in its assigned subinterval: \(0.5\in[0,1]\), \(1.5\in[1,2]\), \(2.5\in[2,3]\), and \(3.5\in[3,4]\). Each width is \(1\), and multiplying each calculated height by \(1\) gives the four stated contributions. Their sum is \(20\).

Worked Example: Different Sample Points, Different Heights

Worked Example: A Nonlinear Function

Use \(f(x)=x^2\) on \([0,3]\), partitioned into \([0,1]\), \([1,2]\), and \([2,3]\). Choose sample points \(x_1^*=\frac14\), \(x_2^*=\frac54\), and \(x_3^*=\frac{11}{4}\). Find the Riemann-sum approximation.

Each subinterval has width \(1\): \(1-0=1\), \(2-1=1\), and \(3-2=1\). The chosen points belong to their assigned subintervals: \(\frac14\in[0,1]\), \(\frac54\in[1,2]\), and \(\frac{11}{4}\in[2,3]\).

Calculate the heights by evaluating \(f(x)=x^2\):

$$ f\left(\frac14\right)=\left(\frac14\right)^2=\frac1{16},\qquad f\left(\frac54\right)=\left(\frac54\right)^2=\frac{25}{16}, $$
$$ f\left(\frac{11}{4}\right)=\left(\frac{11}{4}\right)^2=\frac{121}{16}. $$

Multiply each height by its width of \(1\). The rectangle contributions are \(\frac1{16}\), \(\frac{25}{16}\), and \(\frac{121}{16}\). Their total is

$$ \frac1{16}+\frac{25}{16}+\frac{121}{16} =\frac{147}{16} =9.1875. $$

Check: The width of every subinterval is \(1\), so each contribution must equal its height; the three contributions match the evaluated function values. Adding their numerators gives \(1+25+121=147\), confirming the total \(\frac{147}{16}=9.1875\).

This example also illustrates that the sample point need not be an endpoint or the midpoint. Its role is simply to select the function value used as the rectangle height.

Negative Heights and Signed Area

The word “height” can be confusing when a function value is negative. A geometric rectangle has a nonnegative physical height, but in a signed-area approximation the function value records whether the rectangle lies above or below the horizontal axis. A negative function value therefore gives a negative signed contribution.

Worked Example: Contributions on Both Sides of the Axis

Let \(f(x)=x-1\) on \([0,2]\), divided into \([0,1]\) and \([1,2]\). Choose \(x_1^*=\frac14\) and \(x_2^*=\frac74\). Find the signed Riemann sum and compare it with the sum of the rectangles’ geometric areas.

Both subintervals have width \(1\). The sample points are valid because \(\frac14\in[0,1]\) and \(\frac74\in[1,2]\). Their function values are

$$ f\left(\frac14\right)=\frac14-1=-\frac34,\qquad f\left(\frac74\right)=\frac74-1=\frac34. $$

The signed rectangle contributions are \(\left(-\frac34\right)(1)=-\frac34\) and \(\left(\frac34\right)(1)=\frac34\). The signed Riemann sum is

$$ -\frac34+\frac34=0. $$

For geometric area, use the positive magnitudes of the two contributions: \(\frac34+\frac34=\frac32\). Thus the net signed sum is \(0\), while the total geometric area represented by these rectangles is \(\frac32\).

Check: The first sampled height is negative and the second is positive, and the widths are both \(1\). Their signed contributions are opposites, so they cancel to \(0\). Taking their absolute values instead gives \(\frac34+\frac34=\frac32\), as stated.

Units and a Common Mistake

When the function represents a rate, units help explain why the width must be included. For example, if \(f(t)\) is measured in gallons per minute and \(\Delta t_i\) is measured in minutes, then \(f(x_i^*)\Delta t_i\) is measured in gallons. The sum estimates the accumulated amount. More generally, the units of a rectangle contribution are the units of the function multiplied by the units of the input.

Common mistake: Adding the rectangle heights without multiplying by their widths. Heights alone do not give area unless the width happens to be \(1\).

For a concrete correction, take \(f(x)=x\) on \([0,4]\), split into \([0,2]\) and \([2,4]\), and choose sample points \(1\) and \(3\). The heights are \(f(1)=1\) and \(f(3)=3\). A mistaken calculation adds the heights and reports \(1+3=4\). But each subinterval has width \(2\), so the correct contributions are \(1(2)=2\) and \(3(2)=6\). The Riemann sum is \(2+6=8\). As a check, both sample points are in their assigned intervals, both widths equal \(2\), and the two rectangle areas add to \(8\), not \(4\).

Another useful distinction is between a sample point and a rectangle height. The sample point is an input \(x_i^*\); the height is the output \(f(x_i^*)\). For instance, if \(f(x)=x^2\) and the sample point is \(1\), the height is \(f(1)=1\), not \(1^2\) chosen again as a separate input or the width of the subinterval.

What to Keep in Mind

A Riemann-sum approximation is determined by three related choices or quantities: the partition, the sample point in each subinterval, and the function value at that point. Once those are specified, each contribution is found by multiplying the function value by the subinterval width. The contributions are then added as signed quantities.

For a fixed partition, changing a sample point can change its rectangle height and the resulting sum. If the function takes both positive and negative values, contributions on opposite sides of the horizontal axis can cancel in the signed sum. Keeping these facts separate helps prevent errors: check that each point belongs to its subinterval, evaluate the function there, use the full subinterval width, and preserve the sign of the function value.

Check Your Understanding

Use the ideas in this tutorial to answer the following questions.

  1. For the subinterval \([2,5]\), give one valid sample point and state the subinterval’s width.
  2. If \(f(x_i^*)=7\) and \(\Delta x_i=0.4\), what is the signed area contribution from that rectangle?
  3. If \(f(x_i^*)=-3\) and \(\Delta x_i=2\), what is the signed area contribution? What is the geometric area of the rectangle?
  4. For a partition into three subintervals, what information is needed to calculate each rectangle contribution?
  5. Why can the signed Riemann sum be zero even when some of its rectangle contributions are nonzero?

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