4.4 Change of Variables

4.4 Change of Variables

  1. Change of Variables Theorem
  2. Examples
  3. Problems

\(\Leftarrow\)  \(\Uparrow\)  \(\Rightarrow\)

Change of Variables Theorem

In this section, we introduce an important technique for simplifying integrals. From single variable calculus, this is similar to integration by substitution. We will substitute multiple variables instead of only one and make use of the Jacobian. From linear algebra, this is similar to changing variables to diagonalize a matrix. The difference is that we are not restricted to a linear tranformation - we will be able to use any invertible \(C^1\) transformation.

Given open sets \(U\) and \(V\) in \(\R^n\), let \(\mathbf G:U\to V\) be a bijection of class \(C^1\), and assume that \(\det D\mathbf G(\mathbf u)\ne 0\) for all \(\mathbf u \in U\). Suppose that \(T\subseteq U\) and \(S \subseteq V\) are compact measurable sets such that \(\mathbf G(T) = S\).

If \(f\) is an integrable function on \(S\), then \(f\circ G\) is an integrable function on \(T\), and \[\begin{equation}\label{cofv} \int\cdots\int_S f(\mathbf x) d^n\mathbf x = \int\cdots \int_T f(\mathbf G(\mathbf u)) \, |\det D\mathbf G(\mathbf u)| d^n\mathbf u. \end{equation}\]

Some remarks about the theorem:

About the Proof

The proof of the theorem has two main elements:

How to Use the Formula

In practice, changes of variables are normally used in one of two ways.

1. There are a handful of changes of variables that are used again and again, such as

With practice, you will learn to recognize domains that have a simple description in one of the above coordinate systems. Generally, inequalities involving one linear and two quadratic variables can be changed to cylindrical coordinates; those with three quadratic terms can be changed to spherical coordinates. The relevant change of variables is likely to be useful when integrating over such a domain.

2. You may encounter problems for which a particular change of variables can be designed to simplify an integral. Often this will be a linear change of variables, for example, to transform an ellipse into a circle, an ellipsoid into a sphere, or a general paraboloid \(w=Au^2+Buv+Cv^2\) into the standardized form \(z=x^2+y^2\).

Examples

Example 1.

Compute the volume of the region \(S\) in \(\R^3\) between the paraboloids \(z = -(x^2+y^2)\) and \(z=3(x^2+y^2)\), and such that \((x^2+y^2)^3 - 2x^2 - y^2 \le 0\).

Let’s try to convert all the conditions into cylindrical coordinates. To do this, we write down the inequalities with \((r\cos\theta, r\sin\theta, z)\) replacing \((x,y,z)\), and we try to simplify, as much as possible, the resulting inequalities involving the \((r,\theta, z)\) variables.

Example 2.

Compute \[ \iint_S y^3\, dA, \qquad\quad\text{ for } S = \left\{ (x,y) : 1\le xy \le 2, \ \ 2x^2 \le y \le 3x^2 \right\} \]

This could be done without changing variables, although it would require dividing \(S\) into several sub-regions and writing each sub-region in terms of inequalities. Let’s do it by changing variables instead. That is, we will use the formula \[\begin{equation}\label{ccv} \iint_S f(\mathbf x) \, d^2 \mathbf x = \iint_T f(\mathbf G(\mathbf u)) |\det D\mathbf G(\mathbf u)| \, d^2\mathbf u, \qquad\text{where $S = \mathbf G(T)$. } \end{equation}\] To do this, define \[\begin{equation}\label{uv.def} u = xy, \qquad v = y/x^2. \end{equation}\] Then $(x,y)S $ if and only if \(1\le u \le 2\) and \(2 \le v \le 3\). So let us define \[ T = \left\{(u,v)\in \R^2 : 1\le u \le 2, 2 \le v \le 3\right\} . \]

