Integration in 𝑅 : 3
Riemann Sums and Integration
Over Rectangular Regions
Scott Surgent
A rectangular region R in the xy-plane can be defined using compound inequalities, where x and y are each
bound by constants such that 𝑎1 ≤ 𝑥 ≤ 𝑎2 and 𝑏1 ≤ 𝑦 ≤ 𝑏2 . Let 𝑧 = 𝑓(𝑥, 𝑦) be a continuous function
defined over a rectangular region R in the xy-plane.
The notation
ඵ 𝑓 𝑥, 𝑦 𝑑𝐴
𝑅
represents the double integral of 𝑧 = 𝑓(𝑥, 𝑦) over R.
The 𝑑𝐴 represents “area element”, and is either 𝑑𝑦 𝑑𝑥 or 𝑑𝑥 𝑑𝑦. Thus, we can write
𝑎2 𝑏2 𝑏2 𝑎2
ඵ 𝑓 𝑥, 𝑦 𝑑𝐴 = න න 𝑓(𝑥, 𝑦) 𝑑𝑦 𝑑𝑥 = න න 𝑓(𝑥, 𝑦) 𝑑𝑥 𝑑𝑦.
𝑅 𝑎1 𝑏1 𝑏1 𝑎1
Note that the bounds 𝑎1 and 𝑎2 correspond with the differential dx, and bounds 𝑏1 and 𝑏2 correspond with
dy.
The value of a double integral can be approximated by Riemann sums adapted to the two-dimensional case.
Interval 𝑎1 ≤ 𝑥 ≤ 𝑎2 is subdivided into m subdivisions (not necessarily of equal size) and interval 𝑏1 ≤ 𝑦 ≤
𝑏2 is subdivided into n subdivisions (again, not necessarily of equal size).
If we define indices 1 ≤ 𝑖 ≤ 𝑚 and 1 ≤ 𝑗 ≤ 𝑛, then we have a way to identify a particular subdivision within
region R.
For example, if 𝑎1 ≤ 𝑥 ≤ 𝑎2 is subdivided into 4 subdivisions and 𝑏1 ≤ 𝑦 ≤ 𝑏2 is subdivided into 5
subdivisions, then (𝑥2 , 𝑦3 ) is a representative point within the 2nd subdivision of the x-interval and the 3rd
subdivision of the y-interval, and 𝑓(𝑥2 , 𝑦3 ) is the function evaluated at (𝑥2 , 𝑦3 ).
Using this scheme, a double integral can be approximated by a double sum over 𝑖 and 𝑗:
𝑚 𝑛 𝑛 𝑚
ඵ 𝑓 𝑥, 𝑦 𝑑𝐴 ≈ 𝑓 𝑥𝑖 , 𝑦𝑗 ∆𝑦 ∆𝑥 or 𝑓 𝑥𝑖 , 𝑦𝑗 ∆𝑥 ∆𝑦 .
𝑅 𝑖=1 𝑗=1 𝑗=1 𝑖=1
Example 1: Use Riemann Sums to approximate 𝑥 𝑅2 𝑦 𝑑𝐴 where R is the rectangle 0 ≤ 𝑥 ≤ 3 and
1 ≤ 𝑦 ≤ 5 in the xy plane. Subdivide the region R into subregions each with length 1 to a side, and from
each subregion, choose x and y to be the “upper right” corner.
Solution: The rectangular region R is shown at right, subdivided into subregions, so
that ∆𝐴 = ∆𝑥 ∆𝑦 = 1 1 = 1. There are 12 such subregions.
Then choose a representative point 𝑥𝑖 , 𝑦𝑗 within each subregion. In this example,
we choose 𝑥𝑖 , 𝑦𝑗 to be the “upper right” point within each subregion (this is an
arbitrary choice. We could choose the “lower left” or the “middle point”, and so
on). Here, 1 ≤ 𝑖 ≤ 3 and 2 ≤ 𝑗 ≤ 5, the bounds chosen for convenience.
Next, evaluate the integrand 𝑧 = 𝑓 𝑥, 𝑦 = 𝑥 2 𝑦 at the representative points 𝑥𝑖 , 𝑦𝑗 :
𝑓 1,5 =5 𝑓 2,5 = 20 𝑓 3,5 = 45
𝑓 1,4 =4 𝑓 2,4 = 16 𝑓 3,4 = 36
𝑓 1,3 =3 𝑓 2,3 = 12 𝑓 3,3 = 27
𝑓 1,2 =2 𝑓 2,2 =8 𝑓 3,2 = 18
Visually, we have a surface 𝑧 = 𝑓 𝑥, 𝑦 = 𝑥 2 𝑦 “above” the xy-plane. Each subregion in R is the base of a
rectangular box whose height is the function value shown in the table above. Each box has a volume of
𝑓 𝑥𝑖 , 𝑦𝑗 𝑑𝐴. Since 𝑑𝐴 = 𝑑𝑥 𝑑𝑦 = 1 1 = 1 in each case, each box has volume 𝑓 𝑥𝑖 , 𝑦𝑗 × 1, or simply
𝑓 𝑥𝑖 , 𝑦𝑗 . The value of 𝑥 𝑅2 𝑦 𝑑𝐴 is approximated by the sum of the volumes of the rectangular boxes
contained within it. Thus,
3 5
ඵ 𝑥 2 𝑦 𝑑𝐴 ≈ 𝑓 𝑥𝑖 , 𝑦𝑗 ∆𝑦 ∆𝑥
𝑅 𝑖=1 𝑗=2
= 2 + 8 + 18 + 3 + 12 + 27 + 4 + 16 + 36 + 5 + 20 + 45
= 196.
Note that if we chose the representative point to be the lower-left corner of each subregion, we would find
that the Riemann Sum is 50.
196+50
The mean, = 123, is a reasonable approximation of 𝑥 𝑅2 𝑦 𝑑𝐴.
2
Example 2: Use Riemann Sums to approximate
𝑥 𝑔 𝑅, 𝑦 𝑑𝐴, where 𝑔 is shown by the contour map.
Let the region of integration R be given by −4 ≤ 𝑥 ≤ 4,
−6 ≤ 𝑦 ≤ 6, and let ∆𝑥 = 2 and ∆𝑦 = 2. Use the middle
point within each subregion.
Solution: The region R is identified and then subdivided into 2 × 2 subregions (lower left, boldfaced). Then
the middle point 𝑥𝑖 , 𝑦𝑗 from within each subregion is identified (lower right):
The values of 𝑧 = 𝑔(𝑥, 𝑦) are estimated from the contour map. For example, in the top tier of subregions,
reading left to right and using the middle points, the values of 𝑔 are approximately 𝑔 −3,5 =
37, 𝑔 −1,5 = 46, 𝑔 1,5 = 55 and 𝑔 3,5 = 60.
Each of these subregions is the base of a rectangular box whose heights are given by the 𝑧𝑖 = 𝑔(𝑥𝑖 , 𝑦𝑗 )
values. Each box then has a volume of 𝑔 𝑥𝑖 , 𝑦𝑗 𝑑𝐴. Since 𝑑𝐴 = (2)(2) = 4, each box has a volume of
𝑔 𝑥𝑖 , 𝑦𝑗 × 4.
The approximate values of 𝑔(𝑥𝑖 , 𝑦𝑗 ) are shown below in an array that matches the orientation of the
subregions in the previous figure:
Thus, the approximate value of 𝑥 𝑔 𝑅, 𝑦 𝑑𝐴 is the sum of all the 𝑔(𝑥𝑖 , 𝑦𝑗 ) values in the array above,
multiplied by 4:
37 + 46 + 55 + 60 + 27 + 34 + 42 + 49 + 22 + 27 + 33 + 40
ඵ 𝑔 𝑥, 𝑦 𝑑𝐴 ≈ 4 ,
𝑅 + 16 + 23 + 28 + 34 + 13 + 20 + 25 + 31 + 11 + 18 + 25 + 29
which is about 2,980 cubic units.
A double integral is evaluated “inside out”—that is, the inside integral is evaluated first, then that result
becomes the integrand of the outer integral, which is then evaluated.
Example 3: Evaluate 𝑥 𝑅2 𝑦 𝑑𝐴 where R is the rectangle 0 ≤ 𝑥 ≤ 3 and 1 ≤ 𝑦 ≤ 5.
Solution: We can choose either the 𝑑𝑦 𝑑𝑥 ordering or the 𝑑𝑥 𝑑𝑦 ordering. Let’s choose 𝑑𝐴 = 𝑑𝑥 𝑑𝑦. Thus,
we have
5 3
ඵ 𝑥 2 𝑦 𝑑𝐴 = න න 𝑥 2 𝑦 𝑑𝑥 𝑑𝑦 .
𝑅 1 0
Integrate the inner integral with respect to x, treating y as a constant:
3 3
1 1
න 𝑥 2 𝑦 𝑑𝑥 = 𝑥 3 𝑦 = 𝑦 33 − 03 = 9𝑦.
0 3 0 3
Now we integrate the result with respect to y:
5 9 2 5 9
1 9𝑦 𝑑𝑦 = 𝑦 = 52 − 12 = 108.
2 1 2
If we chose 𝑑𝐴 = 𝑑𝑦 𝑑𝑥, we have the following:
3 5
න න 𝑥 2 𝑦 𝑑𝑦 𝑑𝑥 .
0 1
The inner integral is determined first with respect to y, treating x as a constant temporarily:
5 5
1 2 1 2 1 2
න 𝑥2𝑦 𝑑𝑦 = 𝑥2 𝑦 = 𝑥 5 2 − 1 2 = 𝑥 24 = 12𝑥 2 .
1 2 1 2 2
This result is now integrated with respect to x:
3
3
න 12𝑥 2 𝑑𝑥 = 4𝑥 3 0 =4 3 3
− 0 3
= 4 27 = 108.
0
Both orderings of the differentials gives the same result, 108, as expected. This is the volume of the solid
bounded below by the region of integration R and above by the surface 𝑧 = 𝑥 2 𝑦.
Example 4: The density of a city’s population is given by 𝑃 𝑥, 𝑦 = 0.2𝑥 2 + 0.1𝑦 3 , where x and y are in
miles, and 𝑃 is on thousands of people per square mile. Assume that the city is a rectangle measuring 6 miles
east to west (x), and 4 miles north to south (y), and that 𝑥 = 0 and 𝑦 = 0 is the southwestern corner of the city’s
boundaries. Find the city’s population.
Solution: The city’s population is given by the double integral:
4 6
න න 0.2𝑥 2 + 0.1𝑦 3 𝑑𝑥 𝑑𝑦 .
0 0
Evaluating the inside integral with respect to x first, we have
6 6
0.2 3
න 0.2𝑥 2 + 0.1𝑦 3 𝑑𝑥 = 𝑥 + 0.1𝑥𝑦 3
0 3 0
0.2 3
0.2
= 6 + 0.1 6 𝑦3 − 0 3 + 0.1 0 𝑦 3
3 3
= 14.4 + 0.6𝑦 3 .
This is then integrated with respect to y:
4 4
0.6 4
න 14.4 + 0.6𝑦 3 𝑑𝑦 = 14.4𝑦 + 𝑦
0 4 0
0.6 0.6
= 14.4(4) + (4)4 − 14.4(0) + (0)4
4 4
= 96.
Thus, the city has about 96,000 people within its boundaries.
The average value of a multivariable function 𝑧 = 𝑓(𝑥, 𝑦) over a region 𝑅 is given by
1
𝑓𝑎𝑣 = ඵ 𝑓 𝑥, 𝑦 𝑑𝐴 ,
𝐴 𝑅 𝑅
where 𝐴(𝑅) is the area of region 𝑅.
Example 5: Find the average value of the result in the previous example and explain its meaning in context.
Solution: The region 𝑅 has an area of 6 4 = 24 square miles.
1
Thus, the average value of 𝑃 𝑥, 𝑦 = 0.2𝑥 2 + 0.1𝑦 3 over 𝑅 is 𝑃𝑎𝑣 = 96 = 4.
24
The city has an average density of about 4,000 people per square mile.