## Section11.9Change of Variables

In single variable calculus, we encountered the idea of a change of variable in a definite integral through the method of substitution. For example, given the definite integral

\begin{equation*} \int_0^2 2x(x^2+1)^3 \, dx, \end{equation*}

we naturally consider the change of variable $u = x^2+1\text{.}$ From this substitution, it follows that $du = 2x \, dx\text{,}$ and since $x = 0$ implies $u = 1$ and $x = 2$ implies $u = 5\text{,}$ we have transformed the original integral in $x$ into a new integral in $u\text{.}$ In particular,

\begin{equation*} \int_0^2 2x(x^2+1)^3 \, dx = \int_1^5 u^3 \, du. \end{equation*}

The latter integral, of course, is far easier to evaluate.

Through our work with polar, cylindrical, and spherical coordinates, we have already implicitly seen some of the issues that arise in using a change of variables with two or three variables present. In what follows, we seek to understand the general ideas behind any change of variables in a multiple integral.

###### Preview Activity11.9.1.

Consider the double integral

$$I = \iint_D x^2+y^2 \, dA,\label{eq_11_9_COV_PA}\tag{11.9.1}$$

where $D$ is the upper half of the unit disk.

1. Write the double integral $I$ given in Equation (11.9.1) as an iterated integral in rectangular coordinates.

2. Write the double integral $I$ given in Equation  (11.9.1) as an iterated integral in polar coordinates.

1. When we write the double integral (11.9.1) as an iterated integral in polar coordinates we make a change of variables, namely

$$x = r \cos(\theta) \ \ \ \ \ \text{ and } \ \ \ \ \ y = r \sin(\theta).\label{eq_11_9_pol_to_rect}\tag{11.9.2}$$

We also then have to change $dA$ to $r \, dr \, d\theta\text{.}$ This process also identifies a “polar rectangle” $[r_1, r_2] \times [\theta_1, \theta_2]$ with the original Cartesian rectangle, under the transformation 1  in Equation (11.9.2). The vertices of the polar rectangle are transformed into the vertices of a closed and bounded region in rectangular coordinates.

To work with a numerical example, let's now consider the polar rectangle $P$ given by $[1, 2] \times [\frac{\pi}{6}, \frac{\pi}{4}]\text{,}$ so that $r_1 = 1\text{,}$ $r_2=2\text{,}$ $\theta_1 = \frac{\pi}{6}\text{,}$ and $\theta_2 = \frac{\pi}{4}\text{.}$

1. Use the transformation determined by the equations in (11.9.2) to find the rectangular vertices that correspond to the polar vertices in the polar rectangle $P\text{.}$ In other words, by substituting appropriate values of $r$ and $\theta$ into the two equations in (11.9.2), find the values of the corresponding $x$ and $y$ coordinates for the vertices of the polar rectangle $P\text{.}$ Label the point that corresponds to the polar vertex $(r_1, \theta_1)$ as $(x_1, y_1)\text{,}$ the point corresponding to the polar vertex $(r_2, \theta_1)$ as $(x_2, y_2)\text{,}$ the point corresponding to the polar vertex $(r_1, \theta_2)$ as $(x_3, y_3)\text{,}$ and the point corresponding to the polar vertex $(r_2, \theta_2)$ as $(x_4, y_4)\text{.}$

2. Draw a picture of the figure in rectangular coordinates that has the points $(x_1,y_1)\text{,}$ $(x_2,y_2)\text{,}$ $(x_3, y_3)\text{,}$ and $(x_4,y_4)$ as vertices. (Note carefully that because of the trigonometric functions in the transformation, this region will not look like a Cartesian rectangle.) What is the area of this region in rectangular coordinates? How does this area compare to the area of the original polar rectangle?

A transformation is another name for function: here, the equations $x = r\cos(\theta)$ and $y = r\sin(\theta)$ define a function $T$ by $T(r, \theta) = (r\cos(\theta), r\sin(\theta))$ so that $T$ is a function (transformation) from $\R^2$ to $\R^2\text{.}$ We view this transformation as mapping a version of the $xy$-plane where the axes are viewed as representing $r$ and $\theta$ (the $r \theta$-plane) to the familiar $xy$-plane.

### Subsection11.9.1Change of Variables in Polar Coordinates

