5  Extensions to functions of two variables

5.1 Motivation

In your first course in differential calculus, you were already exposed to the skills involved in calculating partial derivatives. In this course, we will take a slightly geometric approach and extend the ideas behind tangent lines and linear approximations to functions of two variables. In effect, we will connect the skills you picked up and the reasons why these skills are important to have.

In this second calculus course, we mainly focused on integral calculus for functions of a single variable. We will also explore the extensions of the idea of integration to functions of two variables.

The selection of topics for this chapter is meant to be more in line with the most frequently encountered applied mathematical ideas in economics. It is not intended to replace a course in the calculus of several variables.

First, we will merely document some objects frequently encountered in the study of functions of two variables, which also have counterparts in functions of more than two variables. Next, we explore the extension of linearization of functions of one variable to functions of two variables. The differential calculus of several variables has a very distinctive quality which sets its apart from single-variables calculus and we briefly touch on this crucial difference. After that, we explore a version of the chain rule while allowing for functions of two variables.

5.2 Objects in three-dimensional space

In this section, we will collect some definitions of objects in three-dimensional spaces, as we will be considering functions which involve two variables.

Definition 5.1 The equation of a plane passing through the point \((x_0, y_0, z_0)\) may be written in the form \(A(x-x_0) + B(y-y_0) + C(z-z_0) = 0\). If the plane is not vertical, then \(C\neq 0\), and we can rearrange this and hence write \(C(z-z_0) = -A(x-x_0) - B(y-y_0)\) and thus \[\begin{align*} z & = z_0-\frac AC(x-x_0) - \frac BC(y-y_0)\\ & = z_0 + a(x-x_0) + b(y-y_0) \end{align*}\] where \(a=-A/C\) and \(b=-B/C\), respectively.

Definition 5.2 A trace of a function \(f\) of two independent variables \(x\) and \(y\) in the \(x\) direction is a curve of the form \(z = f(x,c)\), where \(c\) is a constant. Similarly, a trace of a function \(f\) of two independent variables \(x\) and \(y\) in the \(y\) direction is a curve of the form \(z = f(c,y)\), where \(c\) is a constant.

5.3 Linearization: tangent planes and differentials

In this section, we will answer the following questions:

  1. What does it mean for a function of two variables to be locally linear at a point?
  2. How do we find the equation of the plane tangent to a locally linear function at a point?
  3. What is the differential of a multivariable function of two variables and what are its uses?

One of the central concepts in single variable calculus is that the graph of a differentiable function, when viewed on a very small scale, looks like a line. We call this line the tangent line and measure its slope with the derivative. In this section, we will extend this concept to functions of several variables.

Let’s see what happens when we look at the graph of a two-variable function on a small scale. To begin, let’s consider the function \(f\) defined by \[f(x,y) = 6 - \frac{x^2}2 - y^2,\] whose graph is shown in Figure 5.1.

Figure 5.1: The graph of \(f(x,y)=6-x^2/2 - y^2\).

We choose to study the behavior of this function near the point \((x_0, y_0) = (1,1)\). In particular, we wish to view the graph on an increasingly small scale around this point, as shown in the two plots in Figure 5.2 and Figure 5.3.

Figure 5.2: The graph of \(f(x,y)=6-x^2/2 - y^2\) with \((1,1)\) marked.
Figure 5.3: The graph of \(f(x,y)=6-x^2/2 - y^2\), zoomed in.

Just as the graph of a differentiable single-variable function looks like a line when viewed on a small scale, we see that the graph of this particular two-variable function looks like a plane, as seen in Figure 5.4. In the following preview activity, we explore how to find the equation of this plane.

Figure 5.4: The graph of \(f(x,y)=6-x^2/2 - y^2\) with a tangent plane.

In what follows, we will also use the important fact from Definition 5.1 that the plane passing through \((x_0, y_0, z_0)\) may be expressed in the form \(z = z_0 + a(x-x_0) + b(y-y_0)\), where \(a\) and \(b\) are constants.

Preview Activity

Let \(f(x,y) = 6 - \frac{x^2}2 - y^2\), and let \((x_0,y_0) = (1,1)\).

  1. Evaluate \(f(x,y) = 6 - \frac{x^2}2 - y^2\) and its partial derivatives at \((x_0,y_0)\); that is, find \(f(1,1)\), \(f_x(1,1)\), and \(f_y(1,1)\).
  2. We know one point on the tangent plane; namely, the \(z\)-value of the tangent plane agrees with the \(z\)-value on the graph of \(f(x,y) = 6 - \frac{x^2}2 - y^2\) at the point \((x_0, y_0)\). In other words, both the tangent plane and the graph of the function \(f\) contain the point \((x_0, y_0, z_0)\). Use this observation to determine \(z_0\) in the expression \(z = z_0 + a(x-x_0) + b(y-y_0)\).
  3. Sketch the traces of \(f(x,y) = 6 - \frac{x^2}2 - y^2\) for \(y=y_0=1\) and \(x=x_0=1\).
Figure 5.5: The traces of \(f(x,y)\) with \(y=y_0=1\).
Figure 5.6: The traces of \(f(x,y)\) with \(x=x_0=1\).
  1. Determine the equation of the tangent line of the trace that you sketched in the previous part with \(y=1\) (in the \(x\) direction) at the point \(x_0=1\).
Figure 5.7: The traces of \(f(x,y)\).
Figure 5.8: The tangent plane at \((1,1)\).
  1. Figure 5.7 and Figure 5.8 show the traces of the function and the traces of the tangent plane. Explain how the tangent line of the trace of \(f\), whose equation you found in the last part of this activity, is related to the tangent plane. How does this observation help you determine the constant \(a\) in the equation for the tangent plane \(z = z_0+a(x-x_0) + b(y-y_0)\)? (Hint: How do you think \(f_x(x_0,y_0)\) should be related to \(z_x(x_0,y_0)\)?)
  2. In a similar way to what you did in Item 4, determine the equation of the tangent line of the trace with \(x=1\) at the point \(y_0=1\). Explain how this tangent line is related to the tangent plane, and use this observation to determine the constant \(b\) in the equation for the tangent plane \(z=z_0+a(x-x_0) + b(y-y_0)\). (Hint: How do you think \(f_y(x_0,y_0)\) should be related to \(z_y(x_0,y_0)\)?)
  3. Finally, write the equation \(z=z_0 + a(x-x_0) + b(y-y_0)\) of the tangent plane to the graph of \(f(x,y)=6-x^2/2 - y^2\) at the point \((x_0,y_0)=(1,1)\).

5.3.1 The tangent plane

Before stating the formula for the equation of the tangent plane at a point for a general function \(f=f(x,y)\), we need to discuss a technical condition. As we have noted, when we look at the graph of a single-variable function on a small scale near a point \(x_0\), we expect to see a line; in this case, we say that \(f\) is locally linear near \(x_0\) since the graph looks like a linear function locally around \(x_0\). Of course, there are functions, such as the absolute value function given by \(f(x)=|x|\), that are not locally linear at every point. In single-variable calculus, we learn that if the derivative of a function exists at a point, then the function is guaranteed to be locally linear there.

In a similar way, we say that a two-variable function \(f\) is locally linear near \((x_0,y_0)\) provided that the graph of \(f\) looks like a plane (its tangent plane) when viewed on a small scale near \((x_0,y_0)\). How can we tell when a function of two variables is locally linear at a point?

It is not unreasonable to expect that if \(f_x(a,b)\) and \(f_y(a,b)\) exist for some function \(f\) at a point \((a,b)\), then \(f\) is locally linear at \((a,b)\). This is not sufficient, however.

It would take us too far afield to provide a rigorous dicussion of differentiability of functions of more than one variable, so we will be content to define stronger, but more easily verified, conditions that ensure local linearity.

