## Intro

We can take water samples from a polluted lake and analyze it to determine the pollutant content. Now say we want to figure out how much of the pollutant exist in the lake in total, maybe for a court case against the polluters.

It is likely that the content varies across the lake, since currents might distribute the pollutant unevenly. Further, the buoyancy or the particles may lend the pollutant to be more concentrated at the surface or at the bottom of the lake.

In light of this, we must take water samples from multiple different spots in the lake. Putting all of them together, we can estimate a *density function* describing how the pollution level varies over the whole lake.

Then, expressing the lake’s shape mathematically as a region in 3 dimensions, we can compute a *triple integral* of the density function over the lake to get a measure for total amount of the contaminant.

## Concept

Triple integrals are, as you might have guessed, like double integrals with one more . Nothing spooky. And you compute them in the same way, really.

The difference is that there isn't any nice geometric interpretation. The double integral gives the volume under the graph, and the triple integral gives, umm, something four dimensional. Pretty hard to visualise, right?

But you can use triple integrals for all kinds of calculations, even though you can't see stuff in the 4th dimension! For example, they can be used to calculate the earth's mass.

## Math

A typical triple integral looks something like

It is really three integrals and our convention is to begin integration with the innermost integral, that is, integrate with respect to

To show this concretely, lets integrate

Lets continue with the next inner integral, wich is with respect to

Finally, lets do the last integral

## Triple integrals

### Introducing the triple integral

First, we met integrals of functions of one variable:

giving us an area under the curve. Then, in walked the double integral:

spitting out a volume. What would then this fellow:

throw into our faces?

A hypervolume, is the answer. For those of you scratching your head at this term, we'll give one way of bringing the triple integral back to the ground.

Say is a function describing the mass density of an object. The object could be a cake, for example, with some fluffy cream that has low mass density and some chocolate pieces with high density, etcetera.

The density is mass per volume. So, to find the mass for the whole object (cake), we'd have to multiply the density with the volume. But as the density varies, instead of doing the simple multiplication, we look at each little volume and what the density is in that tiny volume.

We multiply these two, getting the mass for the small volume to be

Now, summing all the infinitely small volumes is the same as taking the integral. So

is the mass in the volume .

Note also that, similarly to double integrals, as we take the triple integral

we just get the volume of .

### Calculating triple integrals

Calculating triple integrals, fortunately, follows the same principle as for double integrals. Faced with a triple integral, we may do any of the following: either, start with the inner double integral, and then integrate the result as a single integral.

Or alternatively, start with the innermost integral in one dimension, and thereafter compute the remaining double integral:

Like with the double integrals, we can rearrange the order of , and as we wish (except for the generalized case), and other properties of double integrals also hold.

There are integrals of even higher order as well. They are called multiple integrals, and they are somewhat harder to visualize. But they are calculated in the same manner as the double and triple integral, by iterative integration.

### Example: the mass of a block

Imagine we have a block with varying density.

Using triple integrals, we can calculate the mass of such a block in the following way.

The block has a mass density . The block itself is defined by

and the mass density is defined as

To find the mass, we integrate the density over the entire volume:

These integrals are often a lot of work, but the steps are simple. Thus, performing these integrals can be quite rewarding, since it allows you to solve some more involved problems than lower dimensional integrals.

## Integration with spherical coordinates

Recall that we can use *spherical coordinates* to describe any point in . We have seen them before, but here comes a reminder of how to transform from our usual , and : given some radius , set

Those are the spherical coordinates.

As we make the transformation, transforms to

This can be calculated by means of the Jacobian determinant, but the calculations being somewhat lengthy, we'll spare you the details here as well.

There's not so much more to it, except practicing. So stay tuned for some examples.

### Example 1

Calculate the volume of a sphere where the radius is using spherical coordinates and integration

### Example 2

Next we shall calculate the density constant of Earth using a extremely simplified model. Assume that earth mass density function is

. Find if we know that the mass of earth is and the radius of earth is is the radius. This integral become

Using a variable substitute we can find the integral. We will skip these step in this example

Here is the mass of the sun therefore we can find by the following calculation

## Integration with cylindrical coordinates

Cylindrical coordinates are just polar coordinates with a -axis. We've seen them before, but just to recap:

Transforming between our standard , and to the cylindrical , and , we don't have to do anything with . It stays the same.

Recall double integrals with polar coordinates. There, when changing coordinate system we had accounting for re-scaling happening when we changed coordinates.

Now, we didn't transform anything in the direction. Thus, the in cylindrical coordinates need only to add a little in the of the polar coordinates. This gives us

This formula can also be obtained by computing the Jacobian determinant. It's not difficult, but takes some work so we'll leave it to the interested as homework. Otherwise, the formula is ready to use.

When do we need it? Well, no surprises here: when the domain is a cylinder. It can also be useful for more general cases of a domain symmetrical about an axis.

### Example

Find the total mass of the rod that has a radius one and length , with the density of the material given by the function

Switching to cylindrical coordinates we get

Finally, we can evaluate the integral to: