Tutorials › Calculus III › From Rectangular Sums to Iterated Integrals

Double Integrals on Rectangles · Tutorial 509 of 999

From Rectangular Sums to Iterated Integrals

Trace how a sum over rectangular cells becomes a repeated integral by summing across one coordinate first and then the other.

Beginner 9 min read

What You'll Learn

  • Write a rectangular Riemann sum using separate widths in the two coordinates
  • Regroup a finite double sum as a sum of sums along coordinate strips
  • Relate a fixed-coordinate inner sum to a one-dimensional integral
  • Read constant bounds from the sides of a rectangular region
  • Identify errors caused by missing cell widths or inconsistent sample points

From Cells to Coordinate Sums

A double integral over a rectangle begins with contributions from small rectangular cells. Each contribution is a sampled function value multiplied by the area of its cell. When the cells form a grid, the same finite sum can be organized in two stages: add the contributions along one coordinate, then add those results across the other coordinate.

This regrouping is the basic idea behind a repeated integral. It does not change the finite sum. Rather, it reveals how the sum is connected to two successive one-dimensional integrations, each with constant bounds determined by a side of the rectangle.

Rectangular Sums on a Grid

Let \(R=[a,b]\times[c,d]\), where \(a<b\) and \(c<d\). Partition the \(x\)-interval at points \(a=x_0<x_1<\cdots<x_m=b\), and the \(y\)-interval at points \(c=y_0<y_1<\cdots<y_n=d\). Write \(\Delta x_i=x_i-x_{i-1}\) and \(\Delta y_j=y_j-y_{j-1}\). The cell in column \(i\) and row \(j\) has area \(\Delta x_i\Delta y_j\).

Choose one sample coordinate \(\xi_i\) from each \(x\)-interval and one sample coordinate \(\eta_j\) from each \(y\)-interval. The resulting sample point for cell \((i,j)\) is \((\xi_i,\eta_j)\). For a function \(f\), the rectangular Riemann sum is

$$ S=\sum_{i=1}^{m}\sum_{j=1}^{n} f(\xi_i,\eta_j)\,\Delta x_i\,\Delta y_j. $$

The area factor matters: \(\Delta x_i\) is a width, \(\Delta y_j\) is a height, and their product is the area of the cell. The sum adds the sampled height \(f(\xi_i,\eta_j)\), weighted by that area, over every cell.

Key idea: Since \(\Delta x_i\) does not depend on \(j\), the sum can be grouped by columns: $$ S=\sum_{i=1}^{m} \left(\sum_{j=1}^{n}f(\xi_i,\eta_j)\,\Delta y_j\right)\Delta x_i. $$ The inner sum collects the cells along one fixed \(x\)-coordinate strip. The outer sum then collects the strip totals across the rectangle.

Why the Regrouping Leads to Repeated Integrals

Fix a column \(i\). The value \(\xi_i\) is now fixed, so the function values in the inner sum are samples of the one-variable function \(y\mapsto f(\xi_i,y)\). Thus

$$ \sum_{j=1}^{n}f(\xi_i,\eta_j)\,\Delta y_j $$

is a one-dimensional Riemann sum along the vertical segment from \(y=c\) to \(y=d\). As the \(y\)-partition becomes finer, this sum approaches the integral of that slice, when the slice is integrable. The outer sum then weights each slice total by the width \(\Delta x_i\) and adds across \(a\le x\le b\).

For continuous \(f\) on the closed rectangle, the slices are integrable. Moreover, continuity on a closed and bounded rectangle gives uniform continuity: small changes in the coordinates make uniformly small changes in \(f\). This lets the vertical sums approximate the slice integrals as the \(y\)-widths shrink. The resulting slice integral varies continuously with \(x\), so its outer Riemann sums have a well-defined limit as the \(x\)-widths shrink.

This explains the repeated-integral notation suggested by the two stages:

$$ \int_a^b\left(\int_c^d f(x,y)\,dy\right)dx. $$

The inner bounds \(c\) and \(d\) describe the full \(y\)-side of the rectangle; the outer bounds \(a\) and \(b\) describe its \(x\)-side. In this order, \(y\) is integrated first while \(x\) is held fixed, and then the result is integrated in \(x\). The finite regrouping explains the form of the notation. The theorem that formally equates the double integral and this repeated integral for continuous functions is a separate result.

A Derivation from Finite Sums

The key algebraic step is exact, before any limit is taken. For each fixed \(i\), multiply every term in the \(j\)-sum by the same width \(\Delta x_i\), and then add the column sums. This gives

$$ \begin{aligned} S &=\sum_{i=1}^{m}\sum_{j=1}^{n} f(\xi_i,\eta_j)\,\Delta x_i\,\Delta y_j\\ &=\sum_{i=1}^{m} \left[ \left(\sum_{j=1}^{n}f(\xi_i,\eta_j)\,\Delta y_j\right) \Delta x_i \right]. \end{aligned} $$

There is no approximation in this equality: it is just a rearrangement of a finite sum. The approximation enters when the inner sums and then the outer sum are interpreted as Riemann sums. For example, if the function is continuous, the error in an inner sum is controlled by how much \(f(\xi_i,y)\) can vary within each \(y\)-interval. Uniform continuity makes that control work uniformly over the \(x\)-coordinates. This is why taking finer rectangular grids leads naturally to a one-dimensional integral of the slice totals.

Keep the distinction clear: Regrouping a finite rectangular sum is an algebraic identity. Replacing the sums by integrals is a limit argument, and requires the relevant one-dimensional integrals and limits to exist.

Worked Example: A Constant Height

Worked Example: A Constant Height

Take \(R=[0,2]\times[1,3]\) and \(f(x,y)=4\). Divide each side into two equal parts. Then \(\Delta x_1=\Delta x_2=1\), and \(\Delta y_1=\Delta y_2=1\). Each of the four cells contributes \(4\cdot1\cdot1=4\), so the rectangular sum is

$$ S=4+4+4+4=16. $$

Grouping by columns gives the same result. In each column, the sum along \(y\) is \(4\cdot1+4\cdot1=8\). Multiplying by that column's width gives \(8\cdot1=8\), and the two columns contribute \(8+8=16\).

The corresponding repeated-integral form is \(\int_0^2\left(\int_1^3 4\,dy\right)dx\). As a check on the finite sum, the rectangle has area \((2-0)(3-1)=4\), and the constant height is \(4\), giving \(4\cdot4=16\), exactly the computed sum. Here the constant samples make every grid sum equal to that total.

Worked Example: Summing \(x+y\) Along the Grid

Worked Example: Summing \(x+y\) Along the Grid

Use \(f(x,y)=x+y\) on \(R=[0,2]\times[0,1]\). Divide the \(x\)-interval into two equal parts and the \(y\)-interval into two equal parts. Both widths in \(x\) are \(1\), and both widths in \(y\) are \(1/2\). Choose midpoints: \(\xi_1=1/2,\ \xi_2=3/2\), and \(\eta_1=1/4,\ \eta_2=3/4\).

In the first column, the sampled values are \(f(1/2,1/4)=3/4\) and \(f(1/2,3/4)=5/4\). Its contribution is \((3/4)(1/2)+(5/4)(1/2)=1\). In the second column, the values are \(f(3/2,1/4)=7/4\) and \(f(3/2,3/4)=9/4\). Its contribution is \((7/4)(1/2)+(9/4)(1/2)=2\). Therefore

$$ S=1+2=3. $$

Checking by adding all four cell contributions gives \((3/4)(1/2)+(5/4)(1/2)+(7/4)(1/2)+(9/4)(1/2)=3\), as required. The repeated-integral form indicated by the grouping is \(\int_0^2\left(\int_0^1(x+y)\,dy\right)dx\). The example's purpose is to see the column sums become the outer sum; finer grids give the corresponding limiting process.

