# 3.5: Triple Integrals in Rectangular Coordinates

Just as a single integral has a domain of one-dimension (a line) and a double integral a domain of two-dimension (an area), a triple integral has a domain of three-dimension (a volume). Furthermore, as a single integral produces a value of 2D and a double integral a value of 3D, a triple integral produces a value of higher dimension beyond 3D, namely 4D.

However, because of difficulty in visualizing a four dimensional world, we can simplify and say that a triple integral with a domain of a certain volume, given a function as the density value at a point \((x,y,z)\), produces a value of a mass, which can be written as follows:

\[ \underset{D}{\iiint} \delta (x,y,z) dV \]

\[ \underset{D}{\iiint} \delta (x,y,z) \,dz\, dy\, dx \]

in which the order of \(dx\), \(dy\), and \(dz\) does not matter just like the order of \(dx\) and \(dy\) doesn't matter in double integrals.

### Concepts of Triple Integrals

In understanding triple integrals, the fuction \(f(x,y,z)\) often will be described as a function of density at point \((x,y,z)\) like in the introduction. However to fully understand the concept of triple integrals, it is essential to define triple integral in terms of . Then using the analogy of a density function, we will be learning how to find a volume of a closed, bounded domain in space. Furthermore, we will be learning to find the average value of a function using triple integral and the volume of the domain.

#### Triple Integrals in terms of Summation

When we first learned the concept of integrals, we visualized the integral as an area under the curve. However, as we learned more about the integrals, we realized that the integral is a sum of the values at points within a domain, which we divide into infinitely many parts. Likewise, triple integrals can be explained in terms of summation,

\[ \underset{D}{\iiint} f(x,y,z) dV = \underset{n \to \infty} \sum_{i=1}^{n} f(x_{i}, y_{i}, z_{i}) \Delta V_{i}\]

where

In another words, we divide the domain into little parts until they become like a point, which appromaxiately has a value of \(f(x,y,z)\). Then we sum up all the values to find the value of the integral.

#### Volume in terms of Triple Integral

Let's return to the previous visualization of triple integrals as masses given a function of density. Given an object (which is, domain), if we let the density of the object equals to 1, we can assume that the mass of the object equals the volume of the object, because density is mass divided by volume. So if the density = 1, we can use the triple integrals to find the volume, which is also the mass. So,

\[ \mathrm{Volume} = \underset{D}{\iiint} dV.\]

\[ \mathrm{Sum } = \underset{n \to \infty}{\lim} \sum_{i=1}^{n} f(x_{i}, y_{i}, z_{i}) \Delta V_{i}\]

\[ \mathrm{Sum } = \underset{n \to \infty}{\lim} \sum_{i=1}^{n} \Delta V_{i}\]

\[ \underset{n \to \infty}{\lim} \sum_{i=1}^{n} \Delta V_{i} = \underset{D}{\iiint} dV\]

#### Average Value of a Function

The average value of a list is defined as the sum of all the values in the list divided by the number of the values in the list. Now when finding the average value of a function \(f(x,y,z)\), we must find the overall sum of all the values of the function within a domain divided by the overall size of the function. In other word,

\[\text{Average Value of } f \approx \dfrac{\sum_{i=1}^{n} f(x_{i},y_{i},z_{i})}{n}\]

And before we derive the formula for finding the average value of a function, we must understand that the change in volume, \(dV\), is simply the whole volume within the domain \(D\) divided by some number \(n\).

\[\text{so, } \Delta V = \dfrac{\text{Volume of D}}{n}\]

\[\text{which also means, } n = \dfrac{\text{Volume of D}}{\Delta V}\]

So using this information we can substitute \(n\) with \(\dfrac{\text{Volume of D}}{dV}\).

\[\text{Average Value of } f \approx \dfrac{\sum_{i=1}^{n} f(x_{i},y_{i},z_{i})}{n}\]

\[= \dfrac{\sum_{i=1}^{n} f(x_{i},y_{i},z_{i})}{\dfrac{\text{Volume of D}}{\Delta V}}\]

\[= \dfrac{\sum_{i=1}^{n} f(x_{i},y_{i},z_{i}) \Delta V}{\text{Volume of D.}}\]

therefore the average value of \(f\) is

\[ \approx \dfrac{1}{\text{Volume of D}} \sum_{i=1}^{n} f(x_{i},y_{i},z_{i}) \Delta V. \]

And as \(n\) approaches infinity, meaning dV becomes extremely small, we can find the actual average value of the function.

\[\text{so, Average Value of }f = \dfrac{1}{\text{Volume of D}} \underset{n \to \infty}{\lim} \sum_{i=1}^{n} f(x_{i},y_{i},z_{i}) \Delta V \]

