4.4. change of variables

$\newcommand{\R}{\mathbb R }$ $\newcommand{\N}{\mathbb N }$ $\newcommand{\Z}{\mathbb Z }$ $\newcommand{\bfa}{\mathbf a}$ $\newcommand{\bfb}{\mathbf b}$ $\newcommand{\bfc}{\mathbf c}$ $\newcommand{\bft}{\mathbf t}$ $\newcommand{\bff}{\mathbf f}$ $\newcommand{\bfF}{\mathbf F}$ $\newcommand{\bfk}{\mathbf k}$ $\newcommand{\bfg}{\mathbf g}$ $\newcommand{\bfG}{\mathbf G}$ $\newcommand{\bfh}{\mathbf h}$ $\newcommand{\bfu}{\mathbf u}$ $\newcommand{\bfv}{\mathbf v}$ $\newcommand{\bfx}{\mathbf x}$ $\newcommand{\bfp}{\mathbf p}$ $\newcommand{\bfy}{\mathbf y}$ $\newcommand{\ep}{\varepsilon}$

4.4. change of variables

  1. change of variables theorem
  2. Examples
  3. Problems

change of variables theorem

Theorem 1. Given open sets $U$ and $V$ in $\R^n$, let $\bfG:U\to V$ be one-to-one and onto, of class $C^1$, and assume that $\det D\bfG(\bfu)\ne 0$ for all $\bfu \in U$. Suppose that $T\subset U$ and $S \subset V$ are compact measurable sets such that $\bfG(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(\bfx) d^n\bfx = \int\cdots \int_T f(\bfG(\bfu)) \, |\det D\bfG(\bfu)| d^n\bfu. \end{equation}

Some remarks about the theorem:

About the proof.

The proof of the theorem has two main elements.

First, it is proved for linear functions $\bfG:\R^n\to \R^n$. You will do this yourself in Homework 2.3 in the case $n=2$. (The idea is exactly the same in the general case, but the notation is more complicated). One underlying idea is that the determinant tells how a linear transformation effects volume.

Second, the general case can be deduced from the linear case. We may not discuss this, except to note that the linear case more or less explains the presence of $|\det D\bfG(u)|$ in formula \eqref{cofv}.

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, one can learn to recognize domains that have a simple description in one of the above coordinate systems. The relevant change of variables is then likely to be useful when integrating over such a domain. See Examples 1 and 2 in Section 4.4 of Folland's Advanced Calculus.

2. One sometimes encounters problems for which a particular change of variables can be designed by hand to simplify an integral. See Examples 3 and 4 in Section 4.4 of Folland's Advanced Calculus, or some examples below.

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\mbox{ for } S := \{ (x,y) : 1\le xy \le 2, \ \ 2x^2 \le y \le 3x^2 \} $$

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(\bfx) \, d^2 \bfx = \iint_T f(\bfG(\bfu)) |\det D\bfG(\bfu)| \, d^2\bfu, \qquad\mbox{where $S = \bfG(T)$. } \end{equation} To do this, define \begin{equation}\label{uv.def} u = xy, \qquad v = y/x^2. \end{equation} Then $(x,y)\in S $ if and only if $1\le u \le 2$ and $2 \le v \le 3$. So let us define $$ T := \{(u,v)\in \R^2 : 1\le u \le 2, 2 \le v \le 3\} . $$

To use \eqref{ccv}, we need to know the function $\bfG:T\to S$ such that $(x,y) = \bfG(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)$, which in this example is not hard: \begin{align} u = xy\mbox{ and }v = y/x^2 \quad&\iff \quad u^2v = y^3\mbox{ and }u/v = x^3\nonumber \\ \quad&\iff \quad u^{2/3}v^{1/3} = y\mbox{ and }x = u^{1/3}v^{-1/3} \end{align} So we define $$ \bfG(u,v) = \binom{u^{1/3}v^{-1/3}}{u^{2/3}v^{1/3}} = \binom x y . $$ Then $$ D\bfG(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\bfG(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 $\bfG(u,v)$.

This 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\mbox{ for } S := \{ (x,y) : 1\le xy \le 2, \ \ 2x^2 \le y \le 3x^2 \} $$ 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\bfG(\bfu)$ in terms of the $(u,v)$ variables. In this case, fortunately, this is easy, as we can see by inspection that $\frac 13\frac{x^2}y = \frac 1{3v}$. We conclude that $\det D\bfG(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 := \{ (x,y,z) : (x+y+z )^2 + (x+2y+4z)^2 + (x+2y+8z)^2 \le 1\} $$

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 := \{(u,v,w) : u^2+v^2+w^2\le 1\}. $$ Unfortunately, to find the function $\bfG$ 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 $$ \bfG^{-1}(x,y,z) = (u,v,w) = (x+y+z,x+2y+4z, x+2y+8z). $$ Thus $$ D(\bfG^{-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\bfG = \frac 1{\det D(\bfG^{-1})} = \frac 14. $$ Thus a straightforward change of variables leads to $$ \iiint_S 1\, dV = \iiint_T 1 |\det D\bfG|\, dV = \frac 14 \mbox{volume of the unit ball} = \frac \pi 3. $$

Example 5. Assume that $A$ is a measurable subset of the $xy$-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 $$ \{ (1-z)(x,y,0) + z (0,0,1) : 0 \le z \le 1 \}. $$ (Here we are identifying points $(x,y)$ in the $xy$-plane with points $(x,y,0)\in \R^3$.) Thus $$ S = \{ ((1-z)x, (1-z)y,z) : 0 \le z \le 1, (x,y)\in A \}. $$ Looking at this, we can see that if we define $$ T := \{(x,y,z) : \ 0\le z \le 1, \ (x,y)\in A\} $$ and $$ \bfG(x,y,z) = ((1-z)x, (1-z)y, z), $$ then $\bfG$ 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 $\bfG(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 \mbox{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 $$ \mbox{ the volume of a cone in }\R^3 \ = \ \frac 13\mbox{(area of base)}*\mbox{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(\bfx)$ is the mass density at a point $\bfx$ in a 3-d region $S$, then the total mass in $S$ is $$ \mbox{mass} = \iiint_S \rho(\bfx) \, dV $$ and the center of mass is the point $(\bar x,\bar y, \bar z)$, where $$ \bar x = \frac 1 {\mbox{mass}}\iiint_S x \rho(\bfx) \, dV, \qquad \bar y = \frac 1 {\mbox{mass}}\iiint_S y \rho(\bfx) \, dV, \qquad \bar z = \frac 1 {\mbox{mass}}\iiint_S z \rho(\bfx) \, dV. $$ The centroid is given by the same formulas, but with $\rho = 1$ everywhere in $S$.

There are similar formula, with the obvious modifications, for the mass, centroid, etc of regions in $\R^n$ for every $n$, with $n=2$ being probably the most important case.

Basic skills

  1. recognize integrals that can be simplified by a transformation to polar, cylindrical, or spherical coordinates, then carry out the relevant transformation and evaluate the integral.

  2. recognize integrals that can be simplified by a custom-designed change of variables, then design and carry out the change of variables and evaluate the integral.

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.

Other questions

more questions may be added later.

  1. Assume that $S$ and $T$ are measurable sets in $\R^3$, and that there is a linear function $\bfG(\bfu) = A\bfu$ that is a transformation of $T$ onto $S$. What is the relationship between the centroid of $T$ and the centroid of $S$?
    (Maybe it will help to use the notation $\bar \bfx_S =(\bar x_S, \bar y_S, \bar z_S)$ and similarly $\bar \bfx_T$. Also, it should be enough to consider just the $\bar x$ component, for example.)

  2. Evaluate the integral $$ \iint_S \frac 1{1-x^2y^2}dA,\qquad\mbox{ where }S := [0,1)\times [0,1)\subset \R^2 $$ by means of the change of variables $\bfG:T\to S$ defined by $$ \binom x y = \bfG(u,v) = \binom{\frac{\sin u}{\cos v}}{\frac{\sin v }{ \cos u}}. $$ You will need to determine $T$.

    Remark. This question (the part about determining $T$) is actually unreasonably hard, but if you want to figure it out, here are some hints.
    1. Compute $\bfG(u,v)$ if $u=0$ and $v\ge 0$ or vice versa.
    2. Recalling that $\cos(a) = \sin(\frac \pi 2 -a)$ and $\sin a = \cos(\frac\pi 2 - a)$, investigate the behavior of $\bfG(u,v)$ for points $(u,v)$ such that $u,v$ are both positive and $u+v = \frac \pi 2 - \alpha$, where $\alpha$ is a (possibly small) positive number.
    3. in fact, $T = \{ (u,v)\in \R^2 : u \ge ... , \ v \ge .... ,\,u+v < ... \}$.

  3. 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\mbox{ if }|xy|<1. $$ and then integrating each term in the series. (This procedure is in fact legitimate for this integral, although this is not obvious. For this problem, you can just assume that it is valid.)

  4. (completely optional!!) 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}$