The general idea behind a change of variables is suggested by Preview Activity 11.9.1. There, we saw that in a change of variables from rectangular coordinates to polar coordinates, a polar rectangle $[r_1, r_2] \times [\theta_1, \theta_2]$ gets mapped to a Cartesian rectangle under the transformation

\begin{equation*} x = r \cos(\theta) \ \ \ \ \ \text{ and } \ \ \ \ \ y = r \sin(\theta). \end{equation*}

The vertices of the polar rectangle $P$ are transformed into the vertices of a closed and bounded region $P'$ in rectangular coordinates. If we view the standard coordinate system as having the horizontal axis represent $r$ and the vertical axis represent $\theta\text{,}$ then the polar rectangle $P$ appears to us at left in Figure 11.9.1. The image $P'$ of the polar rectangle $P$ under the transformation given by (11.9.2) is shown at right in Figure 11.9.1. We thus see that there is a correspondence between a simple region (a traditional, right-angled rectangle) and a more complicated region (a fraction of an annulus) under the function $T$ given by $T(r, \theta) = (r\cos(\theta), r\sin(\theta))\text{.}$

Furthermore, as Preview Activity 11.9.1 suggests, it follows generally that for an original polar rectangle $P = [r_1, r_2] \times [\theta_1, \theta_2]\text{,}$ the area of the transformed rectangle $P'$ is given by $\frac{r_2+r_1}{2} \Delta r \Delta \theta\text{.}$ Therefore, as $\Delta r$ and $\Delta \theta$ go to 0 this area becomes the familiar area element $dA = r \, dr \, d\theta$ in polar coordinates. When we proceed to working with other transformations for different changes in coordinates, we have to understand how the transformation affects area so that we may use the correct area element in the new system of variables.

### Subsection11.9.2General Change of Coordinates

We first focus on double integrals. As with single integrals, we may be able to simplify a double integral of the form

\begin{equation*} \iint_D f(x,y) \, dA \end{equation*}

by making a change of variables (that is, a substitution) of the form

\begin{equation*} x = x(s, t) \ \ \ \ \ \text{ and } \ \ \ \ \ y = y(s, t) \end{equation*}

where $x$ and $y$ are functions of new variables $s$ and $t\text{.}$ This transformation introduces a correspondence between a problem in the $xy$-plane and one in the the $st$-plane. The equations $x=x(s,t)$ and $y=y(s,t)$ convert $s$ and $t$ to $x$ and $y\text{;}$ we call these formulas the change of variable formulas. To complete the change to the new $s,t$ variables, we need to understand the area element, $dA\text{,}$ in this new system. The following activity helps to illustrate the idea.

###### Activity11.9.2.

Consider the change of variables

\begin{equation*} x = s + 2 t \ \ \ \ \ \text{ and } \ \ \ \ \ y = 2 s + \sqrt{t}. \end{equation*}

Let's see what happens to the rectangle $T = [0,1] \times [1,4]$ in the $st$-plane under this change of variable.

1. Draw a labeled picture of $T$ in the $st$-plane.

2. Find the image of the $st$-vertex $(0,1)$ in the $xy$-plane. Likewise, find the respective images of the other three vertices of the rectangle $T\text{:}$ $(0,4)\text{,}$ $(1,1)\text{,}$ and $(1,4)\text{.}$

3. In the $xy$-plane, draw a labeled picture of the image, $T'\text{,}$ of the original $st$-rectangle $T\text{.}$ What appears to be the shape of the image, $T'\text{?}$

4. To transform an integral with a change of variables, we need to determine the area element $dA$ for image of the transformed rectangle. Note that $T'$ is not exactly a parallelogram since the equations that define the transformation are not lienar. But we can approximate the area of $T'$ with the area of a parallelogram. How would we find the area of a parallelogram that approximates the area of the $xy$-figure $T'\text{?}$ (Hint: Remember what the cross product of two vectors tells us.)

