Multiple integrals: Double integrals
Double integrals approximated with a Riemann sum
How do you calculate a double integral numerically? We are going to approach this in the same way as numerically integrating functions of one variable. We do it again only for a positive continuous function defined on a rectangle .
Approach with Riemann sums We always divide the interval on the -axis into pieces by designating fixed points with in that interval. Similarly, we divide the interval on the -axis into pieces by designating fixed points with in that interval. This way we get sub-rectangles with and . Such a set is called a partition of . We then choose a random point in each of the sub-rectangles ; we call such point a tag. So for and for . We denote the area of each sub-rectangle with , where and are the width and height of each sub-rectangle . We call the maximum of the lengths of the sides of the partial rectangles the mesh size. The expression is called a Riemann sum corresponding with the function . Note: for a given partition of there are many different Riemann sums: with each choice of tags you always get one. Such a Riemann sum is therefore the sum of the volume of rectangular pillars with the sub-rectangles used in the partition as bases. The volume of these rectangular pillars (i.e, cuboids) add up to an approximation of the volume under a graph that we want to calculate. The requested volume is, in a sense, a limit of such Riemann sums. See example below.
In the figure above, for the function , we have the square as integration region , an evenly divided partition of with sub-squares , for all (the mesh size is equal to ), and in each sub-square we have choen the centre point for . Then, in eight significant figures, we get the Riemann sum The smaller the mesh size of the partition, the better the approximation. For example, if you divide the square evenly into sub-squares and the mesh size is therefore equal to , you get If you do the same with a mesh size of , you get and the first six decimal places are already good compared to the exact result for the double integral:
Step-by-step approach for a numerical calculation of a double integral Even though there are much better methods to calculate a double integral numerically, the Riemann integration method described above does give a good idea of what a double integral actually is. We can draw up a step-by-step approach that can be applied more broadly:
- Divide the integration region into small sub-regions , which are also called area elements.
- Choose the area elements so small that the function above them is almost constant.
- Choose any point in each area element and calculate . Multiply this by the area of .
- Add up all the results obtained in step 3. The sum is then approximately equal to the double integral. The approximation is better when the area elements are smaller.