\[\therefore \text{Average Value of } f = \dfrac{1}{\text{Volume of D}} \underset{D}{\iiint} f(x,y,z) dV \]

Now, from the previous sub-section, we learned that the Volume of \(D\) is the triple integral of the domain \(D\) when \(f(x,y,z) = 1\).

\[\text{So, Average Value of }f = \dfrac{\underset{D}{\iiint} f(x,y,z) dV}{\underset{D}{\iiint} dV.} \]

Finding the Bounds in the Order of \(dz\), \(dy\), \(dx\)

Although the order of integration does not matter in finding the answer, we will be finding the limits of integration in the order of dz, dy, dx just to make the explanation easier. Conceptually, finding the limits is as follows:

- To find the z-limits of integration, we must look at the domain in 3D perspective and draw a ray in the positive z-direction through the center of the domain. Then we must find the lower surface and the upper surface that the ray passes through. And these surfaces are typically expressed in the forms of \(z=f(x,y)\).
- To find the y-limits of integration, we need to look at the domain in 2D perspective, or the x-y surface. So imagine that we have slapped the domain onto the xy-plane, or that we are looking at the domain straight down from the positive z-value. And with the domain in 2D perspective, draw a ray in the positive y-direction through the center of the domain. Then identify two curves, one that the ray passed through first and another later, that are usually expressed in the forms of \(y=f(x)\).
- To find the x-limits of integration, we now need to look at the domain in 1D perspective, or the x-axis. Just like in the case of finding y-limits, let us imagine that we are looking at the 2D domain (note that it is not the original 3D domain but the 2D domain that we were looking at to find the y-limits) from the positive y-value, so that the domain looks like the interval in the x-axis. Then find the lower limit and the upper limit just like how we find the limits in the single integrals.

Example \(\PageIndex{1}\): Limits of Integration

Find the mass( in kg) of a ball, which has a radius of 2m and a density, \(\mathbf{ \delta (x,y,z) = 2} \) kg / m^{3}.

**Solution**

Now we must plug in all the information into the triple integral.

\[ \underset{D}{\iiint} \delta (x,y,z) dV = \int_{x_{L}}^{x_{U}} \int_{y_{L}}^{y_{U}} \int_{z_{L}}^{z_{U}} \delta (x,y,z) dz dy dx\]

\[ = \int_{-2}^{2} \int_{-\sqrt{4-x^2}}^{\sqrt{4-x^2}} \int_{-\sqrt{4-x^2-y^2}}^{\sqrt{4-x^2-y^2}} 2 \; dz dy dx \]

However, before we integrate this, we must realize that the density is constant regarless of \(x\), \(y\), or \(z\), and the domain is perfectly symmetric in all \(x\), \(y\), and \(z\) directions. So we can take the integral in the first octant and multiply the result by 8 to obtain the mass. In other words,

\[ \mathrm{Mass } = 8 \int_{0}^{2} \int_{0}^{\sqrt{4-x^2}} \int_{0}^{\sqrt{4-x^2-y^2}} 2 \; dz dy dx. \]

And since this integration is rather tedious, we will leave the answer in the integral form.

Example \(\PageIndex{1}\): Volume and Average Value

Find the average value of \(\mathbf{f(x,y,z) = 8xyz}\) over a domain bounded by \(\mathbf{z=x+y}\), \(\mathbf{z=0}\), \(\mathbf{y=x}\), \(\mathbf{y=0}\), and \(\mathbf{x=1}\).

Graph of the domain.

First of all, we know that,

\[\textrm{Average Value of }f(x,y,z) = \dfrac{\textrm{Integral of }f(x,y,z) \text{ over D}}{\textrm{Volume of D}}\]

So we must find the triple integral of the function \(f(x,y,z)\) and the volume of the domain using the triple integral.

**Part 1: Volume**

Since calculating the volume is much easier, we will first find the volume of the domain bounded by the planes listed above. And the formula for the volume of domain D is as follows:

\[\text{Volume of D} = \underset{D}{\iiint} dz dy dx.\]

In finding the limits of integration, we must notice that the bounds for the domain is rather simple, so we can easily identify the limits:

\[= \int_{0}^{1} \int_{0}^{x} \int_{0}^{x+y} dz dy dx.\]

Now, we can simply do the integration as we have learned from double integration.

\[\begin{align} & = \int_{0}^{1} \int_{0}^{x} \left [ z \right ]_{0}^{x+y} dy dx \\ & = \int_{0}^{1} \int_{0}^{x} x+y dy dx \\ & = \int_{0}^{1} \left [ xy + y^2 \right ]_{0}^{x} dx \\ & = \int_{0}^{1} x^2 + x^2 dx \\ & = \int_{0}^{1} 2x^2 dx \\ & = \left [ \dfrac{2}{3} x^3 \right ]_{0}^{1} \\ & = \dfrac{2}{3} \\ \therefore \textrm{Volume of D} &= \dfrac{2}{3} \end{align}\]