Definition 5.3 If \(f\) is a function of the independent variables \(x\) and \(y\) and both \(f_x\) and \(f_y\) exist and are continuous in an open disk containing the point \((x_0,y_0)\), then \(f\) is continuously differentiable at \((x_0,y_0)\).

As a consequence, whenever a function \(z = f(x,y)\) is continuously differentiable at a point \((x_0,y_0)\), it follows that the function has a tangent plane at \((x_0,y_0)\). Viewed up close, the tangent plane and the function are then virtually indistinguishable.1 In addition, as in our preview activity, we find the following general formula for the tangent plane.

Definition 5.4 (Tangent plane) If \(f(x,y)\) has continuous first-order partial derivatives, then the equation of the plane tangent to the graph of \(f\) at the point \((x_0,y_0,f(x_0,y_0))\) is \[z = f(x_0,y_0) + f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0). \tag{5.1}\]

Activity

  1. Find the equation of the tangent plane to \(f(x,y) = 2 + 4x - 3y\) at the point \((1,2)\). Simplify as much as possible. Does the result surprise you? Explain.
  2. Find the equation of the tangent plane to \(f(x,y) = x^2y\) at the point \((1,2)\).

5.3.2 Linearization

In single variable calculus, an important use of the tangent line is to approximate the value of a differentiable function. Near the point \(x_0\), the tangent line to the graph of \(f\) at \(x_0\) is close to the graph of \(f\) near \(x_0\), as shown in Figure 5.9.

Figure 5.9: The linearization of the single-variable function \(f(x)\).

In this single-variable setting, we let \(L\) denote the function whose graph is the tangent line, and thus \[L(x) = f(x_0) + f'(x_0)(x-x_0).\] Furthermore, observe that \(f(x) \approx L(x)\) near \(x_0\). We call \(L\) the linearization of \(f\).

In the same way, the tangent plane to the graph of a differentiable function \(z = f(x,y)\) at a point \((x_0,y_0)\) provides a good approximation of \(f(x,y)\) near \((x_0, y_0)\). Here, we define the linearization, \(L\), to be the two-variable function whose graph is the tangent plane, and thus \[L(x,y) = f(x_0,y_0) + f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0).\]

Finally, note that \(f(x,y)\approx L(x,y)\) for points near \((x_0, y_0)\). This is illustrated in Figure 5.10.

Figure 5.10: The linearization of \(f(x,y)\).

Activity

Find the linearization \(L(x,y)\) for the function \(g\) defined by \[\begin{equation*} g(x,y) = \frac{x}{x^2+y^2} \end{equation*}\] at the point \((1,2)\). Then use the linearization to estimate the value of \(g(0.8, 2.3)\).

5.3.3 Differentials

As we have seen, the linearization \(L(x,y)\) enables us to estimate the value of \(f(x,y)\) for points \((x,y)\) near the base point \((x_0, y_0)\). Sometimes, however, we are more interested in the in \(f\) as we move from the base point \((x_0,y_0)\) to another point \((x,y)\).

Figure 5.11: The differential \(df\) approximates the change in \(f(x,y)\).

Figure 5.11 illustrates this situation. Suppose we are at the point \((x_0,y_0)\), and we know the value \(f(x_0,y_0)\) of \(f\) at \((x_0,y_0)\). If we consider the displacement \(\langle \Delta x, \Delta y\rangle\) to a new point \((x,y) = (x_0+\Delta x, y_0 + \Delta y)\), we would like to know how much the function has changed. We denote this change by \(\Delta f\), where \[\Delta f = f(x,y) - f(x_0, y_0).\]

A simple way to estimate the change \(\Delta f\) is to approximate it by \(df\), which represents the change in the linearization \(L(x,y)\) as we move from \((x_0,y_0)\) to \((x,y)\). This gives \[\begin{align*} \Delta f \approx df & = L(x,y)-f(x_0, y_0)\\ & = [f(x_0,y_0)+ f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0)] - f(x_0, y_0)\\ & = f_x(x_0,y_0)\Delta x + f_y(x_0, y_0)\Delta y. \end{align*}\]

For consistency, we will denote the change in the independent variables as \(dx = \Delta x\) and \(dy =\Delta y\), and thus \[\Delta f \approx df = f_x(x_0,y_0)~dx + f_y(x_0,y_0)~dy. \tag{5.2}\]

Expressed equivalently in Leibniz notation, we have% \[df = \frac{\partial f}{\partial x}~dx + \frac{\partial f}{\partial y}~dy. \tag{5.3}\]