Worked Example: Unequal Cell Widths

Worked Example: Unequal Cell Widths

Let \(R=[1,4]\times[-1,1]\), partition the \(x\)-side at \(1,2,4\), and partition the \(y\)-side at \(-1,0,1\). The \(x\)-widths are \(1\) and \(2\); the \(y\)-widths are both \(1\). Choose the midpoint tags \(\xi_1=3/2,\ \xi_2=3\), and \(\eta_1=-1/2,\ \eta_2=1/2\). Let \(f(x,y)=xy+1\).

For the first column, the sampled values are \(f(3/2,-1/2)=1/4\) and \(f(3/2,1/2)=7/4\). Its weighted contribution is \((1/4)(1)(1)+(7/4)(1)(1)=2\). For the second column, the sampled values are \(f(3,-1/2)=-1/2\) and \(f(3,1/2)=5/2\). Its weighted contribution is \((-1/2)(2)(1)+(5/2)(2)(1)=-1+5=4\). Thus the sum is \(2+4=6\).

Checking cell by cell gives \(1/4+7/4-1+5=6\), the same total. The repeated-integral form suggested by these coordinate ranges is \(\int_1^4\left(\int_{-1}^1(xy+1)\,dy\right)dx\). The unequal widths show why every cell must retain its own \(\Delta x_i\Delta y_j\): replacing all cell areas by one common area would not represent this partition.

Bounds, Order, and a Common Mistake

On a rectangle, each vertical slice runs over the same \(y\)-interval, so its bounds are always \(c\) and \(d\). The outer coordinate runs over the same \(x\)-interval, so its bounds are \(a\) and \(b\). If instead the sum is grouped by rows, the \(x\)-sum comes first and the repeated-integral form is \(\int_c^d\left(\int_a^b f(x,y)\,dx\right)dy\). Both descriptions use the rectangle's constant side bounds; this tutorial's grouping focuses on summing along \(y\) first.

A common mistake is to drop one width when regrouping. For a cell with widths \(\Delta x_i=1\) and \(\Delta y_j=1/2\), and sampled value \(f(\xi_i,\eta_j)=6\), the cell contributes \(6(1)(1/2)=3\), not \(6(1)=6\). Omitting \(\Delta y_j\) doubles this cell's contribution. The correction is to keep the full area factor in every term, then factor out only the width that is constant across the inner sum.

Another source of confusion is changing sample coordinates within a column. To interpret the inner sum as a Riemann sum of one fixed slice, the \(x\)-coordinate must stay fixed while \(j\) varies. Choosing \(\xi_i\) for a whole column and \(\eta_j\) for each row gives precisely that arrangement. The finite sum is then organized both as a sum over cells and as a sum of vertical slice approximations.

Why This Viewpoint Matters

The rectangular sum records contributions cell by cell, while the repeated-integral form records them slice by slice. Moving between these descriptions is useful because the rectangular sum explains what a double integral accumulates, and the repeated form gives an organized route to computing it. The constant bounds also have a geometric explanation: every slice across a rectangle has the same endpoints.

The main lesson is not that a double integral is automatically two calculations. It is that a grid sum already contains the two-stage structure: each column has a one-dimensional sum, and those column totals form an outer sum. Refining the grid is what turns that structure into repeated integration.

Check Your Understanding

Use the grid-sum structure to answer the following questions.

  1. For \(R=[a,b]\times[c,d]\), what are the area and sample point for cell \((i,j)\) in a coordinate grid?
  2. Why can \(\Delta x_i\) be placed outside the inner sum over \(j\)?
  3. In the grouping that sums in \(y\) first, which coordinate is held fixed within each inner sum?
  4. Write the repeated-integral form indicated by summing in \(y\) first over \([a,b]\times[c,d]\).
  5. What error occurs if a cell's contribution includes its function value and \(\Delta x_i\), but omits \(\Delta y_j\)?