To use \(\eqref{ccv}\), we need to know the function \(\mathbf G:T\to S\) such that \((x,y) = \mathbf G(u,v)\), but our definition \((u,v) = (xy, y/x^2)\) instead gives \((u,v)\) as functions of \((x,y)\). So we solve for \((x,y)\) as functions of \((u,v)\): \[\begin{align} u = xy\text{ and }v = y/x^2 \quad&\iff \quad u^2v = y^3\text{ and }u/v = x^3\nonumber \\ \quad&\iff \quad u^{2/3}v^{1/3} = y\text{ and }x = u^{1/3}v^{-1/3} \end{align}\] So we define \[ \mathbf G(u,v) = \left(u^{1/3}v^{-1/3},u^{2/3}v^{1/3}\right) = (x,y). \] Then \[ D\mathbf G(u,v) = \left(\begin{array}{cc} \frac 13 u^{-2/3}v^{-1/3} & -\frac 13 u^{1/3}v^{-4/3}\\ \frac 23 u^{-1/3}v^{1/3} & \frac 13 u^{2/3}v^{-2/3} \end{array}\right) \] and thus \(\det D\mathbf G(u,v) = \frac 13 v^{-1}\). Using \(\eqref{ccv}\) and noting that \(y^3 = u^2v\), the integral is transformed into \[ \iint_S y^3 \, dA = \int_2^3\int_1^2 u^2 v ( \frac 1 3 v^{-1}) \, du\, dv = \int_2^3\int_1^2 \frac 13 u^2 \, du\, dv = \frac 79. \]

Example 3.

This example is almost the same as Example 2, but we will illustrate a different approach that is sometimes useful.

