Loading...

Double and Triple Integrals Support

Double and Triple Integrals

Double Integrals Over Rectangles

Consider a function $f(x)$ defined for $x \in [a,b].$ We divide the interval $[a,b]$ into $n$-subintervals $\left[x_i,x_{i+1}\right]$ of equal width $\Delta x = (b-a)/n$ and we choose sample points $x_i^*$ in these subintervals to form the Riemann sum \[ \sum_{i=0}^{n-1}f\left(x_i^*\right)\Delta x. \] Then we take the limit of such sums as $n\to \infty$ to obtain the definite integral of $f$ from $a$ to $b:$ \[ \displaystyle \int_a^b f(x)dx = \lim_{n \to \infty} \sum_{i=0}^{n-1} f\left(x_i^*\right)\Delta x \] For the special case where $f(x)\geq 0,$ the Riemann sum can be interpreted as the sum of the areas of the approximation rectangles, and $\int_a^b f(x)dx$ represents the area under the curve $y=f(x).$

Approximating the area under the curve $y=f(x)$ with Riemann sums.

In a similar way we consider a function of two variables defined on a closed rectangle

\[ R = [a,b]\times [c,d]=\left\{(x,y)\in \R^2 ~|~ a\leq x\leq b,~c\leq y\leq d\right\} \]
Rectangular region $R.$

We first suppose that $f(x,y)\geq 0.$ The graph of $f$ is a surface with equation $y = f(x,y).$ Let $V$ be region that lies above $R$ and under the graph of $f,$ that is,

\[ V=\left\{(x,y)\in \R^3 ~|~ 0\leq z\leq f(x,y),~(x,y)\in R\right\} \]

Our goal here is to find the volume of $V.$

Divide $R$ into subrectangles by dividing $[a,b]$ into $m$ subintervals $[x_{i-1},x_i]$, each of width $$\Delta x =\frac{b-a}{m}$$ and $[c,d]$ into $n$ subintervals $[y_{i-1},y_i]$ of equal width $$\Delta y = \frac{d-c}{n}.$$

Combining these gives a rectangular grid $R_{ij}$ with subrectangles each of area $\Delta A= \Delta x\Delta y.$ In each subrectangle take any point $P_{ij}$ with co-ordinates $\left(x_{ij}^*, y_{ij}^*\right).$

Partition.

The volume of the box with base the rectangle $\Delta A$ and height the value of the function $f(x,y)$ at the point $P_{ij}$ (so the box touches the surface at a point directly above $P_{ij}$) is \[ V_{ij} = f\left(x_{ij}^*, y_{ij}^*\right)\Delta A \]

Then for all the subrectangles we have an approximation to the required volume $V$: \[ V\approx \sum_{i=1}^m\sum_{j=1}^n f\left(x_{ij}^*, y_{ij}^*\right) \Delta A, \] the double Riemann sum.

Let $\Delta x \to 0 $ and $\Delta y \to 0,$ i.e., $m\to \infty$ and $n\to \infty,$ then we define the volume to be \[ V= \lim_{m,n\to \infty} \sum_{i=1}^m\sum_{j=1}^n f\left(x_{ij}^*, y_{ij}^*\right) \Delta A, \] if the limits exist, and we write this as $$\ds \iint_Rf(x,y)~dA. $$

Approximating the volume.
The double integral of $f$ over the rectangle $R$ is
\[ \iint_Rf(x,y)~dA = \lim_{m,n\to \infty} \sum_{i=1}^m\sum_{j=1}^n f\left(x_{ij}^*, y_{ij}^*\right) \Delta A \]
if the limit exists.

We call $f$ integrable if the limit exists. Note that every continuous function is integrable.

Historical note

The exhaustion method for computing volumes in calculus is an ancient technique, dating back to Archimedes, that approximates a given volume by inscribing and circumscribing a sequence of simpler shapes (e.g., prisms or cylinders) whose volumes can be precisely computed. The key idea is to take an increasing number of these shapes, making their total volume approach the true volume of the solid.

In modern calculus, this idea evolved into Riemann integration and is formalized through definite integrals. So in essence, to compute the volume of a solid using the exhaustion method:

  1. Slice the solid into thin sections (e.g., disks, boxes, or shells).
  2. Approximate each section's volume using a simple geometric shape.
  3. Sum the volumes of these sections to form an approximation.
  4. Take the limit as the number of slices increases and their thickness approaches zero.



Iterated Integrals

It is often challenging to evaluate single integrals directly using the definition of an integral. However, the Fundamental Theorem of Calculus offers a more straightforward approach. Evaluating double integrals from first principles is even more complex, but we can simplify the process by expressing a double integral as an iterated integral, allowing us to compute it by evaluating two single integrals sequentially.

We define $\displaystyle \int_c^df(x,y)~dy$ to mean that $x$ is fixed and $f(x,y)$ is integrated with respect to $y$ from $y=c$ to $y=d$. So \[ A(x) = \int_c^df(x,y)~dy \] is a function of $x$ only. If we now integrate $A(x)$ with respect to $x$ from $x=a$ to $x=b$ we have

\begin{eqnarray}\label{iter-int-01} \int_a^b \int_c^d f(x,y)~dy ~dx &=& \int_a^b\left[ \int_c^d f(x,y)~dy\right]dx \end{eqnarray}

This is called the iterated integral.

Similarly, we have the iterated integral

\begin{eqnarray}\label{iter-int-02} \int_c^d \int_a^b f(x,y)~dx ~dy&=& \int_c^d\left[ \int_a^b f(x,y)~dx\right]dy \end{eqnarray}

In this case we first integrate with respect to $x$ (holding $y$ fixed) from $x=a$ to $x=b$ and then we integrate the resulting function of $y$ with respect to $y$ from $y=c$ to $y=d.$ Notice that in both equations (\ref{iter-int-01}) and (\ref{iter-int-02}) we work from the inside out.

Evaluate $\displaystyle {\small \int_0^2 \int_1^3 x^2y~dy~dx}.$

Integrating first with respect of $y$, and then with respect of $x,$ we obtain

\begin{eqnarray*} \int_0^2 \int_1^3 x^2y~dy~dx &= & \int_0^2 \left[ \int_1^3 x^2y~dy \right]dx \\ &=& \int_0^2 \left[ x^2 \frac{y^2}{2}\bigg|_{y=1}^{y=3} \right]dx\\ &=& \int_0^2 \left( x^2 ~\frac{3^2}{2} - x^2 ~\frac{1^2}{2} \right)dx \\ &=& \int_0^2 4x^2~dx \\ &=& \frac{4}{3}x^3\Bigg|_{x=0}^{x=2} \\ &=& \frac{4}{3} \left( 2^3 - 0^3 \right) \\ &=& \frac{32}{3}. \end{eqnarray*}