Activity 11.9.2 presents the general idea of how a change of variables works. We partition a rectangular domain in the $st$ system into subrectangles. Let $T = [a, b] \times [a+\Delta s, b+\Delta t]$ be one of these subrectangles. Then we transform this into a region $T'$ in the standard $xy$ Cartesian coordinate system. The region $T'$ is called the image of $T\text{;}$ the region $T$ is the pre-image of $T'\text{.}$ Although the sides of this $xy$ region $T'$ aren't necessarily straight (linear), we will approximate the element of area $dA$ for this region with the area of the parallelogram whose sides are given by the vectors $\vv$ and $\vw\text{,}$ where $\vv$ is the vector from $(x(a, b), y(a, b))$ to $(x(a + \Delta s, b), y(a + \Delta s, b))\text{,}$ and $\vw$ is the vector from $(x(a, b), y(a, b))$ to $(x(a, b + \Delta t), y(a, b + \Delta t))\text{.}$

An example of an image $T'$ in the $xy$-plane that results from a transformation of a rectangle $T$ in the $st$-plane is shown in Figure 11.9.2.

The components of the vector $\vv$ are

\begin{align*} \vv \amp = \left\langle x(a+ \Delta s, b) - x(a,b), y(a+ \Delta s, b) - y(a,b), 0 \right\rangle \end{align*}

and similarly those for $\vw$ are

\begin{align*} \vw \amp = \left\langle x(a, b+ \Delta t) - x(a,b), y(a, b+ \Delta s) - y(a,b), 0 \right\rangle. \end{align*}

Slightly rewriting $\vv$ and $\vw\text{,}$ we have

\begin{align*} \vv \amp = \left\langle \frac{x(a+ \Delta s, b) - x(a,b)}{\Delta s}, \frac{y(a+ \Delta s, b) - y(a,b)}{\Delta s}, 0 \right\rangle \Delta s, \ \mbox{and}\\ \vw \amp = \left\langle \frac{x(a, b+ \Delta t) - x(a,b)}{\Delta t}, \frac{y(a, b+ \Delta s) - y(a,b)}{\Delta t}, 0 \right\rangle \Delta t. \end{align*}

For small $\Delta s$ and $\Delta t\text{,}$ the definition of the partial derivative tells us that

\begin{equation*} \vv \approx \left\langle \frac{\partial x}{\partial s}(a,b), \frac{\partial y}{\partial s}(a,b), 0 \right\rangle \Delta s \ \ \ \ \ \text{ and } \ \ \ \ \ \vw \approx \left\langle \frac{\partial x}{\partial t}(a,b), \frac{\partial y}{\partial t}(a,b), 0 \right\rangle \Delta t. \end{equation*}

Recall that the area of the parallelogram with sides $\vv$ and $\vw$ is the length of the cross product of the two vectors, $|\vv \times \vw|\text{.}$ From this, we observe that

\begin{align*} \vv \times \vw \amp \approx \left\langle \frac{\partial x}{\partial s}(a,b), \frac{\partial y}{\partial s}(a,b), 0 \right\rangle \Delta s \times \left\langle \frac{\partial x}{\partial t}(a,b), \frac{\partial y}{\partial t}(a,b), 0 \right\rangle \Delta t\\ \amp = \left\langle 0, \ 0, \ \frac{\partial x}{\partial s}(a,b) \frac{\partial y}{\partial t}(a,b) - \frac{\partial x}{\partial t}(a,b) \frac{\partial y}{\partial s}(a,b) \right\rangle \Delta s \, \Delta t. \end{align*}

Finally, by computing the magnitude of the cross product, we see that

\begin{align*} |\vv \times \vw| \amp \approx \left|\left\langle 0,0, \frac{\partial x}{\partial s}(a,b) \frac{\partial y}{\partial t}(a,b) - \frac{\partial x}{\partial t}(a,b) \frac{\partial y}{\partial s}(a,b) \right\rangle \Delta s \, \Delta t\right|\\ \amp = \left|\frac{\partial x}{\partial s}(a,b) \frac{\partial y}{\partial t}(a,b) - \frac{\partial x}{\partial t}(a,b) \frac{\partial y}{\partial s}(a,b)\right| \Delta s \, \Delta t. \end{align*}

Therefore, as the number of subdivisions increases without bound in each direction, $\Delta s$ and $\Delta t$ both go to zero, and we have

$$dA = \left|\frac{\partial x}{\partial s} \frac{\partial y}{\partial t} - \frac{\partial x}{\partial t} \frac{\partial y}{\partial s} \right| ds \, dt.\label{E_Area_Element}\tag{11.9.3}$$

