If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Multivariable calculus

### Course: Multivariable calculus>Unit 4

Lesson 7: Triple integrals

# Triple integrals 2

Using a triple integral to find the mass of a volume of variable density. Created by Sal Khan.

## Want to join the conversation?

• Why is the function of x,y,z considered the density? How does the 3 variable function map density? •  He just chose the density function arbitrarily, it could have been any function, but the point is that depending where in the rectangular prism you are the density is always changing. For example at the origin the density is 0 Kg/m^3 meaning it's essentially massless at that point, but if you were to move to far corner it would be f(3,4,2)=3*4*2 = 24Kg/m^3. Remember these densities only hold for that infinitely small region it is necessary to integrate in all three direction to get the total mass of the block. Sal's density function is pretty unrealistic and you would never encounter a block that has no density at one end and a lot at the other, but the idea was to give a simple starter example.
• I don't understand how we can end up with a mass of 72Kg, when we are given only the outer dimensions. Sal states that the cube is "variable density". We are not given any known density values, much less density values that vary from region to region.
How can we derive a specific density of 72Kg?
What am I missing? • When he says "variable density" what that means is that the density is a function d(x, y, z) that changes depending on your position. What that means, is, basically, at each point the density is different, but it is defined.

For example, if density is d(x,y,z) =xyz, then d(1, 1, 1) = 1, d(1, 1, 2) = 2, d(1, 2, 2) = 4, and so on and so forth.

When you take the triple integral, you are basically summing up all of these different values of densities over the three-dimensional region.

Hope that helped!
• Double integrals and triple integrals are used to calculate the volume. right? What is the difference between them then? • So we can find the mass of any cube or block by figuring out the triple integral of xyz (with the correct integral parameters)? • So we used double integrals when we found the volume under a "surface", and now we're use triple integrals in finding the volume of a "solid"? Can you explain to me how the two relate? • Great question Barisha,

I would also add that the first time you ever learned about integrals it was with one variable. In this case you thought of an integral of a function `f(x)` as the "area" under the curve. As you point out, a double integral can give us the "volume" under a function `f(x,y)`. But let's think about a very special case, when `f(x,y)=1` is the constant function. Then the "volume" under the curve is just the area of the base region, i.e. the area you are integrating over. Similarly, in the one variable case, if you integrate the function `f(x)=1`, the area under the curve will just be the length you are integrating over.

So when you say we can use triple integrals to find the volume of a solid what you are really doing is integrating the function `f(x,y,z)=1` with a triple integral. The computation is still complicated because you have to find the bound of integration correctly. The next thing you will do is probably integrate more interesting functions of three variables. Sometimes we think about these as density functions because it is hard to imagine that fourth dimension where the function takes its values.
• Sal mentions "scalar field", what is this? Thanks
(1 vote) • How would you approach an indefinite triple integral? What happens to the plus c? • In my experience you wouldnt really have such a thing. The closest scenario of this type I can picture is a partial differential equation. However, I will still pose an explanation to satisfy your curiosity. Lets say you integrate a triple integral with respect to x, then y, then z. If you had no limits, after integrating with respect to x you would have to add a C term, but it would not be a constant. It would be a function of y and z. i.e f(x,y,z) + C(y,z). This is because when you differentiate with respect to x you lose any y and z terms. This term would then be integratable when integrating for y and z, but you would not be able to actually integrate it since, without starting conditions you do not know what it is. Also, when you integrate with respect to y and z you would have to add similar terms, D(x,z), and E(x,y) ,which you also cannot integrate. You can group these extra terms all into one function defined by x, y, and z. In the end you would have the function you integrated F(x,y,z) plus some function you lost in the process of partial differentiation, C(x,y,z) which you cannot determine without starting conditions. Your final answer would be something like F(x,y,z) + C(x,y,z).
(1 vote)
• Why is a density function used? Why is it a function of density not volume?
(1 vote) • You only use a density function (for triple integrals) if you want to calculate the mass of a solid, with a specific variable density. The triple integral takes infinitely many infinitely small boxes, and evaluates their densities at various locations, whilst multiplying by the infinitesimal volume dV of the box, then summing up all of these dV*density. In terms of units, you can see that dV (units of m^3 for example), times density (units of kg/m^3 for example) would give an answer in kg, or mass in general (technically dimensionless units is what gets spat out of the triple integral).
• How does one do dimensional analysis on double and triple integrals? There was some hand waving after Sal calculates the integral and he wrote the units down, but he never explained how those units cancel or are created. It was a great video and I completely understand triple integrals now. I just want to make sure that I get the dimensional analysis down, so the units come out correctly.
(1 vote) • The differentials have the same units as their non-infinitesimal counterparts. So for example, if your x-axis is measured in meters, then the differential `dx` will also be in meters; or if your volume is in cubic meters, then your volume differential `dV` will also be in cubic meters.

So when he was calculating the volume he had 3 differentials in meters `dx`, `dy` and `dz`, all multiplying each other, so the result would be in cubic meters.

For the mass, the density function should be in Kg/m³ (mass over volume), so when multiplied by the volume differential `dV` in cubic meters, the result would be in Kg. 