We call the quantities \(dx\), \(dy\), and \(df\) differentials, and we think of them as measuring small changes in the quantities \(x\), \(y\), and \(f\). Equations Equation 5.2 and Equation 5.3 express the relationship between these changes. Equation Equation 5.3 resembles an important idea from single-variable calculus: when \(y\) depends on \(x\), it follows in the notation of differentials that \[dy = y'~dx = \frac{dy}{dx}~dx.\]

We will illustrate the use of differentials with an example. Suppose we have a machine that manufactures rectangles of width \(x=20\) cm and height \(y=10\) cm. However, the machine isn’t perfect, and therefore the width could be off by \(dx = \Delta x = 0.2\) cm and the height could be off by \(dy = \Delta y = 0.4\) cm.

The area of the rectangle is \[A(x,y) = xy,\] so that the area of a perfectly manufactured rectangle is \(A(20, 10) = 200\) square centimeters. Since the machine isn’t perfect, we would like to know how much the area of a given manufactured rectangle could differ from the perfect rectangle. We will estimate the uncertainty in the area using Equation 5.2, and find that \[\Delta A \approx dA = A_x(20, 10)~dx + A_y(20,10)~dy.\]

Since \(A_x = y\) and \(A_y = x\), we have \[\Delta A \approx dA = 10~dx + 20~dy = 10\cdot0.2 + 20\cdot0.4 = 10.\]

That is, we estimate that the area in our rectangles could be off by as much as 10 square centimeters.

Activity

The questions in this activity explore the differential in several different contexts.

  1. Suppose that the elevation of a landscape is given by the function \(h\), where we additionally know that \(h(3,1) = 4.35\), \(h_x(3,1) = 0.27\), and \(h_y(3,1) = -0.19\). Assume that \(x\) and \(y\) are measured in miles in the easterly and northerly directions, respectively, from some base point \((0,0)\). Your GPS device says that you are currently at the point \((3,1)\). However, you know that the coordinates are only accurate to within \(0.2\) units; that is, \(dx = \Delta x = 0.2\) and \(dy= \Delta y = 0.2\). Estimate the uncertainty in your elevation using differentials.

  2. The pressure, volume, and temperature of an ideal gas are related by the equation \[P= P(T,V) = 8.31 T/V,\] where \(P\) is measured in kilopascals, \(V\) in liters, and \(T\) in kelvin. Find the pressure when the volume is 12 liters and the temperature is 310 K. Use differentials to estimate the change in the pressure when the volume increases to 12.3 liters and the temperature decreases to 305 K.

5.3.4 Exercises

  1. Find the linearization \(L \left( x, y \right)\) of the function \(f\left( x, y \right) = \sqrt{ 52 - 16 x^{2} - 9 y^{2} }\) at \(\left( 0, -2 \right)\).
  2. Find the equation of the tangent plane to the surface \(z = e^{4 x/17} \ln \left( 2 y \right)\) at the point \((-2,2, 0.8659)\).
  3. One mole of ammonia gas is contained in a vessel which is capable of changing its volume (a compartment sealed by a piston, for example). The total energy \(U\) (in Joules) of the ammonia is a function of the volume \(V\) (in cubic meters) of the container, and the temperature \(T\) (in degrees Kelvin) of the gas. The differential \(dU\) is given by \(dU = 840 dV + 27.32 dT\).
    1. How does the energy change if the volume is held constant and the temperature is increased slightly?
    2. How does the energy change if the temperature is held constant and the volume is decreased slightly?
    3. Find the approximate change in energy if the gas is compressed by 350 cubic centimeters and heated by 3 degrees Kelvin.
  4. An unevenly heated metal plate has temperature \(T(x,y)\) in degrees Celsius at a point \((x,y)\). If \(T(2,1) = 110\), \(T_x \, (2,1) = 12\), and \(T_y \, (2,1) = -14\), estimate the temperature at the point \((2.04,0.95)\).
  5. Let \(f\) be the function defined by \(f(x,y) = 2x^2+3y^3\).
    1. Find the equation of the tangent plane to \(f\) at the point \((1,2)\).
    2. Use the linearization to approximate the values of \(f\) at the points \((1.1, 2.05)\) and \((1.3,2.2)\).
    3. Compare the approximations form part (b) to the exact values of \(f(1.1, 2.05)\) and \(f(1.3, 2.2)\). Which approximation is more accurate. Explain why this should be expected.
  6. Let \(g\) be a function that is differentiable at \((-2,5)\) and suppose that its tangent plane at this point is given by \(z = -7 + 4(x+2) - 3(y-5)\).
    1. Determine the values of \(g(-2,5)\), \(g_x(-2,5)\), and \(g_y(-2,5)\). Write one sentence to explain your thinking.
    2. Estimate the value of \(g(-1.8, 4.7)\). Clearly show your work and thinking.
    3. Given changes of \(dx = -0.34\) and \(dy = 0.21\), estimate the corresponding change in \(g\) that is given by its differential, \(dg\).
    4. Suppose that another function \(h\) is also differentiable at \((-2,5)\), but that its tangent plane at \((-2,5)\) is given by \(3x + 2y - 4z = 9.\) Determine the values of \(h(-2,5)\), \(h_x(-2,5)\), and \(h_y(-2,5)\), and then estimate the value of \(h(-1.8, 4.7)\). Clearly show your work and thinking.

5.4 The chain rule

In this section, we answer the following questions:

  1. What is the Chain Rule and how do we use it to find a derivative?
  2. How can we use a tree diagram to guide us in applying the Chain Rule?

In single-variable calculus, we encountered situations in which some quantity \(z\) depends on \(y\) and, in turn, \(y\) depends on \(x\). A change in \(x\) produces a change in \(y\), which consequently produces a change in \(z\). Using the language of differentials that we saw in the previous section, these changes are naturally related by \[\begin{equation*} dz = \frac{dz}{dy}~dy \ \mbox{and} \ dy = \frac{dy}{dx}~dx. \end{equation*}\]

In terms of instantaneous rates of change, we then have \[\begin{equation*} dz = \frac{dz}{dy}\frac{dy}{dx}~dx = \frac{dz}{dx}~dx \end{equation*}\] and thus \[\begin{equation*} \frac{dz}{dx} = \frac{dz}{dy}\frac{dy}{dx}. \end{equation*}\]

This most recent equation we call the Chain Rule.

In the case of a function \(f\) of two variables where \(z = f(x,y)\), it might be that both \(x\) and \(y\) depend on another variable \(t\). A change in \(t\) then produces changes in both \(x\) and \(y\), which then cause \(z\) to change. In this section we will see how to find the change in \(z\) that is caused by a change in \(t\), leading us to multivariable versions of the Chain Rule involving both regular and partial derivatives.

Preview Activity

Suppose you are driving around in the \(xy\)-plane in such a way that your position at time \(t\) is given by the functions \[\begin{equation*} x(t)=2-t^2, y(t) = t^3 + 1. \end{equation*}\]

The path taken is shown on Figure 5.12.

Figure 5.12: Your position in the plane.
Figure 5.13: The corresponding temperature.

Suppose, furthermore, that the temperature at a point in the plane is given by \[\begin{equation*} T(x,y) = 10 - \frac12x^2 -\frac15y^2, \end{equation*}\] and note that the surface generated by \(T\) is shown on Figure 5.13. Therefore, as time passes, your position \((x(t), y(t))\) changes, and, as your position changes, the temperature \(T(x,y)\) also changes.

  1. By substituting \(x(t)\) for \(x\) and \(y(t)\) for \(y\) in the formula for \(T\), we can write \(T = T(x(t), y(t))\) as a function of \(t\). Make these substitutions to write \(T\) as a function of \(t\) and then use the Chain Rule from single variable calculus to find \(\frac{dT}{dt}\). (Do not do any algebra to simplify the derivative, either before taking the derivative, nor after.)

  2. Now we want to understand how the result from Item 1 can be obtained from \(T\) as a multivariable function. Recall from the previous section that small changes in \(x\) and \(y\) produce a change in \(T\) that is approximated by \[\begin{equation*} \Delta T \approx T_x\Delta x + T_y\Delta y. \end{equation*}\] The Chain Rule tells us about the instantaneous rate of change of \(T\), and this can be found as \[\lim_{\Delta t \to 0} \frac{\Delta T}{\Delta t} = \lim_{\Delta t \to 0} \frac{T_x \Delta x + T_y \Delta y}{\Delta t}. \tag{5.4}\] Use Equation 5.4 to explain why the instantaneous rate of change of \(T\) that results from a change in \(t\) is \[ \frac{dT}{dt} = \frac{\partial T}{\partial x} \frac{dx}{dt} + \frac{\partial T}{\partial y} \frac{dy}{dt}. \tag{5.5}\]

  3. Using the original formulas for \(T\), \(x\), and \(y\) in the problem statement, calculate all of the derivatives in Equation 5.5] (with \(T_x\) and \(T_y\) in terms of \(x\) and \(y\), and \(x'\) and \(y'\) in terms of \(t\)), and hence write the right-hand side of Equation 5.5 in terms of \(x\), \(y\), and \(t\).

  4. Compare the results of Items 1 and 3. Write a couple of sentences that identify specifically how each term in Item 3 relates to a corresponding terms in Item 1. This connection between Items 1 and 3 provides a multivariable version of the Chain Rule.

5.4.1 Extending the chain rule

As the previous activity suggests, the following version of the Chain Rule holds in general.

Theorem 5.1 (Chain rule) Let \(z = f(x,y)\), where \(f\) is a differentiable function of the independent variables \(x\) and \(y\), and let \(x\) and \(y\) each be differentiable functions of an independent variable \(t\). Then \[\begin{equation} \frac{dz}{dt} = \frac{\partial z}{\partial x} \frac{dx}{dt} + \frac{\partial z}{\partial y} \frac{dy}{dt}.\end{equation} \tag{5.6}\]

It is important to note the differences among the derivatives in Equation 5.6. Since \(z\) is a function of the two variables \(x\) and \(y\), the derivatives in the Chain Rule for \(z\) with respect to \(x\) and \(y\) are partial derivatives. However, since \(x = x(t)\) and \(y = y(t)\) are functions of the single variable \(t\), their derivatives are the standard derivatives of functions of one variable. When we compose \(z\) with \(x(t)\) and \(y(t)\), we then have \(z\) as a function of the single variable \(t\), making the derivative of \(z\) with respect to \(t\) a standard derivative from single variable calculus as well.

To understand why this Chain Rule works in general, suppose that some quantity \(z\) depends on \(x\) and \(y\) so that \[\begin{equation} dz = \frac{\partial z}{\partial x}~dx + \frac{\partial z}{\partial y}~dy.\end{equation} \tag{5.7}\]

Next, suppose that \(x\) and \(y\) each depend on another quantity \(t\), so that \[\begin{equation} dx = \frac{dx}{dt}~dt \ \mbox{and} \ dy = \frac{dy}{dt}~dt. \end{equation} \tag{5.8}\]

Combining Equation 5.7 and Equation 5.8, we find that \[\begin{equation*} dz = \frac{\partial z}{\partial x}\frac{dx}{dt}~dt + \frac{\partial z}{\partial y}\frac{dy}{dt}~dt = \frac{dz}{dt}~dt, \end{equation*}\] which is the Chain Rule in this particular context, as expressed in Equation 5.6.

Activity

Suppose that the temperature on a metal plate is given by the function \(T\) with \[\begin{equation*} T(x,y) = 100-(x^2 + 4y^2), \end{equation*}\] where the temperature is measured in degrees Fahrenheit and \(x\) and \(y\) are each measured in feet.

  1. Find \(T_x\) and \(T_y\). What are the units on these partial derivatives?
  2. Suppose an ant is walking along the \(x\)-axis at the rate of 2 feet per minute toward the origin. When the ant is at the point \((2,0)\), what is the instantaneous rate of change in the temperature \(dT/dt\) that the ant experiences. Include units with your response.

5.4.2 Tree diagrams

Up to this point, we have applied the Chain Rule to situations where we have a function \(z\) of variables \(x\) and \(y\), with both \(x\) and \(y\) depending on another single quantity \(t\). We may apply the Chain Rule, however, when \(x\) and \(y\) each depend on more than one quantity, or when \(z\) is a function of more than two variables. It can be challenging to keep track of all the dependencies among the variables, and thus a tree diagram can be a useful tool to organize our work. For example, suppose that \(z\) depends on \(x\) and \(y\), and \(x\) and \(y\) both depend on \(t\). We may represent these relationships using the tree diagram shown at left . We place the dependent variable at the top of the tree and connect it to the variables on which it depends one level below. We then connect each of those variables to the variable on which each depends.

Figure 5.14: A tree diagram illustrating dependencies.
Figure 5.15: A tree diagram illustrating dependencies.

To represent the Chain Rule, we label every edge of the diagram with the appropriate derivative or partial derivative, as seen at right in Figure 5.15. To calculate an overall derivative according to the Chain Rule, we construct the product of the derivatives along all paths connecting the variables and then add all of these products. For example, the diagram at right in Figure 5.15 illustrates the Chain Rule \[\begin{equation*} \frac{dz}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt} + \frac{\partial z}{\partial y}\frac{dy}{dt}. \end{equation*}\]

Activity

Figure 5.16 shows the tree diagram we construct when (a) \(z\) depends on \(w\), \(x\), and \(y\), (b) \(w\), \(x\), and \(y\) each depend on \(u\) and \(v\), and (c) \(u\) and \(v\) depend on \(t\).

Figure 5.16: Three levels of dependencies
  1. Label the edges with the appropriate derivatives.
  2. Use the Chain Rule to write \(\frac{dz}{dt}\).

5.4.3 Exercises

  1. Use the chain rule to find \(\frac{dz}{dt}\), where \[\begin{equation*} z = x^2 y + x y^2,\quad x = 4 - t^7,\quad y = -4 - t^5 \end{equation*}\]
  2. If \(z = \left(x+y\right)e^{y}\) and \(x = u^{2}+v^{2}\) and \(y = u^{2}-v^{2}\), find the \(\frac{\partial z}{\partial u}\) and \(\frac{\partial z}{\partial v}\) using the chain rule.
  3. Let \(z=g(u,v,w)\) and \(u(r,s,t),v(r,s,t),w(r,s,t)\). How many terms are there in the expression for \(\partial z/\partial r\)?
  4. Let \(W(s,t) = F(u(s,t), v(s,t))\) where \[\begin{equation*} u(1,0) = -1, u_s(1,0) = -7, u_t(1,0) = -2, \end{equation*}\] \[\begin{equation*} v(1,0) = -8, v_s(1,0) = 6, v_t(1,0) = -3, \end{equation*}\] and \[\begin{equation*} F_u(-1, -8) = -2, F_v(-1, -8) = 2 \end{equation*}\] Find \(W_s(1,0)\) and \(W_t(1,0)\).
  5. There are several proposed formulas to approximate the surface area of the human body. One model uses the formula \[\begin{equation*} A(h,w) = 0.0072 h^{0.725}w^{0.425}, \end{equation*}\] where \(A\) is the surface area in square meters, \(h\) is the height in centimeters, and \(w\) is the weight in kilograms. Since a person’s height \(h\) and weight \(w\) change over time, \(h\) and \(w\) are functions of time \(t\). Let us think about what is happening to a child whose height is \(60\) centimeters and weight is \(9\) kilograms. Suppose, furthermore, that \(h\) is increasing at an instantaneous rate of 20 centimeters per year and \(w\) is increasing at an instantaneous rate of \(5\) kg per year. Determine the instantaneous rate at which the child’s surface area is changing at this point in time.

5.5 Double Riemann sums and double integrals over rectangles

In single-variable calculus, recall that we approximated the area under the graph of a positive function \(f\) on an interval \([a,b]\) by adding areas of rectangles whose heights are determined by the curve. The general process involved subdividing the interval \([a,b]\) into smaller subintervals, constructing rectangles on each of these smaller intervals to approximate the region under the curve on that subinterval, then summing the areas of these rectangles to approximate the area under the curve. We will extend this process in this section to its three-dimensional analogs.

In this subsection, we answer the following questions:

  1. What is a double Riemann sum?
  2. How is the double integral of a continuous function \(f = f(x,y)\) defined?
  3. What are two things the double integral of a function can tell us?

Preview Activity

In this activity we introduce the concept of a double Riemann sum.

  1. Review the concept of the Riemann sum from single-variable calculus. Then, explain how we define the definite integral \(\int_a^b f(x) \ dx\) of a continuous function of a single variable \(x\) on an interval \([a,b]\). Include a sketch of a continuous function on an interval \([a,b]\) with appropriate labeling in order to illustrate your definition.
Figure 5.17: Rectangular domain \(R\) with subrectangles.
  1. In our upcoming study of integral calculus for multivariable functions, we will first extend the idea of the single-variable definite integral to functions of two variables over rectangular domains. To do so, we will need to understand how to partition a rectangle into subrectangles. Let \(R\) be rectangular domain \(R = \{(x,y) : 0 \leq x \leq 6, 2 \leq y \leq 4\}\) (we can also represent this domain with the notation \([0,6] \times [2,4]\)), as pictured in Figure 5.17. To form a partition of the full rectangular region, \(R\), we will partition both intervals \([0,6]\) and \([2,4]\); in particular, we choose to partition the interval \([0,6]\) into three uniformly sized subintervals and the interval \([2,4]\) into two evenly sized subintervals as shown in Figure 5.17. In the following questions, we discuss how to identify the endpoints of each subinterval and the resulting subrectangles.
    1. Let \(0=x_0 \lt x_1 \lt x_2 \lt x_3=6\) be the endpoints of the subintervals of \([0,6]\) after partitioning. What is the length \(\Delta x\) of each subinterval \([x_{i-1},x_i]\) for \(i\) from 1 to 3?
    2. Explicitly identify \(x_0\), \(x_1\), \(x_2\), and \(x_3\). On Figure 5.17 or your own version of the diagram, label these endpoints.
    3. Let \(2=y_0 \lt y_1 \lt y_2=4\) be the endpoints of the subintervals of \([2,4]\) after partitioning. What is the length \(\Delta y\) of each subinterval \([y_{j-1},y_j]\) for \(j\) from 1 to 2? Identify \(y_0\), \(y_1\), and \(y_2\) and label these endpoints on Figure 5.17.
    4. Let \(R_{ij}\) denote the subrectangle \([x_{i-1},x_i] \times [y_{j-1},y_j]\). Appropriately label each subrectangle in your drawing of Figure 5.17. How does the total number of subrectangles depend on the partitions of the intervals \([0,6]\) and \([2,4]\)?
    5. What is area \(\Delta A\) of each subrectangle?

For the definite integral in single-variable calculus, we considered a continuous function over a closed, bounded interval \([a,b]\). In multivariable calculus, we will eventually develop the idea of a definite integral over a closed, bounded region (such as the interior of a circle). We begin with a simpler situation by thinking only about rectangular domains, and will address more complicated domains later.

Let \(f = f(x,y)\) be a continuous function defined on a rectangular domain \(R = \{(x,y) : a \leq x \leq b, c \leq y \leq d\}\). As we saw in the preview activity, the domain is a rectangle \(R\) and we want to partition \(R\) into subrectangles. We do this by partitioning each of the intervals \([a,b]\) and \([c,d]\) into subintervals and using those subintervals to create a partition of \(R\) into subrectangles. In the first activity, we address the quantities and notations we will use in order to define double Riemann sums and double integrals.

Activity

Let \(f(x,y) = 100 - x^2-y^2\) be defined on the rectangular domain \(R = [a,b] \times [c,d]\). Partition the interval \([a,b]\) into four uniformly sized subintervals and the interval \([c,d]\) into three evenly sized subintervals as shown in . As we did in our preview activity, we will need a method for identifying the endpoints of each subinterval and the resulting subrectangles.

Figure 5.18: Rectangular domain with subrectangles.
  1. Let \(a=x_0 \lt x_1 \lt x_2 \lt x_3 \lt x_4 =b\) be the endpoints of the subintervals of \([a,b]\) after partitioning. Label these endpoints in Figure 5.18.
  2. What is the length \(\Delta x\) of each subinterval \([x_{i-1},x_i]\)? Your answer should be in terms of \(a\) and \(b\).
  3. Let \(c=y_0 \lt y_1 \lt y_2 \lt y_3 =d\) be the endpoints of the subintervals of \([c,d]\) after partitioning. Label these endpoints in Figure 5.18.
  4. What is the length \(\Delta y\) of each subinterval \([y_{j-1},y_j]\)? Your answer should be in terms of \(c\) and \(d\).
  5. The partitions of the intervals \([a,b]\) and \([c,d]\) partition the rectangle \(R\) into subrectangles. How many subrectangles are there?
  6. Let \(R_{ij}\) denote the subrectangle \([x_{i-1},x_i] \times [y_{j-1},y_j]\). Label each subrectangle in Figure 5.18.
  7. What is area \(\Delta A\) of each subrectangle?
  8. Now let \([a,b] = [0,8]\) and \([c,d] = [2,6]\). Let \((x_{11}^*,y_{11}^*)\) be the point in the upper right corner of the subrectangle \(R_{11}\). Identify and correctly label this point in Figure 5.18. Calculate the product \[\begin{equation*} f(x_{11}^*,y_{11}^*) \Delta A. \end{equation*}\] Explain, geometrically, what this product represents.
  9. For each \(i\) and \(j\), choose a point \((x_{ij}^*,y_{ij}^*)\) in the subrectangle \(R_{i,j}\). Identify and correctly label these points in Figure 5.18. Explain what the product \[\begin{equation*} f(x_{ij}^*,y_{ij}^*) \Delta A \end{equation*}\] represents.
  10. If we were to add all the values \(f(x_{ij}^*,y_{ij}^*) \Delta A\) for each \(i\) and \(j\), what does the resulting number approximate about the surface defined by \(f\) on the domain \(R\)? (You don’t actually need to add these values.)
  11. Write a double sum using summation notation that expresses the arbitrary sum from Item 10.

Now we use the process from the most recent activity to formally define double Riemann sums and double integrals.

Definition 5.5 Let \(f\) be a continuous function on a rectangle \(R = \{(x,y) : a \leq x \leq b, c \leq y \leq d\}\). A double Riemann sum for \(f\) over \(R\) is created as follows.

  1. Partition the interval \([a, b]\) into \(m\) subintervals of equal length \(\Delta x = \frac{b-a}{m}\). Let \(x_0\), \(x_1\), \(\ldots\), \(x_m\) be the endpoints of these subintervals, where \(a = x_0\lt x_1\lt x_2 \lt \cdots \lt x_m = b\).

  2. Partition the interval \([c, d]\) into \(n\) subintervals of equal length \(\Delta y = \frac{d-c}{n}\). Let \(y_0\), \(y_1\), \(\ldots\), \(y_n\) be the endpoints of these subintervals, where \(c = y_0\lt y_1\lt y_2 \lt \cdots \lt y_n = d\).

  3. These two partitions create a partition of the rectangle \(R\) into \(mn\) subrectangles \(R_{ij}\) with opposite vertices \((x_{i-1},y_{j-1})\) and \((x_i, y_j)\) for \(i\) between \(1\) and \(m\) and \(j\) between \(1\) and \(n\). These rectangles all have equal area \(\Delta A = \Delta x \cdot \Delta y\).

  4. Choose a point \((x_{ij}^*, y_{ij}^*)\) in each rectangle \(R_{ij}\). Then, a double Riemann sum for \(f\) over \(R\) is given by \[\begin{equation*} \sum_{j=1}^n \sum_{i=1}^m f(x_{ij}^*, y_{ij}^*) \cdot \Delta A. \end{equation*}\]

If \(f(x,y) \geq 0\) on the rectangle \(R\), we may ask to find the volume of the solid bounded above by \(f\) over \(R\), as illustrated on Figure 5.19. This volume is approximated by a Riemann sum, which sums the volumes of the rectangular boxes shown on the right of Figure 5.20.

Figure 5.19: The desired volume under a graph.
Figure 5.20: The desired volume approximated by a Riemann Sum.

As we let the number of subrectangles increase without bound (in other words, as both \(m\) and \(n\) in a double Riemann sum go to infinity), as illustrated in Figure 5.21 and Figure 5.22, the sum of the volumes of the rectangular boxes approaches the volume of the solid bounded above by \(f\) over \(R\). The value of this limit, provided it exists, is the double integral.

Figure 5.21: Finding better approximations by using smaller subrectangles.
Figure 5.22: Finding better approximations by using even smaller subrectangles.

Definition 5.6 (Double integral over a rectangular region \(R\)) Let \(R\) be a rectangular region in the \(xy\)-plane and \(f\) a continuous function over \(R\). With terms defined as in a double Riemann sum, the double integral of \(f\) over \(R\) is \[\begin{equation*} \iint_R f(x,y) \, dA = \lim_{m,n \to \infty} \sum_{j=1}^n \sum_{i=1}^m f(x_{ij}^*, y_{ij}^*) \cdot \Delta A. \end{equation*}\]

How can we interpret the value of the double integral? Suppose that \(f(x,y)\) assumes both positive and negatives values on the rectangle \(R\), as shown in Figure 5.23.

Figure 5.23: Finding better approximations by using smaller subrectangles.
Figure 5.24: Finding better approximations by using even smaller subrectangles.

When constructing a Riemann sum, for each \(i\) and \(j\), the product \(f(x_{ij}^*, y_{ij}^*) \cdot \Delta A\) can be interpreted as a “signed” volume of a box with base area \(\Delta A\) and “signed” height \(f(x_{ij}^*, y_{ij}^*)\). Since \(f\) can have negative values, this “height” could be negative. The sum \[\begin{equation*} \sum_{j=1}^n \sum_{i=1}^m f(x_{ij}^*, y_{ij}^*) \cdot \Delta A \end{equation*}\] can then be interpreted as a sum of “signed” volumes of boxes, with a negative sign attached to those boxes whose heights are below the \(xy\)-plane.

We can then realize the double integral \(\iint_R f(x,y) \, dA\) as a difference in volumes: \(\iint_R f(x,y) \, dA\) tells us the volume of the solids the graph of \(f\) bounds above the \(xy\)-plane over the rectangle \(R\) minus the volume of the solids the graph of \(f\) bounds below the \(xy\)-plane under the rectangle \(R\). This is shown in Figure 5.24.

Activity

Let \(f(x,y) = x+2y\) and let \(R = [0,2] \times [1,3]\).

  1. Draw a picture of \(R\). Partition \([0,2]\) into 2 subintervals of equal length and the interval \([1,3]\) into two subintervals of equal length. Draw these partitions on your picture of \(R\) and label the resulting subrectangles using the labeling scheme we established in the definition of a double Riemann sum.
  2. For each \(i\) and \(j\), let \((x_{ij}^*, y_{ij}^*)\) be the midpoint of the rectangle \(R_{ij}\). Identify the coordinates of each \((x_{ij}^*, y_{ij}^*)\). Draw these points on your picture of \(R\).
  3. Calculate the Riemann sum \[\begin{equation*} \sum_{j=1}^n \sum_{i=1}^m f(x_{ij}^*, y_{ij}^*) \cdot \Delta A \end{equation*}\] using the partitions we have described. If we let \((x_{ij}^*, y_{ij}^*)\) be the midpoint of the rectangle \(R_{ij}\) for each \(i\) and \(j\), then the resulting Riemann sum is called a midpoint sum.

5.6 Iterated integrals

We now answer a very crucial question left behind in the previous subsection. How do we evaluate a double integral over a rectangle as an iterated integral, and why does this process work?

Preview Activity

Let \(f(x,y) = 25-x^2-y^2\) on the rectangular domain \(R = [-3,3] \times [-4,4]\).

As with partial derivatives, we may treat one of the variables in \(f\) as constant and think of the resulting function as a function of a single variable. Now we investigate what happens if we integrate instead of differentiate.

  1. Choose a fixed value of \(x\) in the interior of \([-3,3]\). Let \[\begin{equation*} A(x) = \int_{-4}^4 f(x,y) \, dy. \end{equation*}\] What is the geometric meaning of the value of \(A(x)\) relative to the surface defined by \(f\). (Hint: Think about the trace determined by the fixed value of \(x\), and consider how \(A(x)\) is related to the image in Figure 5.25.)
Figure 5.25: A cross section with fixed \(x\).
Figure 5.26: A cross section with fixed \(x\) and \(\Delta x\).
  1. For a fixed value of \(x\), say \(x_i^*\), what is the geometric meaning of \(A(x_i^*) \ \Delta x\)? (Hint: Consider how \(A(x_i^*) \Delta x\) is related to the image in Figure 5.26.)

  2. Since \(f\) is continuous on \(R\), we can define the function \(A = A(x)\) at every value of \(x\) in \([-3,3]\). Now think about subdividing the \(x\)-interval \([-3,3]\) into \(m\) subintervals, and choosing a value \(x_i^*\) in each of those subintervals. What will be the meaning of the sum \(\sum_{i=1}^m A(x_i^*) \ \Delta x\)?

  3. Explain why \(\int_{-3}^3 A(x) \, dx\) will determine the exact value of the volume under the surface \(z = f(x,y)\) over the rectangle \(R\).

The ideas that we explored in the preceding preview activity work more generally and lead to the idea of an iterated integral. Let \(f\) be a continuous function on a rectangular domain \(R = [a,b] \times [c,d]\), and let \[\begin{equation*} A(x) = \int_c^d f(x,y) \, dy. \end{equation*}\]

The function \(A = A(x)\) determines the value of the cross sectional area (by area we mean “signed” area) in the \(y\) direction for the fixed value of \(x\) of the solid bounded between the surface defined by \(f\) and the \(xy\)-plane.

Figure 5.27: One cross-sectional slice.
Figure 5.28: Two more cross-sectional slices.
Figure 5.29: Summing volumes of cross section slices.

The value of this cross sectional area is determined by the input \(x\) in \(A\). Since \(A\) is a function of \(x\), it follows that we can integrate \(A\) with respect to \(x\). In doing so, we use a partition of \([a, b]\) and make an approximation to the integral given by \[\begin{equation*} \int_a^b A(x) \, dx \approx \sum_{i=1}^m A(x_i^*) \Delta x, \end{equation*}\] where \(x_i^*\) is any number in the subinterval \([x_{i-1},x_i]\). Each term \(A(x_i^*) \Delta x\) in the sum represents an approximation of a fixed cross sectional slice of the surface in the \(y\) direction with a fixed width of \(\Delta x\). We add the signed volumes of these slices as shown in the frames in Figure 5.27, Figure 5.28, Figure 5.29 to obtain an approximation of the total signed volume.

As we let the number of subintervals in the \(x\) direction approach infinity, we can see that the Riemann sum \(\sum_{i=1}^m A(x_i^*) \Delta x\) approaches a limit and that limit is the sum of signed volumes bounded by the function \(f\) on \(R\). Therefore, since \(A(x)\) is itself determined by an integral, we have \[\begin{equation*} \iint_R f(x,y) \, dA = \lim_{m \to \infty} \sum_{i=1}^m A(x_i^*) \Delta x = \int_a^b A(x) \, dx = \int_a^b \left( \int_c^d f(x,y) \, dy \right) \, dx. \end{equation*}\]

Hence, we can compute the double integral of \(f\) over \(R\) by first integrating \(f\) with respect to \(y\) on \([c, d]\), then integrating the resulting function of \(x\) with respect to \(x\) on \([a, b]\). The nested integral \[\begin{equation*} \int_a^b \left( \int_c^d f(x,y) \, dy \right) \, dx = \int_a^b \int_c^d f(x,y) \, dy \, dx \end{equation*}\] is called an iterated integral, and we see that each double integral may be represented by two single integrals.

We made a choice to integrate first with respect to \(y\). The same argument shows that we can also find the double integral as an iterated integral integrating with respect to \(x\) first, or \[\begin{equation*} \iint_R f(x,y) \, dA = \int_c^d \left( \int_a^b f(x,y) \, dx \right) \, dy = \int_c^d \int_a^b f(x,y) \, dx \, dy. \end{equation*}\]

The fact that integrating in either order results in the same value is known as Fubini’s Theorem.

Theorem 5.2 (Fubini’s theorem) If \(f = f(x,y)\) is a continuous function on a rectangle \(R = [a,b] \times [c,d]\), then \[\begin{equation*} \iint_R f(x,y) \, dA = \int_c^d \int_a^b f(x,y) \, dx \, dy = \int_a^b \int_c^d f(x,y) \, dy \, dx. \end{equation*}\]

Fubini’s theorem enables us to evaluate iterated integrals without resorting to the limit definition. Instead, working with one integral at a time, we can use the Fundamental Theorem of Calculus from single-variable calculus to find the exact value of each integral, starting with the inner integral.

Activity

  1. Let \(f(x,y) = 25-x^2-y^2\) on the rectangular domain \(R = [-3,3] \times [-4,4]\).
    1. Viewing \(x\) as a fixed constant, use the Fundamental Theorem of Calculus to evaluate the integral \[\begin{equation*} A(x) = \int_{-4}^4 f(x,y) \, dy. \end{equation*}\] Note that you will be integrating with respect to \(y\), and holding \(x\) constant. Your result should be a function of \(x\) only.
    2. Next, use your result from Item 1 along with the Fundamental Theorem of Calculus to determine the value of \(\int_{-3}^3 A(x) \, dx\).
    3. What is the value of \(\iint_R f(x,y) \, dA\)? What are two different ways we may interpret the meaning of this value?
  2. Let \(f(x,y) = x+y^2\) on the rectangle \(R = [0,2] \times [0,3]\).
    1. Evaluate \(\iint_R f(x,y) \, dA\) using an iterated integral. Choose an order for integration by deciding whether you want to integrate first with respect to \(x\) or \(y\).
    2. Evaluate \(\iint_R f(x,y) \, dA\) using the iterated integral whose order of integration is the opposite of the order you chose in Item a.

5.7 Double integrals over general regions

In this subsection, we answer the following questions:

  1. How do we define a double integral over a non-rectangular region?
  2. What general form does an iterated integral over a non-rectangular region have?

Recall that we defined the double integral of a continuous function \(f = f(x,y)\) over a rectangle \(R = [a,b] \times [c,d]\) as \[\begin{equation*} \iint_R f(x,y) \, dA = \lim_{m,n \to \infty} \sum_{j=1}^n \sum_{i=1}^m f(x_{ij}^*, y_{ij}^*) \cdot \Delta A, \end{equation*}.\] Furthermore, we have seen that we can evaluate a double integral \(\iint_R f(x,y) \, dA\) over \(R\) as an iterated integral of either of the forms \[\begin{equation*} \int_a^b \int_c^d f(x,y) \, dy \, dx \ \ \ \ \ \text{ or } \ \ \ \ \ \int_c^d \int_a^b f(x,y) \, dx \, dy. \end{equation*}\]

It is natural to wonder how we might define and evaluate a double integral over a non-rectangular region; we explore one such example in the following preview activity.

Preview Activity

A tetrahedron is a three-dimensional figure with four faces, each of which is a triangle. A picture of the tetrahedron \(T\) with vertices \((0,0,0)\), \((1,0,0)\), \((0,1,0)\), and \((0,0,1)\) is shown in Figure 5.30.

Figure 5.30: The tetrahedron \(T\)
Figure 5.31: Projecting \(T\) onto the \(xy\)-plane.
  1. Instead of memorizing or looking up the formula for the volume of a tetrahedron, we can use a double integral to calculate the volume of the tetrahedron \(T\). To see how, notice that the top face of the tetrahedron \(T\) is the plane whose equation is \[\begin{equation*} z = 1-(x+y). \end{equation*}\] Provided that we can use an iterated integral on a non-rectangular region, the volume of the tetrahedron will be given by an iterated integral of the form \[\begin{equation*} \int_{x=?}^{x=?} \int_{y=?}^{y=?} 1-(x+y) \, dy \, dx. \end{equation*}\] The issue that is new here is how we find the limits on the integrals; note that the outer integral’s limits are in \(x\), while the inner ones are in \(y\), since we have chosen \(dA = dy \, dx\). To see the domain over which we need to integrate, think of standing way above the tetrahedron looking straight down on it, which means we are projecting the entire tetrahedron onto the \(xy\)-plane. The resulting domain is the triangular region shown in Figure 5.31. Explain why we can represent the triangular region with the inequalities \[\begin{equation*} 0 \leq y \leq 1-x \ \ \ \text{ and } \ \ \ 0 \leq x \leq 1. \end{equation*}\] (Hint: Consider the cross sectional slice shown in Figure 5.31.)

  2. Explain why it makes sense to now write the volume integral in the form \[\begin{equation*} \int_{x=?}^{x=?} \int_{y=?}^{y=?} 1-(x+y) \, dy \, dx = \int_{x=0}^{x=1} \int_{y=0}^{y=1-x} 1-(x+y) \, dy \, dx. \end{equation*}\]

  3. Use the Fundamental Theorem of Calculus to evaluate the iterated integral \[\begin{equation*} \int_{x=0}^{x=1} \int_{y=0}^{y=1-x} 1-(x+y) \, dy \, dx \end{equation*}.\] (As with iterated integrals over rectangular regions, start with the inner integral.)

As we saw in the preceding preview activity, a function \(f = f(x,y)\) may be considered over regions other than rectangular ones, and thus we want to understand how to set up and evaluate double integrals over non-rectangular regions. Note that if we can, then the two interpretations of the double integral noted above will naturally extend to solid regions with non-rectangular bases.

So, suppose \(f\) is a continuous function on a closed, bounded domain \(D\). For example, consider \(D\) as the circular domain shown in Figure 5.32.

Figure 5.32: A non-rectangular domain.
Figure 5.33: Enclosing this domain in a rectangle.

We can enclose \(D\) in a rectangular domain \(R\) as shown at right in Figure 5.33 and extend the function \(f\) to be defined over \(R\) in order to be able to use the definition of the double integral over a rectangle. We extend \(f\) in such a way that its values at the points in \(R\) that are not in \(D\) contribute 0 to the value of the integral. In other words, define a function \(F = F(x, y)\) on \(R\) as \[\begin{equation*} F(x,y) = \begin{cases}f(x,y), & \text{ if } (x,y) \in D, \\ 0, & \text{ if } (x,y) \not\in D \end{cases} . \end{equation*}\]

We then say that the double integral of \(f\) over \(D\) is the same as the double integral of \(F\) over \(R\), and thus \[\begin{equation*} \iint_D f(x,y) \, dA = \iint_R F(x,y) \, dA. \end{equation*}\]

In practice, we just ignore everything that is in \(R\) but not in \(D\), since these regions contribute 0 to the value of the integral.

Just as with double integrals over rectangles, a double integral over a domain \(D\) can be evaluated as an iterated integral. If the region \(D\) can be described by the inequalities \(g_1(x) \leq y \leq g_2(x)\) and \(a \leq x \leq b\), where \(g_1=g_1(x)\) and \(g_2=g_2(x)\) are functions of only \(x\), then \[\begin{equation*} \iint_D f(x,y) \, dA = \int_{x=a}^{x=b} \int_{y=g_1(x)}^{y=g_2(x)} f(x,y) \, dy \, dx. \end{equation*}\]

Alternatively, if the region \(D\) is described by the inequalities \(h_1(y) \leq x \leq h_2(y)\) and \(c \leq y \leq d\), where \(h_1=h_1(y)\) and \(h_2=h_2(y)\) are functions of only \(y\), we have \[ \begin{equation*} \iint_D f(x,y) \, dA = \int_{y=c}^{y=d} \int_{x=h_1(y)}^{x=h_2(y)} f(x,y) \, dx \, dy. \end{equation*} \]

The structure of an iterated integral is of particular note. In an iterated double integral:

  1. the limits on the outer integral must be constants

  2. the limits on the inner integral must be constants or in terms of only the remaining variable, that is, if the inner integral is with respect to \(y\), then its limits may only involve \(x\) and constants, and vice versa.

We next consider a detailed example. Let \(f(x,y) = x^2y\) be defined on the triangle \(D\) with vertices \((0,0)\), \((2,0)\), and \((2,3)\) as shown in Figure 5.34.

Figure 5.34: A triangular domain.
Figure 5.35: Slices in the \(y\) direction.
Figure 5.36: Slices in the \(x\) direction.

To evaluate \(\iint_D f(x,y) \, dA\), we must first describe the region \(D\) in terms of the variables \(x\) and \(y\). We take two approaches.

Approach 1: Integrate first with respect to \(y\).