On the one other hand, we get

\begin{eqnarray*} \int_1^3 \int_0^2 x^2y~dx~dy &= & \int_1^3 \left[ \int_0^2 x^2y~dx \right]dy \\ &=& \int_1^3 \left[ y \frac{x^3}{3}\bigg|_{x=0}^{x=2} \right]dy \\ &=& \int_0^2 \left( y~ \frac{2^3}{3} - y ~\frac{0^3}{3} \right)dy \\ &=& \int_1^3 \frac{8}{3}y~dy \\ &=& \frac{8}{3} ~\frac{1}{2}~ y^2\Bigg|_{x=1}^{x=3} \\ &=& \frac{4}{3} \left(3^2 - 1^2 \right) \\ &=& \frac{32}{3}. \end{eqnarray*}

We have just calculated the volume of the solid outlined in the applet below:




Fubini's Theorem

Observe that in Example 1, we arrived at the same result regardless of whether we integrated first with respect to $y$ or $x.$ More generally, the two iterated integrals in equations (\ref{iter-int-01}) and (\ref{iter-int-02}) are always equal, meaning the order of integration does not affect the outcome. The following theorem provides a practical approach for evaluating a double integral by expressing it as an iterated integral in either order.

The order of integration does not affect the outcome.

The following theorem gives a practical method for evaluating a double integral by expressing it as an iterated integral (in either order).

If $f(x,y)$ is continuous on the rectangle $ R = [a,b]\times [c,d],$ then
\[ \iint_R f(x,y)~ dA = \int_a^b \int_c^d f(x,y) ~dy~dx= \int_c^d \int_a^b f(x,y)~dx~dy. \]
First, let's prove \[ \iint_R f(x,y)~ dA = \int_a^b \int_c^d f(x,y) ~dy~dx. \]

Let $c= y_0 \lt y_1 \lt \cdots \lt y_m =d$ be a partition of $[c,d]$ into $m$ equal parts. Define \[ F(x) = \int_c^d f(x,y) ~dy. \] Then \[ F(x) = \sum_{k=0}^{m-1}\int_{y_k}^{y_{k+1}}f(x,y)~dy. \] Using the integral version of the mean-value theorem 📃, This states that if $g(x)$ is continuous on $[a,b],$ then $\int_a^b g(x)~dx = g(c)(b-a)$ for some point $c\in[a,b].$ for each fixed $x$ and for each $k$ we have

\[ \int_{y_k}^{y_{k+1}}f(x,y)~dy = f\left(x, Y_k(x)\right)\left(y_{k+1}-y_k\right) \]

where the point $Y_k(x)$ belongs to $[y_k,y_{k+1}]$ and may depend on $x,$ $k,$ and $m.$

Thus we have that

\[ F(x) = \sum_{k=0}^{m-1} f\left(x, Y_k(x)\right)\left(y_{k+1}-y_k\right). \]

By the definition of the integral in one variable as a limit of Riemann sums,

\[ \int_a^b F(x)~dx = \int_a^b\left[ \int_c^d f(x,y)~dy\right]dx = \lim_{n \to \infty} \sum_{j=0}^{n-1} F\left(p_j\right)\left(x_{j+1}-x_j\right), \]

where $a= x_0 \lt x_1 \lt \cdots \lt x_n =b$ is a partition of the interval $[a,b]$ into equal parts and $p_j$ is any point in $[x_j,x_{j+1}].$ By setting $c_{jk}=(p_j, Y_k(p_j))\in R_{jk},$ we have

\[ F(p_j) =\sum_{k=0}^{n-1} f\left(c_{jk}\right)\left(y_{k+1}-y_k\right). \]

Therefore

\begin{eqnarray*} \int_a^b \int_c^d f(x,y)~dy~dx &=& \int_a^b F(x)~dx = \lim_{n \to \infty} \sum_{j=0}^{n-1} F\left(p_j\right)\left(x_{j+1}-x_j\right) \\ &=& \lim_{m,n \to \infty} \sum_{j=0}^{n-1} \sum_{k=0}^{m-1} f\left(c_{jk}\right)\left(y_{k+1}-y_k\right)\left(x_{j+1}-x_j\right) \\ &=& \iint_R f(x,y)~dA. \end{eqnarray*}

Using a similar argument we can also prove that

\begin{eqnarray*} \int_d^c \int_a^b f(x,y)~dx~dy = \iint_R f(x,y)~dA. \end{eqnarray*}

Of course, Fubini's theorem can be generalized to the case where $f$ is not necessarily continuous.

Let's evaluate the integral $\iint_R \left(x^2+y^2\right)dA,$ where $R = \left\{ (x,y)~|~0\leq x\leq 2, 0\leq y\leq 1 \right\}.$
\begin{eqnarray*} \iint_R \left(x^2+y^2\right)dA &=& \int_{x=0}^{x=2} \left[ \int_{y=0}^{y=1} \left(x^2+y^2\right)dy \right]dx \\ &=& \displaystyle \int_0^2 \left[ \left( x^2 y + \frac{y^3}{3} \right) \bigg|_{y=0}^{y=1} \right] dx \\ &=& \int_0^2 \left[ x^2 (1) + \frac{(1)^3}{3} - \left(x^2 (0) + x^2 \frac{(0)^3}{3}\right) \right]dx\\ &=& \int_0^2 \left( x^2+\frac{1}{3} \right) dx \\ &=& \left( \frac{x^3}{3}+\frac{1}{3}x \right)\Bigg|_{x=0}^{x=2} \\ &=& \frac{10}{3}. \end{eqnarray*}

On the other hand

\begin{eqnarray*} \iint_R \left(x^2+y^2\right)dA &=& \int_{y=0}^{y=1} \left[ \int_{x=0}^{x=2} \left(x^2+y^2\right)dx \right]dy \\ &=& \int_0^1 \left[ \left( \frac{x^3}{3} + y^2x \right) \bigg|_{x=0}^{x=2} \right] dy \\ &=& \int_0^1 \left[ \frac{(2)^3}{3} + y^2(2) - \left(\frac{(0)^3}{3} + y^2(0)\right) \right]dy \\ &=& \int_0^1 \left( \frac{8}{3} + 2y^2 \right) dy \\ &=& \left( \frac{8}{3}y + 2\frac{y^3}{3} \right)\Bigg|_{y=0}^{y=1} \\ &=& \frac{10}{3}. \end{eqnarray*}

In this case we compute the volume of the solid shown in the applet below:

In the special case where $f(x,y),$ can be factored as the product of a function of $x$ only and a function of $y$ only, the double integral of $f$ can be written in a particularly simple form. That is, suppose that $f(x,y) = g(x)h(y)$ and $R= [a,b]\times[c,d].$ Then Fubini's Theorem gives

\begin{eqnarray*} \iint_R f(x,y)~ dA &=& \int_c^d \int_a^b g(x)h(y)~dx~dy \\ &=& \int_c^d\left[\int_a^bg(x)h(y)~dx\right]dy. \end{eqnarray*}

In the inner integral, $y$ is a constant, so $h(y)$ is a constant and we can write

\begin{eqnarray*} \int_c^d\left[\int_a^bg(x)h(y)~dx\right]dy &= & \int_c^d\left[h(y) \left( \int_{a}^{b}g(x)~dx \right) \right]dy\\ &=& \int_a^b g(x)~dx \int_{c}^{d} h(y)~dy. \end{eqnarray*}

since $\int_a^b g(x)~dx$ is a constant. Hence, if $f$ can be written as the product of two integrals:

\begin{eqnarray*} \iint_R f(x,y)~ dA &=& \int_a^b g(x)~dx \int_{c}^{d} h(y)~dy. \end{eqnarray*}
Evaluate $\iint_R \sin x \cos y~dA$ where $ R = \left[ 0, \dfrac{\pi}{2} \right]\times \left[ 0, \dfrac{\pi}{2} \right].$

\begin{eqnarray*} \iint_R \sin x \cos y~dA &=& \left(\int_{x=0}^{x=\pi/2} \sin x ~dx\right) \left( \int_{y=0}^{y=\pi/2} \cos y~dy \right) \\ &=& \bigg( -\cos x\bigg|_{x=0}^{x=\pi/2} \bigg) \bigg( \sin y \bigg|_{y=0}^{y=\pi/2} \bigg) \\ &=& 1. \end{eqnarray*}




Double Integrals Over General Regions

In this section, we have two main goals: first, to define the double integral of a function $f(x, y)$ over regions $D$ that are more general than rectangles; second, to develop a method for evaluating this type of integral. To achieve this, we will introduce two specific types of subsets in the $xy$-plane and then extend the concept of the double integral to these regions.

To define a double integral over a non-rectangular region $D$, we consider a rectangular $R$ which encloses $D$ and define

\[ F(x,y) = \left\{ \begin{array}{rl} f(x,y) & \text{if }(x,y)\in D\\ 0, &\text{if }(x,y)\in R \text{ but } \notin D \end{array} \right. \]

Then we can define the double integral of $f(x,y)$ over $D$ by \[ \iint_D f(x,y) dA= \iint_R F(x,y)dA \]

  1. Chop $R$ into subrectangles,
  2. Compute $F(x^*,y^*)\Delta A$ for each rectangle contained in $R,$
  3. Add up the contributions from all subrectangles, and
  4. Take a limit as we chop $R$ into smaller and smaller pieces.

Then

\begin{eqnarray*} \iint_D f(x,y) ~dA & = & \iint_R F(x,y)~dA\\ &=& \lim_{\Delta A\to 0} \sum_{\text{subrectangles in }R}F\left(x^*,y^*\right)\Delta A \\ &=& \lim_{\Delta A\to 0} \sum_{\text{subrectangles in }D}f\left(x^*,y^*\right)\Delta A \end{eqnarray*}

However, this does not really tell us how to compute the double integral over $D.$ 😥

So we need to consider an alternative way of calculating the volume below a surface above a rectangle $R,$ which can be easily generalized to compute double integral over a general region. Here we need to introduce two types of plane regions.

A plane region $D$ is of type I if it lies between the graph of two continuous functions of $x.$ That is $$D=\left\{ (x,y) ~|~ a \leq x\leq b, g_1(x) \leq y \leq g_2(x) \right\}.$$

In practice, to evaluate $\iint_D f(x,y)dA$ where $D$ is a region of type I we have \[ \iint_D f(x,y)~dA = \int_a^b \int_{g_1(x)}^{g_2(x)} f(x,y) ~dy~dx \]

Type I regions are bounded by two constant values of $x$ and two functions of $x.$
Another type I region.
Also a type I region.
Find $ \iint_D \left(4x+10y\right)dA$ where $D$ is the region between the parabola $y=x^2$ and the line $y=x+2.$

You can visualize the region and the solid in the following applet:

This is a type I region with $x^2 \leq y \leq x+2.$ We need to find $a$ and $b$ by solving \[ \left\{\begin{array}{ll} y=x^2\\ y=x+2 \end{array}\right. \] for $x$.

Here we have $x^2=x+2$ $\Ra x = -1, x = 2$ $\Ra a = -1, b = 2.$

Then $D= \left\{ (x,y) ~|~ -1\leq x\leq 2, ~x^2\leq y\leq x+2\right\}.$

\begin{eqnarray*} \iint_D \left(4x+10y\right)dA &=& \int_{x=-1}^{x=2} \left[ \int_{y=x^2}^{y=x+2} \left(4x+10y\right)dy \right]dx \\ &=& \int_{x=-1}^{x=2} \left[ \left( 4xy + 10 \frac{y^2}{2}\right)\bigg|_{y=x^2}^{y=x+2} \right] dx \\ &=& \int_{x=-1}^{x=2} \left[ 4x(x+2) + 5 (x+2)^2 -\left( 4x\left(x^2\right) + 5 \left(x^2\right)^2 \right) \right]dx \\ &=& \int_{x=-1}^{x=2} \left( -5 x^4 - 4 x^3 + 9 x^2 + 28 x + 20 \right) dx \\ &=& \left( -x^5 - x^4 + 3 x^3 + 14 x^2 + 20 x\right)\Bigg|_{x=-1}^{x=2} \\ &=& 81. \end{eqnarray*}

A plane region is of type II if it can be expressed by $$D=\left\{ (x,y) ~|~ c \leq y\leq d, h_1(y) \leq x \leq h_2(y) \right\}.$$

In practice, to evaluate $\iint_D f(x,y)dA$ where $D$ is a region of type II we have \[ \iint_D f(x,y)dA = \int_c^d \int_{h_1(y)}^{h_2(y)} f(x,y) ~dx~dy \]

Type II regions are bounded by two constant values of $y$ and two functions of $y.$
Another type II region.
Also a type II region.
Find $ \iint_D xy ~dA$ where $D$ is the region between the line $y=x-1$ and the parabola $y^2=2x+6.$

You can visualize the region and the solid in the following applet:

This is a type II region. We know that $y=x-1$ and $y^2=2x+6.$ So $x=y+1$ and $x=\frac{1}{2}y^2-3.$ Then $\frac{1}{2}y^2-3\leq x\leq y+1.$

We need to find $c$ and $d$ by solving \[ \left\{\begin{array}{ll} x=\frac{1}{2}y^2-3\\ x=y+1 \end{array}\right. \] for $y$. Here we have $\frac{1}{2}y^2-3=y+1$ $\Ra y = -2, y = 4$ $\Ra c = -2, d = 4.$

Then $D= \left\{ (x,y) ~|~ -2\leq y\leq 4, ~\frac{1}{2}y^2-3\leq x\leq y+1\right\}.$

Thus

\begin{eqnarray*} \iint_D xy~dA &=& \int_{y=-2}^{y=4} \left[ \int_{x=\frac{1}{2}y^2-3}^{x=y+1} xy~ dx \right]dy \\ &=& \int_{y=-2}^{y=4} \left[ y~ \frac{x^2}{2} \bigg|_{x=\frac{1}{2}y^2-3}^{x=y+1} \right] dy \\ &=& \int_{y=-2}^{y=4} \left[ y~ \frac{(y+1)^2}{2} - y~ \frac{\left(\frac{1}{2}y^2-3\right)^2}{2} \right]dy \\ &=& \int_{y=-2}^{y=4} \left( -\frac{y^5}{8} + 2 y^3 + y^2 - 4 y \right) dy \\ &=& \left( -\frac{y^6}{48} + \frac{y^4}{2} + \frac{y^3}{3} - 2 y^2 \right)\Bigg|_{y=-2}^{y=4} \\ &=& 36. \end{eqnarray*}

It is often possible to represent a type I region as a union of type II regions, or a type II region as a union of type I regions. Why would we want to do that? In some cases, it may only be possible to integrate a function one way but not the other.

Find the volume under the paraboloid $z=x^2+y^2$ above the region $D,$ where $D$ is bounded by $y=x^2$ and $y=2x.$

You can visualize the region and the solid in the following applet:

We are going to do the problem twice, first by taking $D$ to be a type I region, then by taking $D$ to be a type II.

As a type I region we consider $x^2 \leq y \leq 2x.$ We need to find $a$ and $b$ by solving \[ \left\{\begin{array}{ll} y=x^2\\ y=2x \end{array}\right. \] for $x$. Here we have $x^2=2x$ $\Ra x = 0, x = 2$ $\Ra a = 0, b = 2.$ Then

\[ D= \left\{ (x,y) ~|~ 0\leq x\leq 2, ~x^2\leq y\leq 2x\right\}. \]

Thus

\begin{eqnarray*} \iint_D \left(x^2+y^2\right)dA &=& \int_{x=0}^{x=2} \left[\int_{y=x^2}^{y=2x} \left(x^2+y^2\right)dy \right]dx \\ &=& \int_{x=0}^{x=2} \left[ \left( x^2 y + \frac{y^3}{3} \right)\bigg|_{y=x^2}^{y=2x} \right] dx \\ &=& \int_{x=0}^{x=2} \left[ x^2 (2x) + \frac{(2x)^3}{3} -\left( x^2 \left(x^2\right)+\frac{\left(x^2\right)^3}{3}\right)\right]dx \\ &=& \int_{x=0}^{x=2} \left( -\frac{x^6}{3} - x^4 + \frac{14 x^3}{3} \right) dx \\ &=& \left( \frac{7 x^4}{6} - \frac{x^5}{5} - \frac{x^7}{21} \right)\Bigg|_{x=0}^{x=2}\\ &=& \frac{216}{35}. \end{eqnarray*}

Now we consider the problem as a type II region. We know that $y=2x$ and $y=x^2$. So $x= \frac{y}{2}$ and $x=\sqrt{y}$. Then $\frac{y}{2} \leq x\leq \sqrt{y}$.

We need to find $c$ and $d$ by solving \[ \left\{\begin{array}{ll} x=\sqrt{y}\\ x=\dfrac{y}{2} \end{array}\right. \] for $y$. Here we have $\sqrt{y}=\frac{y}{2}$ $\Ra y = 0, y = 4$ $\Ra c = 0, d = 4.$ Then

\[ D= \left\{ (x,y) ~|~ 0\leq y\leq 4, ~ \frac{y}{2} \leq x\leq \sqrt{y} \right\}. \]

In this case, we should get the same result as before:

\begin{eqnarray*} \iint_D \left(x^2+y^2\right)dA &=& \int_\limits{y=0}^{y=4} \left[\int_{x=\frac{y}{2}}^{x=\sqrt{y}} \left(x^2+y^2\right) dx \right]dy\\ &=& \int_\limits{y=0}^{y=4} \left[ \left( \frac{x^3}{3}+y^2x \right) \bigg|_{x=\frac{y}{2}}^{x=\sqrt{y}} \right] dy \\ &=& \int_\limits{y=0}^{y=4} \left[\frac{\left(\sqrt{y}\right)^3}{3}+y^2\left(\sqrt{y}\right) - \left(\frac{\left(\frac{y}{2}\right)^3}{3}+y^2\left(\frac{y}{2}\right) \right) \right]dy \\ &=& \int_\limits{y=0}^{y=4} \left( y^{5/2} + \frac{y^{3/2}}{3} - 13 \frac{y^3}{24}\right) dy \\ &=& \left(\frac{2 y^{5/2}}{15} + \frac{2 y^{7/2}}{7} - \frac{13 y^4}{96} \right)\Bigg|_{y=0}^{y=4}\\ &=& \frac{216}{35}. \end{eqnarray*}

One thing to observe from the previous example is that when treating the double integral as a type II region, the calculations become slightly more complex. If you encounter this while computing a double integral, a useful strategy is to switch the region from type I to type II or vice versa, depending on your initial setup.

In the following example, we see how it is sometimes necessary to change the order of integration in order to evaluate the integral.

Find $ \int_0^1 \int_x^1 \sin \left(y^2\right)dy~dx$

You can visualize the region and the solid in the following applet:

For $ \int \sin \left(y^2\right)dy,$ there is no anti-derivative in terms of elementary functions. 😥

Then we must change order of integration. That is, as a type II integral. In that case, we can easily compute the integral! 😃

\begin{eqnarray*} \int_\limits{x=0}^{x=1} \left[ \int_{y=x}^{y=1} \sin \left(y^2\right) dy \right]dx &=& \int_\limits{y=0}^{y=1} \left[ \int_{x=0}^{x=y} \sin \left(y^2\right) dx \right]dy \\ &=& \int_\limits{y=0}^{y=1} \bigg[ \sin \left(y^2\right) x \bigg|_{x=0}^{x=y} \bigg]dy \\ &=& \int_\limits{y=0}^{y=1} y\sin \left(y^2\right) dy \\ &=& \left( -\frac{1}{2} \cos \left(y^2\right) \right)\Bigg|_{y=0}^{y=1} \\ &=& \frac{1}{2} \big( 1 - \cos (1) \big). \end{eqnarray*}

Properties of double integrals

For rectangular regions $R$ the first three properties can be easily proved. For general regions the properties follow from Definition 1.

  1. $\displaystyle \iint_R \left(\,f\pm g\right)dA = \iint_Rf~dA \pm \iint_R g~dA$
  2. $\displaystyle \iint_R c~f~dA = c\iint_Rf~dA$
  3. If $f(x,y)\geq g(x,y)$ for all $(x,y)\in R$ then
    $$\displaystyle \iint_R f~dA \geq \iint_Rg~dA$$
  4. If $R= R_1 \cup R_2,$ where $R_1$ and $R_2$ are regions that don't overlap except perhaps on their boundaries, then
    $$\displaystyle \iint_R f~dA = \iint_{R_1}f~dA + \iint_{R_2}f~dA$$



Double Integrals in Polar Coordinates

For annular regions with circular symmetry, rectangular coordinates are difficult. It can be more convenient to use polar coordinates. The following diagram explains the relationship between the polar variables $r,$ $\theta$ and the usual rectangular ones $x, y.$

For polar coordinates, we have \[ x = r\cos \theta, \quad y = r \sin \theta. \]

Consider the volume of a solid beneath a surface $z = f(x,y)$ and above a circular region in the $xy$ plane.

We divide the region into a polar grid as in the following diagram:

A polar grid.

We first approximate the area of each polar rectangle as a regular rectangle. We do this as follows. Choose a point $P$ inside each polar rectangle in the polar grid.

Let $P = (x^*, y^*)$ or in polar coordinates $P = (r^*, \theta^*)$ , where \[ x^* = r^*\cos \theta^*, \;\; y^* = r^* \sin \theta^*. \]

$P = (x^*, y^*)=(r^*, \theta^*).$

The area of the polar rectangle containing $P$ can be approximated as $r^*~\Delta \theta ~\Delta r$.

Therefore the volume under the surface and above each polar rectangle can be approximated as

\[ \text{vol. on box} \approx r^*~ \Delta \theta ~\Delta r ~f\left( r^*\cos \theta^*, r^* \sin \theta^* \right). \]

Here $f\left( r^*\cos \theta^*, r^* \sin \theta^* \right)$ is the value of the function at the point $P$, which is also the height of the box used in the approximation.

To obtain an approximation for the entire volume below the surface, we sum over the entire polar grid:

\begin{eqnarray*} \text{vol.} & \approx & \sum_{(\text{polar grid})} r^*~\Delta \theta ~\Delta r ~f\left( r^*\cos \theta^*, r^* \sin \theta^* \right) \\ \Rightarrow \text{vol.} &=& \displaystyle \lim_{\Delta r, \Delta \theta \to 0} \sum_{(\text{polar grid})} r^*~\Delta \theta ~\Delta r ~f\left( r^*\cos \theta^*, r^* \sin \theta^* \right) \\ &=& \displaystyle \iint_\limits{D} f\left( r \cos \theta , r \sin \theta \right)~r ~dr~d\theta. \end{eqnarray*}

The double integral in rectangular coordinates is then transformed as follows:

\begin{eqnarray}\label{iint-polar} \iint_\limits{R} f(x,y)~dx~dy = \iint_\limits{S} f\left( r \cos \theta , r \sin \theta \right)~r ~dr~d\theta. \end{eqnarray}

The formula in (\ref{iint-polar}) says that we can convert from rectangular to polar coordinates in a double integral by writing $x=r\cos\theta $ and $y= r\sin \theta$ using the appropriate limits of integration for $r$ and $\theta$ and replacing $dA$ by $r ~dr ~d\theta.$ Just be careful! Don't forget to add the factor $r$ on the right side. A classical method for remembering this is shown in Figure 14, where the "infinitesimal" polar rectangle can be thought of as an ordinary rectangle with dimensions $r \,d\theta$ and $dr$ and therefore has "area" $dA= r\, dr \,d\theta.$

Infinitesimal polar region.
Find $\iint_D e^{-\left(x^2 + y^2 \right)}~dx~dy,$ where $D$ is the region bounded by the circle $x^2+y^2=R^2,$ with $R>0.$

You can visualize the region and the solid in the following applet:

🤔 Unfortunately, we cannot evaluate this integral in rectangular coordinates.

We need to use polar coordinates: $x= r\cos\theta,$ $y=r\sin \theta$.

This implies that $x^2+y^2 = r^2$. So

\[ \iint_\limits{D}e^{-\left(x^2 + y^2 \right)}~dx~dy = \iint_\limits{D} e^{-r^2} r ~dr~d\theta. \]

The region $D$ can be described in polar coordinates. That is: $$0\leq r \leq R \;\text{ and } \;0 \leq \theta \leq 2\pi.$$

Then

\[ D = \left\{ \left( r, \theta \right) ~|~ 0\leq r \leq R,0 \leq \theta \leq 2\pi \right\}. \]

This implies that

\begin{eqnarray*} \iint_{D} e^{-r^2} r ~dr~d\theta &=& \int_{\theta=0}^{\theta = 2\pi} \int_{r=0}^{r=R} e^{-r^2} \cdot r ~dr~d\theta \\ &=& \left( \int_{\theta=0}^{\theta = 2\pi} d \theta \right)\left( \int_{r=0}^{r=R} e^{-r^2}r~ d r\right) \\ &=& \pi\left( 1- e^{-R^2}\right). \end{eqnarray*}
Find the volume of the solid that lies under the paraboloid $z=x^2+y^2$ and inside the cylinder $x^2+y^2=2x,$ for $z\geq 0.$

You can visualize the region and the solid in the following applet:

First, we need to find the boundary. If we complete the square in $x^2+y^2=2x,$ we obtain \[ (x-1)^2+y^2=1. \]

This is the cylinder centred at $(1,0)$ with radius $1.$ In this example the domain is defined by the expression \[ x^2+y^2=2x. \]

In this case, it is simpler to use polar coordinates.

Substituting the values $x= r\cos\theta$ and $y=r\sin \theta$ in $$x^2+y^2=2x,$$ we get $r^2\cos ^2\theta +r^2\sin ^2\theta = 2r \cos \theta.$ That is

$$ r^2 = 2r \cos \theta \Rightarrow r = 2 \cos \theta \qquad (r\neq 0).$$

Then

$$ D = \left\{ \left( r, \theta \right) ~|~ 0\leq r \leq 2\cos \theta, -\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \right\}. $$

Thus we we have

\begin{eqnarray*} V &=& \iint_{D} \left(x^2+y^2 \right)dA \\ &=& \int_{\theta=-\frac{\pi}{2}}^{\theta = \frac{\pi}{2}} \int_{r=0}^{r=2\cos \theta} r^3 ~dr~d\theta \\ &=& \int_{\theta=-\frac{\pi}{2}}^{\theta = \frac{\pi}{2}} \left[ \frac{r^4}{4} \bigg|_{r=0}^{r=2\cos \theta} \right] d\theta \\ &=& \int_{\theta=-\frac{\pi}{2}}^{\theta = \frac{\pi}{2}} 4\cos^4 \theta~ d\theta \end{eqnarray*}

Here we are going to need the following trigonometric identity:

\[ \cos^2 B = \frac{1}{2}\big(1+\cos \left(2B\right)\big), \]

which implies

\begin{eqnarray*} 4\cos^4 B &=& \big(1+\cos \left(2B\right)\big)^2 \\ &=& \frac{3}{2}+2\cos \left(2B\right) + \frac{1}{2}\cos \left(4B\right). \end{eqnarray*}

Therefore

\begin{eqnarray*} V &=& \int_{\theta=-\frac{\pi}{2}}^{\theta = \frac{\pi}{2}} 4\cos^4 \theta~ d\theta \\ &=& \int_{\theta=-\frac{\pi}{2}}^{\theta = \frac{\pi}{2}} \left( \frac{3}{2} + 2 \cos \left(2 \theta\right) + \frac{1}{2} \cos \left(4 \theta\right) \right) d\theta \\ &=& \left[\frac{3}{2}\theta +\sin\left(2 \theta\right)+\frac{1}{8}\sin\left(4 \theta\right)\right] \Bigg|_{\theta=-\frac{\pi}{2}}^{\theta=\frac{\pi}{2}} \\ &=& \frac{3\pi}{2} . \end{eqnarray*}



Triple Integrals

Similarly to how we defined single integrals for functions of one variable and double integrals for functions of two variables, we can define triple integrals for functions of three variables. Let's first consider the simplest case where the function $f(x,y,z)$ is defined on a rectangular box.

\[ B = \left\{(x,y,z)~|~ a \leq x \leq b, ~ c\leq y \leq d,~ r\leq z \leq s\right\}. \]

First we divide $B$ into sub-boxes. We do this by dividing the interval $[a,b],$ into $l$ subintervals $\left[x_i, x_{i+1}\right]$ of equal width $\Delta x,$ dividing $[c,d]$ into $m$ subintervals of width $\Delta y,$ and dividing $[r,x]$ into $n$ subintervals of width $\Delta z.$ The planes through the endpoints of these subintervals parallel to the coordinate planes divide the box $B$ into lmn sub-boxes

\[ B_{ijk} = \left[x_i, x_{i+1}\right]\times \left[y_i, y_{i+1}\right] \times \left[z_i, z_{i+1}\right] \]

Each sub-box has volume $\Delta V = \Delta x \Delta y \Delta z.$

Then we form the triple Riemann sum

\[ \sum_{i=0}^{l-1}\sum_{j=0}^{m-1}\sum_{k=0}^{n-1}f\left(x_{ijk}^*, y_{ijk}^*, z_{ijk}^*\right)\Delta V \]

where $\left(x_{ijk}^*, y_{ijk}^*, z_{ijk}^*\right)\in B_{ijk}.$ Similarly to the definition of a double integral, we defined the triple integral as the limit of the triple Riemann sums:

The triple integral of $f(x,y,z)$ over the box $B$ is
\[ \iiint_B f(x,y,z)~dV = \lim_{i,m,n\to \infty} \sum_{i=0}^{l-1}\sum_{j=0}^{m-1}\sum_{k=0}^{n-1}f\left(x_{ijk}^*, y_{ijk}^*, z_{ijk}^*\right)\Delta V \]

if the limit exists.

Just as for double integrals, the practical method for evaluating triple integrals is to express them as iterated integrals as follows.

(Fubini's Theorem for Triple integrals) If $f(x,y,z)$ is continuous on the rectangular box $B= [a,b]\times [c,d]\times[r,s],$ then any iterated integral that exists is equal to the triple integral; that is,
\begin{eqnarray*} \iiint_B f(x,y,z)~dV &=& \int_r^s \int_c^d \int_a^b f(x,y,z) ~dx~dy~dz \\ &=& \int_r^s \int_a^b \int_c^d f(x,y,z) ~dy~dx~dz \\ &=& \int_a^b \int_r^s \int_c^d f(x,y,z) ~dy~dz~dx \\ \end{eqnarray*}

and so on.

The first iterated integral on the right side of Fubini's Theorem means that we integrate first with respect to $x$ (keeping $y$ and $z$ fixed), then we integrate with respect to $y$ (keeping $z$ fixed), and finally we integrate with respect to $z.$ There are six possible orders altogether, all of which give the same value.

Now we define the triple integral over a general bounded region $R$ in the three-dimensional space (a solid) similar to the procedure that we used for double integrals.

A solid region $R$ is said to be of type 1 if it lies between the graphs of two continuous functions of $x$ and $y,$ that is,

\[ R = \left\{(x,y,z)~|~ (x,y)\in D,~ r(x,y)\leq z \leq s(x,y) \right\} \]

where $D$ is the projection of $R$ onto the $xy$-plane. In this case we the upper boundary of the solid $R$ is the surface with equation $z=s(x,y)$ while the lower boundary is the surface $z=r(x,y).$

Thus we have that if $R$ is a type 1 region, then

\begin{eqnarray}\label{type-1} \iiint_R f(x,y,z)~dV = \iint_D\left[\int_{r(x,y)}^{s(x,y)}f(x,y,z)\right]dA \end{eqnarray}

The inner integral on the right side of the previous equation means that if $x$ and $y$ are held fixed, and therefore $r(x,y)$ and $s(x,y)$ are regarded as constants, while $f(x,y,z)$ is integrated with respect to $z.$

In particular, if the projection $D$ of $R$ onto the $xy$-plane is a type I plane region, then

\[ R = \left\{(x,y,z)~|~ a\leq x\leq b,~ p(x)\leq y \leq q(x),~ r(x,y)\leq z \leq s(x,y) \right\} \]

and so

\begin{eqnarray}\label{type-1-type-I} \iiint_R f(x,y,z)~dV = \int_a^b \int_{p(x)}^{q(x)} \int_{r(x,y)}^{s(x,y)} f(x,y,z)~dz ~dy ~dx. \end{eqnarray}

If, on the other hand, $D$ is a type II plane region, then

\[ R = \left\{(x,y,z)~|~ c\leq y\leq d,~ m(y)\leq x \leq n(y),~ r(x,y)\leq z \leq s(x,y) \right\} \]

and in this case we have

\begin{eqnarray}\label{type-1-type-II} \iiint_R f(x,y,z)~dV = \int_c^d \int_{m(y)}^{n(y)} \int_{r(x,y)}^{s(x,y)} f(x,y,z)~dz ~dx ~dy. \end{eqnarray}

Now, a solid region $R$ is of type 2 if it is of the form

\[ R = \left\{(x,y,z)~|~ (y,z)\in D,~ r(y,z)leq z \leq s(y,z) \right\} \]

where, in this case, $D$ is the projection of $R$ onto the $yz$-plane. Then we have

\begin{eqnarray}\label{type-2} \iiint_R f(x,y,z)~dV = \iint_D\left[\int_{r(y,z)}^{s(y,z)}f(x,y,z)\right]dA \end{eqnarray}

Finally, a solid region $R$ is of type 3 if it is of the form

\[ R = \left\{(x,y,z)~|~ (x,z)\in D,~ r(x,z)\leq z \leq s(x,z) \right\} \]

where, in this case, $D$ is the projection of $R$ onto the $xz$-plane. For this type of region we have

\begin{eqnarray}\label{type-3} \iiint_R f(x,y,z)~dV = \iint_D\left[\int_{r(x,z)}^{s(x,z)}f(x,y,z)\right]dA \end{eqnarray}

For each of the equations (\ref{type-1}) and (\ref{type-3}) there may be two possible expressions for the integral depending on whether $D$ is a type I or type II plane region, similar to to Equations (\ref{type-1-type-I}) and (\ref{type-1-type-II}).

Evaluate $\ds\iiint_R z~dV$ over the region $R$ bounded by the surfaces $x=0,$ $y=0,$ $z=0$ and $x+y+z=1.$

You can explore this region in the following applet:

There are different ways to compute the integral. First, let's integrate with respect to $z.$ Then $0\leq z \leq 1-x-y.$ Thus

\[ \iiint_R z~dV = \iint_{D_{xy}} \left[ \int_{z=0}^{z=1-x-y}z~dz\right]dA_{xy} \]

here $D_{xy}$ is the projection of $R$ on the $xy$-plane.

The region $R$ is bounded by $x=0,$ $y=0$ and the intersection of $z=0$ with $z=1-x-y,$ i.e., $0=1-x-y,$ or $x+y=1.$

This region $D_{xy}$ is of both types (I and II). Consider $D_{xy}$ as a type I region. Then

\begin{eqnarray*} \iiint_R z~dV &=& \iint_{D_{xy}} \left[ \int_{z=0}^{z=1-x-y}z~dz\right]dA_{xy}\\ &=& \int _{x=0}^{x=1} \int_{y=0}^{y=1-x} \left[ \int_{z=0}^{z=1-x-y}z~dz \right]dy~dx\\ &=& \int _{x=0}^{x=1} \int_{y=0}^{y=1-x} \left[\frac{z^2}{2}\bigg|_{z=0}^{z=1-x-y} \right]dy~dx\\ &=& \int _{x=0}^{x=1} \int_{y=0}^{y=1-x} \frac{(1-x-y)^2}{2} dy~dx\\ &=& \int _{x=0}^{x=1} \left[ -\frac{1}{6}\left( 1-y-x \right)^3 \bigg|_{y=0}^{y=1-x} \right]dx\\ &=& \int _{x=0}^{x=1} \frac{1}{6}\left(1-x \right)^3dx\\ &=& -\frac{1}{24}\left(1-x\right)^4 \Bigg|_{x=0}^{x=1} \\ &=& \frac{1}{24}. \end{eqnarray*}
Express $I= \ds\int_{0}^{1}\int_{\sqrt{x}}^{1}\int_{0}^{1-y} f(x,y,z)~dz~dy~dx$ in the orders $dz~dx~dy$ and $dy~dz~dx.$

We can write

\begin{eqnarray*} I = \int_{x=0}^{x=1}\int_{y=\sqrt{x}}^{y=1}\left[ \int_{z=0}^{z=1-y} f ~dz \right]dy~dx &=& \iiint_{R} f(x,y,z)~dz~ dy~dx \end{eqnarray*}

where $R= \left\{(x,y,z)~|~ 0\leq x\leq 1,~ \sqrt{x}\leq y \leq 1,~ 0\leq z\leq 1-y \right\}.$ This description will enable us to write projection onto different planes.

First, let's express $I$ in the order $dz~dx~dy.$

\begin{eqnarray*} I = \int_{x=0}^{x=1}\int_{y=\sqrt{x}}^{y=1}\left[ \int_{z=0}^{z=1-y} f ~dz \right]dy~dx &=& \iint_{D}\left[ \int_{z=0}^{z=1-y} f ~dz \right]dy~dx \end{eqnarray*}

Here $D$ is the projection of the region on the plane $xy.$ Then

\begin{eqnarray*} I &=& \iint_{D}\left[ \int_{z=0}^{z=1-y} f ~dz \right] dx~dy \\ &=& \int_{y=0}^{y=1}\int_{x=0}^{x=y^2}\left[ \int_{z=0}^{z=1-y} f ~dz \right]dx~dy \end{eqnarray*}

The original integral was of type I. But when we change the order $dy~dx$ to $dx~dy,$ we have now a type II integral.

Now, let's express $I$ in the order $dy~dz~dx.$

\begin{eqnarray*} I = \int_{x=0}^{x=1}\int_{y=\sqrt{x}}^{y=1}\left[ \int_{z=0}^{z=1-y} f ~dz \right]dy~dx &=&\int_{x=0}^{x=1}\left[ \int_{y=\sqrt{x}}^{y=1} \int_{z=0}^{z=1-y} f ~dz~ dy\right]dx \\ &=& \int_{x=0}^{x=1}\bigg[ \int_{z=0}^{z=1-\sqrt{x}} \int_{y=\sqrt{x}}^{y=1-z} f~\bigg]dx \\ &=& \int_{x=0}^{x=1} \int_{z=0}^{z=1-\sqrt{x}}\left[ \int_{y=\sqrt{x}}^{y=1-z} f~dy \right] dz~dx \\ &=& \iint_D \left[ \int_{y=\sqrt{x}}^{y=1-z} f~dy \right] dA \end{eqnarray*}

Here $D$ is the projection of the region on the plane $xz.$

In any case, we have that

\begin{eqnarray*} I = \int_{x=0}^{x=1}\int_{y=\sqrt{x}}^{y=1}\left[ \int_{z=0}^{z=1-y} f ~dz \right]dy~dx = \int_{x=0}^{x=1} \int_{z=0}^{z=1-\sqrt{x}} \left[ \int_{y=\sqrt{x}}^{y=1-z} f~dy \right] dz~dx \end{eqnarray*}

There are three more possible orders in which we can integrate. Below you can see all the possible combinations with their corresponding projections on the $xy,$ $yz,$ and $xz$ planes.

$ \quad \ra \quad \displaystyle \int_0^1$ $\displaystyle \int_{\sqrt{x}}^{1}$ $\displaystyle \int_{0}^{1-y} $ $f$ $ dz$ $dy$ $dx$ $ \,= $ $\displaystyle \int_0^1 $ $\displaystyle \int_{0}^{y^2} $ $\displaystyle \int_{0}^{1-y}$ $f$ $ dz$ $dx$ $dy$
$\quad \ra \quad \displaystyle \int_0^1$ $\displaystyle \int_{0}^{1-z}$ $\displaystyle \int_{0}^{y^2}$ $f$ $dx$ $dy$ $dz$ $ \,= $ $\displaystyle \int_0^1$ $\displaystyle\int_{0}^{1-y}$ $\displaystyle\int_{0}^{y^2}$ $f$ $ dx$ $dz$ $dy$
$\quad \ra \quad \displaystyle \int_0^1$ $\displaystyle \int_{0}^{1-\sqrt{x}}$ $\displaystyle \int_{\sqrt{x}}^{1-z}$ $f$ $ dy$ $dz$ $dx$ $ \,= $ $\displaystyle \int_0^1 $ $\displaystyle \int_{0}^{(1-z)^2}$ $\displaystyle \int_{\sqrt{x}}^{1-z}$ $f$ $ dy$ $dx$ $dz$

If you want, you can explore all the projections in the following applet:




Triple Integrals in Cylindrical Coordinates

Sometimes it is useful to use cylindrical coordinates in order to simplify the integral. This involves the transformation

\begin{eqnarray}\label{cylindrical-coord} x= r\cos \theta ,\quad y=r\sin \theta, \quad z =z. \end{eqnarray}

We now aim to calculate a small element of volume of a cylindrical shell. This will then show how in a triple integral we can transform from rectangular coordinates to cylindrical coordinates by substituting the transformation (\ref{cylindrical-coord}) and by making the change \[ dx~dy~dz\rightarrow r~dr~d\theta ~dz \]

The important result is that the triple integral in rectangular coordinates transforms as follows:

\begin{eqnarray}\label{cylindrical-integral} \iiint_{R} f(x,y,z) ~dx~dy~dz = \iiint_{C} f\left(r\cos \theta , r \sin \theta, z \right) r~dr~d\theta ~dz. \end{eqnarray}
Find the volume of a cylinder of radius $R$ and height $H.$

Of course, we learned from elementary school that the volume is $\pi~ R^2 H.$ Here we are going use triple integrals to obtain the same result.

Recall that if $f(x,y)\geq 0,$ then the double integral can be interpreted as the volume under the surface $z=f(x,y).$

If $f(x,y,z)\geq 0,$ then the triple integral can be interpreted as the "hypervolume" of a $4D$ object. However, this is very difficult to visualize. 😕 So, let's consider the special case where $f(x,y,z)=1$ for every $(x,y,z)\in E,$ the domain of $f.$ Then the triple integral represents the volume of $E.$ That is \[ \iiint_E ~dV = \text{Volume of } E. \]

Thus, to find the volume of a cylinder of radius $R$ and height $H,$ we can use the cylindrical coordinates (\ref{cylindrical-coord}). So we have that \[ 0\leq r \leq R,\quad 0\leq \theta \leq 2\pi,\quad 0\leq z \leq H. \]

Then

\begin{eqnarray*} V = \iiint_E ~dV &=& \int_{z=0}^{z=H} \int_{r=0}^{r=R} \int_{\theta=0}^{\theta=2\pi} r~d\theta~ dr ~dz \\ &=& \left( \int_{\theta=0}^{\theta=2\pi} ~d\theta \right) \left( \int_{r=0}^{r=R} r~dr\right) \left(\int_{z=0}^{z=H} dz\right) \\ &=& \large 2\pi ~\frac{R^2}{2} H \\ &=& \pi ~R^2 H. \end{eqnarray*}



Triple Integrals in Spherical Coordinates

Sometimes it is useful to use spherical coordinates in order to simplify the integral. This involves the transformation

\begin{eqnarray}\label{spherical-coord} x= r\cos \theta \sin \phi ,\quad y=r\sin \theta \sin \phi , \quad z = r \cos \phi. \qquad \end{eqnarray}

We now aim to calculate a small element of volume of a spherical shell. This will then show how in a triple integral we can transform from rectangular coordinates to spherical coordinates by substituting the transformation (\ref{spherical-coord}) and by making the change \[ dx~dy~dz\rightarrow r^2\sin \phi ~dr~d\theta ~d\phi \]

Consider the following diagram.

The important result is that the triple integral in rectangular coordinates transforms as follows:

\begin{eqnarray}\label{spherical-integral} \iiint_{R} f(x,y,z) ~dx~dy~dz =\iiint_{S} f\left(r\cos \theta \sin \phi, r \sin \theta \sin \phi,r\cos \phi \right) r^2\sin \phi ~dr~d\theta ~d\phi. \end{eqnarray}
Find the volume of a sphere of radius $R.$

Recall that \[ \text{Volume } = \iiint_V ~dV. \] We describe the sphere as:

\[ 0 \leq r \leq R, \; 0\leq \theta \leq 2 \pi, \; 0\leq \phi \leq \pi. \]

Then

\[ V= \{(r,\theta, \phi), ~|~ 0 \leq r \leq R, \; 0\leq \theta \leq 2 \pi, \; 0\leq \phi \leq \pi\}. \]

Hence

\begin{eqnarray*} V = \iiint_V ~dV &=& \int_{\phi=0}^{\phi=\pi} \int_{\theta=0}^{\theta=2\pi} \int_{r=0}^{r=R} r^2\sin \phi ~dr~d\theta~ d\phi \\ &=& \left( \int_{\phi=0}^{\phi=\pi} \sin\phi ~d\phi \right) \left( \int_{\theta=0}^{\theta=2\pi}~d\theta \right)\left( \int_{r=0}^{r=R}r^2~dr\right) \\ &=& \bigg( -\cos\phi \bigg|_{\phi=0}^{\phi=\pi} \bigg) \bigg(\theta\bigg|_{\theta=0}^{\theta=2\pi} \bigg)\left(\frac{r^3}{3}\bigg|_{r=0}^{r=R}\right) \\ &=& 2 ~(2 \pi) \left( \frac{R^3}{3}\right)\\ &=& \frac{4}{3} \pi R^3. \end{eqnarray*}