Triple Integrals in Spherical Coordinates

In many applications, triple integrals are evaluated over all or part of a sphere.  Correspondingly, it is often desirable to transform such triple integrals into spherical coordinates.  The key to doing so is in transforming the volume differential dV  into spherical coordinates as well.

To begin with, the transformation to spherical coordinates is a 3-dimensional coordinate transformation of the form

T(rho,phi,theta) = `<,>`(rho*sin(phi)*cos(theta),rho*sin(phi)*sin(theta),rho*cos(phi))

Thus, as was the case with the two-dimensional transformations and the area differential, the volume differential is determined by the determinant of the Jacobian of the transformation.

dV = det(J(rho,phi,theta))*d*rho*d*phi*d*theta

Let's use Maple to calculate the Jacobian determinant.  First, we define the transformation:

>    T:=<rho*sin(phi)*cos(theta),rho*sin(phi)*sin(theta),rho*cos(phi)>;

>   

Now let's use the Jacobian command from the VectorCalculus  package to calculate the Jacobian determinant.  The Jacobian  command returns both the Jacobian matrix and the Jacobian determinant, so we assign 2 labels--J and Det_J--to the output from Jacobian .   We then simplify the determinant output.

>    (J,Det_J):=Jacobian(T, [rho,phi,theta], 'determinant' );
Det_J:=simplify(Det_J);

>   

The result is that the volume differential in spherical coordinates is given by

dV = rho^2*sin(phi)*d*rho*d*phi*d*theta

Let's look at an example.

Example:

What is the volume of a sphere of radius R ?

Solution:   To begin with, let's notice that in Cartesian Coordinates, the triple integral for the volume is quite involved:

>    Volume_of_Sphere_with_radius_R:=Int(Int(Int(1,z=-sqrt(R^2-x^2-y^2)..sqrt(R^2-x^2-y^2)),y=-sqrt(R^2-x^2)..sqrt(R^2-x^2)),x=-R..R);

>   

However, in spherical coordinates, the triple integral is much less complicated.

>    Volume_of_Sphere_with_radius_R:=Int(Int(Int(rho^2*sin(phi),rho=0..R),phi=0..Pi),theta=0..2*Pi);
Volume_of_Sphere_with_radius_R:=value(%);

>