In Example 2, we found a change of variables \((u,v) = (xy, y/x^2)\) and we inverted these equations (that is, solved for \((x,y)\) to determine \((x,y)\) as functions \(\mathbf G(u,v)\).

Finding the inverse can sometimes be avoided. To illustrate the idea, let’s consider a problem like the one above, but simpler: \[ \iint_S 1 \, dA, \qquad\quad\text{ for } S = \left\{ (x,y) : 1\le xy \le 2, \ \ 2x^2 \le y \le 3x^2 \right\} \] That is, find the area of \(S\). This is the same set \(S\) as above, but the integrand is simpler.

We start as above: in order to use \(\eqref{ccv}\), we define \((u,v) = (xy, y/x^2)\). As above, the set \(S\) in the \(x-y\) plane then corresponds to the rectangle \(T= [1,2]\times [2,3]\) in the \((u,v)\) plane.

In order to write down the integral on the right-hand side of \(\eqref{ccv}\), we need to determine two quantities:

To use this in \(\eqref{ccv}\), we still need to express \(\det D\mathbf G(\mathbf u)\) in terms of the \((u,v)\) variables. In this case, we can see by inspection that \(\frac 13\frac{x^2}y = \frac 1{3v}\). Thus \(\det D\mathbf G(u,v) = \frac 1{3v}\).

We can now use \(\eqref{ccv}\) to conclude that \[ \iint_S 1\, dA = \int_2^3\int_1^2 \frac 1{3v} \, du\, dv = \frac 13 \ln(3/2). \]

Example 4.

Determine the volume of the ellipsoid \[ S = \left\{ (x,y,z) : (x+y+z)^2 + (x+2y+4z)^2 + (x+2y+8z)^2 \le 1\right\} \]

To do this, let’s define new coordinates \((u,v,w)\), related to \((x,y,z)\) by \[ u = x+y+z, \quad v = x+2y+4z, \quad w = x+2y+8z. \] These are chosen so that \[ (x,y,z)\in S \quad \iff (u,v,w) \in T = \left\{(u,v,w) : u^2+v^2+w^2\le 1\right\}. \] Unfortunately, to find the function \(\mathbf G\) that expresses \((x,y,z)\) in terms of \((u,v,w)\), we would have to invert a \(3\times 3\) matrix, and I for one would prefer not to do that. So let’s proced as in the previous example. We have \[ \mathbf G^{-1}(x,y,z) = (u,v,w) = (x+y+z,x+2y+4z, x+2y+8z). \] Thus \[ D(\mathbf G^{-1}) = \left( \begin{array}{ccc} 1&1&1 \\ 1&2&4 \\ 1&2&8 \end{array}\right) \] To compute the determinant, we recall that adding a multiple of one row to another row does not change the determinant. So by subtracting the second row from the last row, then the first row from the second row, we find that \[ \det \left( \begin{array}{ccc} 1&1&1 \\ 1&2&4 \\ 1&2&8 \end{array}\right) \ = \ \det \left( \begin{array}{ccc} 1&1&1 \\ 0&1&3 \\ 0&0&4 \end{array}\right) = 4. \] It follows that \[ \det D\mathbf G = \frac 1{\det D(\mathbf G^{-1})} = \frac 14. \] Thus a change of variables leads to \[ \iiint_S 1\, dV = \iiint_T 1 |\det D\mathbf G|\, dV = \frac 14 \text{volume of the unit ball} = \frac \pi 3. \]

### Example 5. Assume that \(A\) is a measurable subset of the \((x,y)\)-plane, and let \(S\) be the cone in \(\R^3\) whose base is \(A\), and whose vertex is the point \((0,0,1)\). Compute the volume of \(S\) (in terms of the area of \(A\).)

To do this, first let’s write down a formula for \(S\). The description (the cone with base \(A\) and vertex is the point \((0,0,1)\)) means that it consists of all line segments connecting a point \((x,y)\in A\) to the point \((0,0,1)\). Each line segment can be written \[ \left\{ (1-z)(x,y,0) + z (0,0,1) : 0 \le z \le 1 \right\}. \] (Here we are identifying points \((x,y)\) in the \(xy\)-plane with points \((x,y,0)\in \R^3\).) Thus \[ S = \left\{ ((1-z)x, (1-z)y,z) : 0 \le z \le 1, (x,y)\in A \right\}. \] Looking at this, we can see that if we define \[ T = \left\{(x,y,z) : \ 0\le z \le 1, \ (x,y)\in A\right\} \] and \[ \mathbf G(x,y,z) = ((1-z)x, (1-z)y, z), \] then \(\mathbf G\) is a \(C^1\) transformation (one-to-one and onto) of \(T\) onto \(S\). (Actually, it’s not completely one-to-one since for every \((x,y)\in A\), it is clear that \(\mathbf G(x,y,1) = (0,0,1)\). But this is a set of zero content and so we can ignore it.) Then applying the change of variables formula yields \[ \iiint_{S}1\, dV = \iiint_{T} (1-z)^2\, dV. \] Also, the Iterated Integrals Theorem implies that \[ \iiint_{T} (1-z)^2\, dV = \iint_{(x,y)\in A}\left( \int_0^1 (1-z)^2\, dz\,\right) dA = \frac 13\iint_{(x,y)\in A} \, dA = \frac 13 \text{area}(A). \]

Thus the volume of \(S\) equals \(1/3\) the area of the base.

A slightly more general version of the same computation shows that \[ \text{ the volume of a cone in }\R^3 \ = \ \frac 13\text{(area of base)}*\text{height}. \]

Problems

Some of these questions ask you to compute the mass, center of mass, or centroid of a region.

These are defined as follows: if \(\rho(\mathbf x)\) is the density at a point \(\mathbf x\) in a 3-d region \(S\), then the total mass in \(S\) is \[ \text{mass} = \iiint_S \rho(\mathbf x) \, dV \] and the center of mass is the point \((\overline x,\overline y, \overline z)\), where \[ \overline x = \frac 1 {\text{mass}}\iiint_S x \rho(\mathbf x) \, dV, \qquad \overline y = \frac 1 {\text{mass}}\iiint_S y \rho(\mathbf x) \, dV, \qquad \overline z = \frac 1 {\text{mass}}\iiint_S z \rho(\mathbf x) \, dV. \] The centroid is given by the same formulas, but with \(\rho = 1\) everywhere in \(S\).

There are similar formulas for the mass, center of mass, and centroid of regions in \(\R^n\) for every \(n\), with \(n=2\) being the most common.

Basic

The following problems ask you to

You certainly do not need to solve all the problems below, but you should solve enough of them, of enough different types, to make sure that you have mastered these skills.

  1. Let \(S\) be the region enclosed by the unit sphere \(\left\{ (x,y,z) :x^2+y^2+z^2 = 1\right\}\) and the cone \(\left\{(x,y,z) : z = (x^2+y^2)^{1/2}\right\}\).
    Write down formulas for both the volume and the vertical component \(\overline z\) of the centroid of \(S\), in both cylindrical and spherical coordinates. Note that by symmetry, \(\overline x = \overline y = 0\), but you may want to use the definition to compute these for practice.

  2. Write down formulas for both the volume and the centroid of the region enclosed by the unit sphere \(\left\{ (x,y,z) :x^2+y^2+z^2 = 1\right\}\) and the paraboloid \(\left\{(x,y,z) : z = x^2+y^2\right\}\), in both cylindrical and spherical coordinates.

  3. Compute the volume and the centroid of the intersection of the unit ball \(\left\{ (x,y,z) :x^2+y^2+z^2 < 1\right\}\) and the set \(\left\{(x,y,z) : z > |x|\right\}\).

  4. Compute the area of the set in the first quadrant of the \(xy\)-plane in which \((x^2+y^2)^{3/2} \le y^2\).

  5. Compute the mass of a material that occupies the ellipsoid \(S = \left\{(x,y,z) :( \frac xa )^2 + (\frac y b)^2 + (\frac z c)^2 \le 1\right\}\) if the density at a point \((x,y,z)\) is given by \[ \rho(x,y,z) = 1 - \left[\left( \frac xa \right)^2 + \left(\frac y b\right)^2 + \left(\frac z c\right)^2 \right]. \]

  6. Determine the volume of the ellipsoid \(\left\{ (x,y,z) : (x+y)^2 +4(y+z)^2 +9(x+z)^2 \le 1\right\}\).

  7. For \(r\) and \(h\) positive numbers, verify that the volume of the spherical shell \(B(\mathbf 0; r+h) \setminus B(\mathbf 0; r)\), that is, the set \(\left\{ (x,y,z): r^2 \le x^2+y^2+z^2 \le (r+h)^2\right\}\), is \(\frac{4\pi}{3}\left((r+h)^3-r^3\right)\).

  8. Find the volume of the region above the \((x,y)\)-plane, inside the cylinder \(x^2+ (y-2)^2 \le 4\), and below the surface \(z = 4 - x^2\)

  9. Compute the area and centroid of the region in \(\R^2\) bounded by the lines \(x+2y = 1, x+2y=4, y-x = 0\) and \(y-x = 2\).

  10. Compute \(\iint_S (1+y)e^{-x}\,dA\), where \(S\) is the region in \(\R^2\) bounded by the curves \(y = e^x, y=2e^x, x+y = 4, x+y=8\).

Advanced

  1. Assume that \(S\) and \(T\) are measurable sets in \(\R^3\), and that there is a linear function \(\mathbf G(\mathbf u) = A\mathbf u\) that is a transformation of \(T\) onto \(S\). What is the relationship between the centroid of \(T\) and the centroid of \(S\)?
    Hint It may help to use the notation \(\overline{\mathbf x_S} =(\overline {x_S}, \overline {y_S}, \overline {z_S})\) and similarly \(\overline {\mathbf x_T}\). Also, it should be enough to consider just the \(\overline x\) component, for example.
  2. Evaluate the integral \[ \iint_S \frac 1{1-x^2y^2}dA,\qquad\text{ where }S = [0,1)\times [0,1)\subseteq \R^2 \] by means of the change of variables \(\mathbf G:T\to S\) defined by \[ (x,y) = \mathbf G(u,v) = \left(\frac{\sin u}{\cos v},\frac{\sin v}{\cos u}\right). \] You will need to determine \(T\).
    Remark. The part about determining \(T\) is hard, but if you want to figure it out, here are some hints.

Hints

  1. Compute \(\mathbf G(u,v)\) when \(u=0\) and \(v\ge 0\) or vice-versa.
  2. Recall that \(\cos(a) = \sin(\frac \pi 2 -a)\) and \(\sin a = \cos(\frac\pi 2 - a)\). Investigate the behavior of \(\mathbf G(u,v)\) for points \((u,v)\) such that \(u,v\) are both positive and \(u+v = \frac \pi 2 - \alpha\), where \(\alpha\) is a positive number.
  3. Write \(T = \left\{ (u,v)\in \R^2 : u \ge \ldots , \ v \ge \ldots ,\,u+v < \ldots \right\}\).
  1. Evaluate the same integral as in the previous problem by writing the integrand as a (convergent) series \[ \frac 1{1-x^2y^2} = \sum_{j=0}^\infty (x^2 y^2)^j\qquad\text{ if }|xy|<1. \] and then integrating each term in the series. This procedure is legitimate for this integral, although this is not obvious. For this problem, you can just assume that it is valid.

  2. (Challenging.) Define \[ A = \sum_{j=1}^{\infty} \frac 1{(2j)^2}, \qquad B = \sum_{j=0}^{\infty} \frac 1{(2j+1)^2}. \] We know from single-variable calculus that all the sums in this problem are convergent.

Note that \(A+B = \sum_{j=1}^\infty \frac 1{j^2}\)

\(\Leftarrow\)  \(\Uparrow\)  \(\Rightarrow\)

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Canada License.