Equation (11.9.3) hence determines the general change of variable formula in a double integral, and we can now say that

\begin{equation*} \iint_T f(x,y) \, dy \, dx = \iint_{T'} f(x(s,t),y(s,t)) \left|\frac{\partial x}{\partial s} \frac{\partial y}{\partial t} - \frac{\partial x}{\partial t} \frac{\partial y}{\partial s}\right| ds \, dt. \end{equation*}

The quantity

\begin{equation*} \frac{\partial x}{\partial s} \frac{\partial y}{\partial t} - \frac{\partial x}{\partial t} \frac{\partial y}{\partial s} \end{equation*}

is called the Jacobian, and we denote the Jacobian using the shorthand notation

\begin{equation*} \frac{\partial (x,y)}{\partial (s,t)} = \frac{\partial x}{\partial s} \frac{\partial y}{\partial t} - \frac{\partial x}{\partial t} \frac{\partial y}{\partial s}. \end{equation*}

Recall from Section 9.4 that we can also write this Jacobian as the determinant of the $2 \times 2$ matrix $\left[ \begin{array}{cc} \frac{\partial x}{\partial s} \amp \frac{\partial x}{\partial t} \\ \frac{\partial y}{\partial s} \amp \frac{\partial y}{\partial t} \end{array} \right] \text{.}$ Note that, as discussed in Section 9.4, the absolute value of the determinant of $\left[ \begin{array}{cc} \frac{\partial x}{\partial s} \amp \frac{\partial x}{\partial t} \\ \frac{\partial y}{\partial s} \amp \frac{\partial y}{\partial t} \end{array} \right]$ is the area of the parallelogram determined by the vectors $\vv$ and $\vw\text{,}$ and so the area element $dA$ in $xy$-coordinates is also represented by the area element $\left| \frac{\partial (x,y)}{\partial (s,t)} \right| \, ds \, dt$ in $st$-coordinates, and $\left| \frac{\partial (x,y)}{\partial (s,t)} \right|$ is the factor by which the transformation magnifies area.

To summarize, the preceding change of variable formula that we have derived now follows.

###### Change of Variables in a Double Integral.

Suppose a change of variables $x = x(s,t)$ and $y = y(s,t)$ transforms a closed and bounded region $R$ in the $st$-plane into a closed and bounded region $R'$ in the $xy$-plane. Under modest conditions (that are studied in advanced calculus), it follows that

\begin{equation*} \iint_{R'} f(x,y) \, dA = \iint_{R} f(x(s,t), y(s,t)) \left|\frac{\partial (x,y)}{\partial (s,t)}\right| \, ds \, dt. \end{equation*}
###### Activity11.9.3.

Find the Jacobian when changing from rectangular to polar coordinates. That is, for the transformation given by $x = r\cos(\theta)\text{,}$ $y = r\sin(\theta)\text{,}$ determine a simplified expression for the quantity

\begin{equation*} \frac{\partial x}{\partial r} \frac{\partial y}{\partial \theta} - \frac{\partial x}{\partial \theta} \frac{\partial y}{\partial r}. \end{equation*}

What do you observe about your result? How is this connected to our earlier work with double integrals in polar coordinates?

###### Activity11.9.4.

Let $D'$ be the region in the $xy$-plane bounded by the lines $y=0\text{,}$ $x=0\text{,}$ and $x+y=1\text{.}$ We will evaluate the double integral

$$\iint_{D'} \sqrt{x+y}(x-y)^2 \, dA\label{eq_11_9_COV_ex}\tag{11.9.4}$$

with a change of variables.

1. Sketch the region $D'$ in the $xy$-plane.

2. We would like to make a substitution that makes the integrand easier to antidifferentiate. Let $s = x+y$ and $t = x-y\text{.}$ Explain why this should make antidifferentiation easier by making the corresponding substitutions and writing the new integrand in terms of $s$ and $t\text{.}$

3. Solve the equations $s = x+y$ and $t = x-y$ for $x$ and $y\text{.}$ (Doing so determines the standard form of the transformation, since we will have $x$ as a function of $s$ and $t\text{,}$ and $y$ as a function of $s$ and $t\text{.}$)

4. To actually execute this change of variables, we need to know the $st$-region $D$ that corresponds to the $xy$-region $D'\text{.}$

1. What $st$ equation corresponds to the $xy$ equation $x+y=1\text{?}$

2. What $st$ equation corresponds to the $xy$ equation $x=0\text{?}$

3. What $st$ equation corresponds to the $xy$ equation $y=0\text{?}$

4. Sketch the $st$ region $D$ that corresponds to the $xy$ domain $D'\text{.}$

5. Make the change of variables indicated by $s = x+y$ and $t = x-y$ in the double integral (11.9.4) and set up an iterated integral in $st$ variables whose value is the original given double integral. Finally, evaluate the iterated integral.

### Subsection11.9.3Change of Variables in a Triple Integral

The argument for the change of variable formula for triple integrals is complicated, and we will not go into the details. The general process, though, is the same as the two-dimensional case. Given a solid $S'$ in the $xyz$-coordinate system in $\R^3\text{,}$ a change of variables transformation $x=x(s,t,u)\text{,}$ $y=y(s,t,u)\text{,}$ and $z = z(s,t,u)$ transforms $S'$ into a region $S$ in $stu$-coordinates. Any function $f = f(x,y,z)$ defined on $S'$ can be considered as a function $f = f(x(s,t,u), y(s,y,u), z(s,t,u))$ in $stu$-coordinates defined on $S\text{.}$ The volume element $dV$ in $xyz$-coordinates cooresponds to a scaled volume element in $stu$-coordinates, where the scale factor is given by the absolute value of the Jacobian, $\frac{\partial(x,y,z)}{\partial(s,t,u)}\text{,}$ which is the determinant of the $3 \times 3$ matrix

\begin{equation*} \left[ \begin{array}{ccc} \frac{\partial x}{\partial s} \amp \frac{\partial x}{\partial t} \amp \frac{\partial x}{\partial u} \\ \frac{\partial y}{\partial s} \amp \frac{\partial y}{\partial t} \amp \frac{\partial y}{\partial u} \\ \frac{\partial z}{\partial s} \amp \frac{\partial z}{\partial t} \amp \frac{\partial z}{\partial u} \end{array} \right]\text{.} \end{equation*}

(Recall that this determinant was introduced in Section 9.4.) That is, $\frac{\partial(x,y,z)}{\partial(s,t,u)}$ is given by

\begin{equation*} \frac{\partial x}{\partial s}\left[\frac{\partial y}{\partial t}\frac{\partial z}{\partial u} - \frac{\partial y}{\partial u}\frac{\partial z}{\partial t}\right] - \frac{\partial x}{\partial t}\left[\frac{\partial y}{\partial s}\frac{\partial z}{\partial u} - \frac{\partial y}{\partial u}\frac{\partial z}{\partial s}\right] + \frac{\partial x}{\partial u}\left[\frac{\partial y}{\partial s}\frac{\partial z}{\partial t} - \frac{\partial y}{\partial t}\frac{\partial z}{\partial s}\right]. \end{equation*}

To summarize,

###### Change of Variables in a Triple Integral.

Suppose a change of variables $x = x(s,t,u)\text{,}$ $y = y(s,t,u)\text{,}$ and $z = z(s,t,u)$ transforms a closed and bounded region $S$ in $stu$-coordinates into a closed and bounded region $S'$ in $xyz$-coordinates. Under modest conditions (that are studied in advanced calculus), the triple integral $\iiint_{S'} f(x,y,z) \, dV$ is equal to

\begin{equation*} \iiint_{S} f(x(s,t,u),y(s,t,u),z(s,t,u)) \ \left| \frac{\partial(x,y,z)}{\partial(s,t,u)} \right| \, ds \, dt \, du. \end{equation*}

###### Activity11.9.5.

Find the Jacobian when changing from Cartesian to cylindrical coordinates. That is, for the transformation given by $x = r\cos(\theta)\text{,}$ $y = r\sin(\theta)\text{,}$ and $z = z\text{,}$ determine a simplified expression for the quantity

\begin{equation*} \frac{\partial(x,y,z)}{\partial(r,\theta,z)}. \end{equation*}

What do you observe about your result? How is this connected to our earlier work with triple integrals in cylindrial coordinates?

###### Activity11.9.6.

Consider the solid $S'$ defined by the inequalities $0 \leq x \leq 2\text{,}$ $\frac{x}{2} \leq y \leq \frac{x}{2}+1\text{,}$ and $0 \leq z \leq 6\text{.}$ Consider the transformation defined by $s = \frac{x}{2}\text{,}$ $t = \frac{x-2y}{2}\text{,}$ and $u = \frac{z}{3}\text{.}$ Let $f(x,y,x) = x-2y+z\text{.}$

1. The transformation turns the solid $S'$ in $xyz$-coordinates into a box $S$ in $stu$-coordinates. Apply the transformation to the boundries of the solid $S'$ to find $stu$-coordinatte descriptions of the box $S\text{.}$

2. Find the Jacobian $\frac{\partial(x,y,z)}{\partial(s,t,u)}\text{.}$

3. Use the transformation to perform a change of variables and evaluate $\iiint_{S'} f(x,y,z) \, dV$ by evaluating

\begin{equation*} \iiint_{S} f(x(s,t,u),y(s,t,u),z(s,t,u)) \ \left| \frac{\partial(x,y,z)}{\partial(s,t,u)} \right| \, ds \, dt \, du\text{.} \end{equation*}

### Subsection11.9.4Summary

• If an integral is described in terms of one set of variables, we may write that set of variables in terms of another set of the same number of variables. If the new variables are chosen appropriately, the transformed integral may be easier to evaluate.

• The Jacobian is a scalar function that relates the area or volume element in one coordinate system to the corresponding element in a new system determined by a change of variables.

### Exercises11.9.5Exercises

###### 10.

Let $D'$ be the region in the $xy$-plane that is the parallelogram with vertices $(3,3)\text{,}$ $(4,5)\text{,}$ $(5,4)\text{,}$ and $(6,6)\text{.}$

1. Sketch and label the region $D'$ in the $xy$-plane.

2. Consider the integral $\iint_{D'} (x+y) \, dA\text{.}$ Explain why this integral would be difficult to set up as an iterated integral.

3. Let a change of variables be given by $x = 2u + v\text{,}$ $y = u + 2v\text{.}$ Using substitution or elimination, solve this system of equations for $u$ and $v$ in terms of $x$ and $y\text{.}$

4. Use your work in (c) to find the pre-image, $D\text{,}$ which lies in the $uv$-plane, of the originally given region $D'\text{,}$ which lies in the $xy$-plane. For instance, what $uv$ point corresponds to $(3,3)$ in the $xy$-plane?

5. Use the change of variables in (c) and your other work to write a new iterated integral in $u$ and $v$ that is equivalent to the original $xy$ integral $\iint_{D'} (x+y) \, dA\text{.}$

6. Finally, evaluate the $uv$ integral, and write a sentence to explain why the change of variables made the integration easier.

###### 11.

Consider the change of variables

\begin{equation*} x(\rho, \theta, \phi) = \rho \sin(\phi) \cos(\theta) \ \ \ \ \ y(\rho, \theta, \phi) = \rho \sin(\phi) \sin(\theta) \ \ \ \ \ z(\rho, \theta, \phi) = \rho \cos(\phi), \end{equation*}

which is the transformation from spherical coordinates to rectangular coordinates. Determine the Jacobian of the transformation. How is the result connected to our earlier work with iterated integrals in spherical coordinates?

###### 12.

In this problem, our goal is to find the volume of the ellipsoid $\frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1\text{.}$

1. Set up an iterated integral in rectangular coordinates whose value is the volume of the ellipsoid. Do so by using symmetry and taking 8 times the volume of the ellipsoid in the first octant where $x\text{,}$ $y\text{,}$ and $z$ are all nonnegative.

2. Explain why it makes sense to use the substitution $x = as\text{,}$ $y = bt\text{,}$ and $z = cu$ in order to make the region of integration simpler.

3. Compute the Jacobian of the transformation given in (b).

4. Execute the given change of variables and set up the corresponding new iterated integral in $s\text{,}$ $t\text{,}$ and $u\text{.}$

5. Explain why this new integral is better, but is still difficult to evaluate. What additional change of variables would make the resulting integral easier to evaluate?

6. Convert the integral from (d) to a new integral in spherical coordinates.

7. Finally, evaluate the iterated integral in (f) and hence determine the volume of the ellipsoid.