In this case we choose to evaluate the double integral as an iterated integral in the form \[\begin{equation*} \iint_D x^2y \, dA = \int_{x=a}^{x=b} \int_{y=g_1(x)}^{y=g_2(x)} x^2y \, dy \, dx, \end{equation*}\] and therefore we need to describe \(D\) in terms of inequalities \[\begin{equation*} g_1(x) \leq y \leq g_2(x) \ \ \ \ \ \text{ and } \ \ \ \ \ a \leq x \leq b. \end{equation*}\] Since we are integrating with respect to \(y\) first, the iterated integral has the form \[\begin{equation*} \iint_D x^2y \, dA =\int_{x=a}^{x=b} A(x) \, dx, \end{equation*}\] where \(A(x)\) is a cross sectional area in the \(y\) direction. So we are slicing the domain perpendicular to the \(x\)-axis and want to understand what a cross sectional area of the overall solid will look like. Several slices of the domain are shown in Figure 5.35. On a slice with fixed \(x\) value, the \(y\) values are bounded below by 0 and above by the \(y\) coordinate on the hypotenuse of the right triangle. Thus, \(g_1(x) = 0\); to find \(y = g_2(x)\), we need to write the hypotenuse as a function of \(x\). The hypotenuse connects the points (0,0) and (2,3) and hence has equation \(y = \frac{3}{2}x\). This gives the upper bound on \(y\) as \(g_2(x) = \frac{3}{2}x\). The leftmost vertical cross section is at \(x=0\) and the rightmost one is at \(x=2\), so we have \(a=0\) and \(b=2\). Therefore, \[\begin{equation*} \iint_D x^2y \, dA = \int_{x=0}^{x=2} \int_{y=0}^{y = \frac32 x} x^2y \, dy \, dx. \end{equation*}\] We evaluate the iterated integral by applying the Fundamental Theorem of Calculus first to the inner integral, and then to the outer one, and find that \[\begin{align*} \int_{x=0}^{x=2} \int_{y=0}^{y=\frac32 x} x^2y \, dy \, dx &= \int_{x=0}^{x=2} \left[x^2 \cdot \frac{y^2}{2}\right]\biggm|_{y=0}^{y=\frac32 x} \, dx\\ & = \int_{x=0}^{x=2} \frac{9}{8}x^4\, dx\\ & = \frac{9}{8}\frac{x^5}{5}\biggm|_{x=0}^{x=2}\\ & = \left(\frac{9}{8}\right) \left(\frac{32}{5}\right)\\ & = \frac{36}{5}. \end{align*}\]

Approach 2: Integrate first with respect to \(x\).

In this case, we choose to evaluate the double integral as an iterated integral in the form \[\begin{equation*} \iint_D x^2y \, dA = \int_{y=c}^{y=d} \int_{x=h_1(y)}^{x=h_2(y)} x^2y \, dx \, dy \end{equation*}\] and thus need to describe \(D\) in terms of inequalities \[\begin{equation*} h_1(y) \leq x \leq h_2(y) \ \ \ \ \ \text{ and } \ \ \ \ \ c \leq y \leq d. \end{equation*}\] Since we are integrating with respect to \(x\) first, the iterated integral has the form \[\begin{equation*} \iint_D x^2y \, dA = \int_c^d A(y) \, dy, \end{equation*}\] where \(A(y)\) is a cross sectional area of the solid in the \(x\) direction. Several slices of the domain perpendicular to the \(y\)-axis are shown in Figure 5.35. On a slice with fixed \(y\) value, the \(x\) values are bounded below by the \(x\) coordinate on the hypotenuse of the right triangle and above by 2. So \(h_2(y) = 2\); to find \(h_1(y)\), we need to write the hypotenuse as a function of \(y\). Solving the earlier equation we have for the hypotenuse (\(y = \frac32 x\)) for \(x\) gives us \(x = \frac{2}{3}y\). This makes \(h_1(y) = \frac{2}{3}y\). The lowest horizontal cross section is at \(y=0\) and the uppermost one is at \(y=3\), so we have \(c=0\) and \(d=3\). Therefore, \[\begin{equation*} \iint_D x^2y \, dA = \int_{y=0}^{y=3} \int_{x=(2/3)y}^{x=2} x^2y \, dx \, dy. \end{equation*}\] We evaluate the resulting iterated integral as before by twice applying the Fundamental Theorem of Calculus, and find that \[\begin{align*} \int_{y=0}^{y=3} \int_{x=\frac{2}{3}y}^{2} x^2y \, dx \, dy & = \int_{y=0}^{y=3} \left[\frac{x^3}{3}\right]\biggm|_{x=\frac{2}{3}y}^{x=2}y \, dx\\ & = \int_{y=0}^{y=3} \left[\frac{8}{3}y - \frac{8}{81}y^4 \right] \, dy\\ & = \left[\frac{8}{3}\frac{y^2}{2} - \frac{8}{81}\frac{y^5}{5}\right]\biggm|_{y=0}^{y=3}\\ & = \left(\frac{8}{3}\right) \left(\frac{9}{2}\right) - \left(\frac{8}{81}\right) \left(\frac{243}{5}\right)\\ & = 12 - \frac{24}{5}\\ & = \frac{36}{5}. \end{align*}\]

We see, of course, that in the situation where \(D\) can be described in two different ways, the order in which we choose to set up and evaluate the double integral doesn’t matter, and the same value results in either case.

Activity

  1. Consider the double integral \(\iint_D (4-x-2y) \, dA\), where \(D\) is the triangular region with vertices (0,0), (4,0), and (0,2).
    1. Write the given integral as an iterated integral of the form \(\iint_D (4-x-2y) \, dy \, dx\). Draw a labeled picture of \(D\) with relevant cross sections.
    2. Write the given integral as an iterated integral of the form \(\iint_D (4-x-2y) \, dx \, dy\). Draw a labeled picture of \(D\) with relevant cross sections.
    3. Evaluate the two iterated integrals from (a) and (b), and verify that they produce the same value.
  2. Consider the iterated integral \(\int_{x=0}^{x=1} \int_{y=x}^{y=\sqrt{x}} (4x+10y) \, dy \, dx\).
    1. Sketch the region of integration, \(D\), for which \[\begin{equation*} \iint_D (4x + 10y) \, dA = \int_{x=0}^{x=1} \int_{y=x}^{y=\sqrt{x}} (4x+10y) \, dy \, dx. \end{equation*}\]
    2. Determine the equivalent iterated integral that results from integrating in the opposite order (\(dx \, dy\), instead of \(dy \, dx\)). That is, determine the limits of integration for which \[\begin{equation*} \iint_D (4x + 10y) \, dA = \int_{y=?}^{y=?} \int_{x=?}^{x=?} (4x+10y) \, dx \, dy. \end{equation*}\]
    3. Evaluate one of the two iterated integrals above. Explain what the value you obtained tells you.
    4. Set up and evaluate a single definite integral to determine the exact area of \(D\), \(A(D)\).
  3. Consider the iterated integral \(\int_{x=0}^{x=4} \int_{y=x/2}^{y=2} e^{y^2} \, dy \, dx\).
    1. Explain why we cannot find a simple antiderivative for \(e^{y^2}\) with respect to \(y\), and thus are unable to evaluate \(\int_{x=0}^{x=4} \int_{y=x/2}^{y=2} e^{y^2} \, dy \, dx\) in the indicated order using the Fundamental Theorem of Calculus.
    2. Given that \(\iint_D e^{y^2} \, dA = \int_{x=0}^{x=4} \int_{y=x/2}^{y=2} e^{y^2} \, dy \, dx\), sketch the region of integration, \(D\).
    3. Rewrite the given iterated integral in the opposite order, using \(dA = dx \, dy\). (Hint: You may need more than one integral.)
    4. Use the Fundamental Theorem of Calculus to evaluate the iterated integral you developed in (c). Write one sentence to explain the meaning of the value you found.
    5. What is the important lesson this activity offers regarding the order in which we set up an iterated integral?

  1. We won’t formally define differentiability of multivariable functions here, and for our purposes continuous differentiability is the only condition we will ever need to use. It is important to note that continuous differentiability is a stronger condition than differentiability. All of the results we encounter will apply to differentiable functions, and so also apply to continuously differentiable functions.↩︎