## Transforming Volume Integrals - Cartesian, Cylindrical Polar and Spherical Polar Coordinates

In cartesian coordinates an element of volume is
$dV=dxdydz$
and the volume of a solid
$\int_V dV =\int_z \int_y \int_x dx dy dz$

We can transform to other coordinate systems to make some integrations easier.
In cylindrical polar coordinates
$x=r cos \theta$

$y=r sin \theta$

$z=z$

The Jacobian matrix is
$dxdydz= \frac{\partial (x, y, z)}{\partial (r, \theta , z)} dr d \theta dz = \left| \begin{array}{ccc} cos \theta & - r sin \theta & 0 \\ sin \theta & r cos \theta & 0 \\ 0 & 0 & 1 \end{array} \right| dr d \theta dz = r dr d \theta dz$

Then
$\int_V dV = \int_z \int_y \int_x dx dy dz= \int_z \int_{\theta} \int_r r dr d \theta dz$

In spherical polar coordinates
$x=r cos \phi sin \theta$

$y=r sin \phi sin \theta$

$z=r cos \theta$

The Jacobian matrix is
\begin{aligned} dxdydz &= \frac{\partial (x, y, z)}{\partial (r, \theta , \phi)} dr d \theta d \phi \\ &= \left| \begin{array}{ccc} cos \phi sin \theta & r cos \phi cos \theta & - rsin \phi sin \theta \\ sin \phi sin \theta & r sin \phi cos \theta & r cos \phi sin \theta \\ cos \theta & -r sin \theta & 0 \end{array} \right| dr d \theta d \phi = r^2 sin \theta dr d \theta d \phi \end{aligned}

Then
$\int_V dV = \int_z \int_y \int_x dx dy dz= \int_{\phi} \int_{\theta} \int_r r^2 sin \theta dr d \theta d \phi$
.