On the last slide, we learned how to work with 2dimensional
laminas. Of course, the world isn't 2 dimensional! In the
3dimensional world, density is mass per unit volume. Liquid
water has a density of 1 gram per cubic centimeter, while
osmium, the densest metal, has a density of 22.6 g/cc. Air at sea
level has a density of $1.2 \times 10^{3}$ g/cc, or roughly 1/800
that of water, while air on top of Mt. Everest is only a third as
dense as air at sea level. To get a mass per unit area, you
have to integrate the mass per unit volume over the third
variable. For instance, the atmospheric pressure (force per unit area)
that you feel at ground level is the weight of all the air above you.
The mass of a little box of volume $dV$ at position $(x,y,z)$ is
approximately $\rho(x,y,z) dV$, so the total mass of a solid object
$S$ is
$$M \ = \ \iiint_S \rho(x,y,z) dV.$$

This is usually computed in rectangular coordinates, with $dV = dx\,
dy\, dz$, but sometimes it's easier to use cylindrical coordinates,
with $dV = r \,dr \,d\theta\, dz$, or spherical coordinates.
Center of mass works almost the same as in 2 dimensions:
The location
of the centerofmass is as $(\bar x, \bar y , \bar z)$, where
\begin{eqnarray*} \bar x & = & \frac{1}{M} \iiint_S x \,\rho(x,y,z) \, dV, \\
\bar y & = & \frac{1}{M} \iiint_S y \,\rho(x,y,z) \, dV, \\
\bar z & = & \frac{1}{M} \iiint_S z \,\rho(x,y,z) \, dV.
\end{eqnarray*}

You have to be careful with moment of inertia, since that depends
on which axis you are rotating around. For rotations around the $z$
axis, the moment of inertia is
$$I_3 = \iiint_S (x^2+y^2) \rho(x,y,z)
dV,$$ since the distance from $(x,y,z)$ to the $z$ axis is
$r=\sqrt{x^2+y^2}$. However, if you are rotating around the $x$ axis,
then the moment of inertia is $I_1=\iiint_S (y^2+z^2) \rho(x,y,z) dV$,
and if you are rotating around the $y$ axis, then the moment of
inertia is $I_2=\iiint_S (x^2+z^2) \rho(x,y,z) dV.$
Rotating around diagonal axes is even more complicated. To deal
with such cases, physicists define a moment of
inertia tensor. This is a $3 \times 3$ matrix whose $ij$ entry
is $\iiint_S x_i x_j \rho(x,y,z) dV$, where $x_1$ means $x$, $x_2$
means $y$, and $x_3$ means $z$. The moment of inertia around any axis
can be computed from this matrix.