Part 2: Integral of \(f(x,y,z)\) over \(D\)

From what we have learned so far, we know that:

\[ \textrm{Integral of } f(x,y,z) \textrm{over D} = \underset{D}{\iiint} f(x,y,z) dz dy dx. \]

And from the part 1, we have already found the limits of integration. So the equation becomes:

\[ = \int_{0}^{1} \int_{0}^{x} \int_{0}^{x+y} 8 x y z \; dz dy dx.\]

From this, we can simply do the integration.

\[\begin{align} & = \int_{0}^{1} \int_{0}^{x} \left [ 4 x y z^2 \right ]_{0}^{x+y} dy dx \\ & = \int_{0}^{1}\int_{0}^{x} 4 x y (x + y)^2 dy dx \\ & = \int_{0}^{1 }\int_{0}^{x} 4xy(x^2+2xy+y^2) dy dx \\ & = \int_{0}^{1 }\int_{0}^{x} 4x^3y + 8x^2y^2 +4xy^3 dy dx \\ & = \int_{0}^{1} \left [ 2x^5 + \dfrac{8}{3}x^2y^3 + xy^4 \right ]_{0}^{x} dx \\ & = \int_{0}^{1} 2x^5 + \dfrac{8}{3}x^5 + x^5 \; dx \\ & = \int_{0}^{1} \dfrac{17}{3} x^5 dx \\ & = \left [ \dfrac{17}{18} x^6 \right ]_{0}^{1} \\ & = \dfrac{17}{18} \\ \therefore \textrm{Integral of } f(x,y,z) &= \dfrac{17}{18} \end{align}\]

Part 3: Average Value of \(f(x,y,z)\)

After calculating the integral of \(f(x,y,z)\) over the domain and the volume of the domain, calculating the average value of the function is extremely esay. As it is stated above,

\[ \textrm{Average Value of } f(x,y,z) = \dfrac{\textrm{Integral of } f(x,y,z)}{\textrm{Volume of D.}}\]

Then we substitute the values we found in part 1 and part 2:

\[ \textrm{Average Value of } f(x,y,z) = \dfrac{17/18}{2/3} = \dfrac{17}{12}\]

\[\therefore \textrm{Average Value of } f(x,y,z) = \dfrac{17}{12} .\]

Example \(\PageIndex{3}\)

In a country of slimes, there was a slime king whose massive figure was measured to be 3m wide, 3m long, and 4m tall. After years of research, slime scientists found that the density of a slime is as follows:

\[\mathbf{\delta (x,y,z) = \dfrac{1}{z+1}}. \]

However, because the king dislikes complex mathematics involving variables, he ordered the scientists to find the average density of his slime. Using the king's massive figure, calculate the average density of the king.

**Solution**

First of all, the questions is asking for the average value of the density function. So we must find the volume and the integral of the density function over the domain. Calculating the volume of the slime king is simple:

\[\textrm{Volume} = \textrm{Length x Width x Height}\]

\[ = \textrm{3 x 3 x 4} = 36 \textrm{m^3}.\]

Now the equation for calculating an average value of a density function is given as follows:

\[\textrm{Integral of } \delta (x,y,z) \textrm{ over D} = \underset{D}{\iiint} \delta (x,y,z) dz dy dx.\]

And for this specific problem, it becomes:

\[ = \int_{0}^{3} \int_{0}^{3} \int_{0}^{4} \dfrac{1}{z+1} dz dy dx.\]

And from here, it just becomes a simple integration:

\[\begin{align} & = \int_{0}^{3} \int_{0}^{3} \left [ \ln \left | z+1 \right | \right ]_{0}^{4} dy dx \\ & = \int_{0}^{3} \int_{0}^{3} \ln (5) \; dy dx \\ & = \int_{0}^{3} \left [ \ln (5) y \right ]_{0}^{3}dx \\ & = \int_{0}^{3} 3 \ln (5) dx \\ & = \left [ 3 x \ln (5) \right ]_{0}^{3} \\ &= 9 \ln (5) \textrm{kg.} & \end{align}\]

As for the final answer, we must divide the integral by the volume, to get the average density of the King Slime:

\[ = \dfrac{\textrm{Integral of } \delta}{\textrm{Volume}} = \dfrac{9\ln(5)}{36}\]

which is

\[= \dfrac{\ln(5)}{4} \mathrm{kg/m^3}. \]

### Contributors

- Joseph Sanghun Lee (UCD)
Integrated by Justin Marshall.