Volume enclosed by two spheres using spherical coordinates

Homework Statement

Use spherical coordinates to find the volume of the solid enclosed between the spheres $$x^2+y^2+z^2=4$$ and $$x^2+y^2+z^2=4z$$

Homework Equations

$$z=\rho cos\phi$$ $$\rho^2=x^2+y^2+z^2$$ $$dxdydz = \rho^2sin\phi d\rho d\phi d\theta$$

The Attempt at a Solution

The first sphere is a sphere of radius 2 centered at the origin, and the second is a sphere of radius 2 centered at (0,0,2). So I tried setting the up the triple integral as $$\int_{0}^{2\pi}\int_{0}^{\pi/2}\int_{4cos\phi}^{2} \rho^2sin\phi d\rho d\phi d\theta$$

Which gives me a negative answer. I'm guessing my bounds for phi or rho are off?

Additionally, the question suggests I use the iterated order $$d\phi d\rho d\theta$$ but I'm unsure how to change the iterated order around like it suggests. Any help would be appreciated, thanks!

BvU
Homework Helper
2019 Award
LCKurtz
Homework Helper
Gold Member
First you need to specify exactly what region you are describing as "between" the spheres. In the cross section below, is the the blue or the green region?

In either case the limits depend on the ##\phi## value where the curves intersect. If it's the blue region you can go from ##\rho_{inner}## to ##\rho_{outer}##. If it is the green region you have to break it into two integrals depending on whether the ##\rho## radius is above or below the intersection point.

Last edited:
You chose mathematician's spherical coordinates ! ()

Can you explain the ##4\cos\phi## to me ?
##x^2+y^2+z^2=4z##, so ##\rho^2=4\rho cos\phi##

First you need to specify exactly what region you are describing as "between" the spheres. In the cross section below, is the the blue or the green region?

View attachment 100575

In either case the limits depend on the ##\phi## value where the curves intersect. If its the blue region you can go from ##\rho_{inner}## to ##\rho_{outer}##. If it is the green region you have to break it into two integrals depending on whether the ##\rho## radius is above or below the intersection point.

I've typed exactly what the question asked so the question itself doesn't exactly specify, but I assumed it was the green section. The answer is ##10\pi/3## if that's any help.

LCKurtz
Homework Helper
Gold Member
Well, the answer of ##\frac{10\pi} 3## is consistent with the green region. To help you understand the problem, put your pencil on the origin in the picture. That is where ##\rho = 0##. Now move your pencil in the radial (##\rho##) direction across the green area. Which circle does it hit? Do you see that which circle it hits depends on whether you headed above or below the ##\rho## line I drew? That's why you need two integrals. In each ##\rho## goes from ##0## to the circle it hits. The limits on ##\phi## depend on whether you are above or below the angle I show in the diagram. So set those two integrals up and show us what you get.

BvU
Homework Helper
2019 Award
##
\rho^2=4\rho cos\phi##
well, if ##\phi = 0## then ## \rho = 4## seems a strange lower bound to me...

well, if ##\phi = 0## then ## \rho = 4## seems a strange lower bound to me...

Yeah I know something's off with my bounds but I'm not sure how to get the correct bounds in this case; or how to switch around the iterated order like the question suggests.

Well, the answer of ##\frac{10\pi} 3## is consistent with the green region. To help you understand the problem, put your pencil on the origin in the picture. That is where ##\rho = 0##. Now move your pencil in the radial (##\rho##) direction across the green area. Which circle does it hit? Do you see that which circle it hits depends on whether you headed above or below the ##\rho## line I drew? That's why you need two integrals. In each ##\rho## goes from ##0## to the circle it hits. The limits on ##\phi## depend on whether you are above or below the angle I show in the diagram. So set those two integrals up and show us what you get.

Ah ok I think I understand now, I found the angle of intersection by setting ##4cos\phi=2##, giving ##\phi=\pi/3## , so the integral becomes ##\int_{0}^{2\pi}\int_{0}^{\pi/3}\int_{0}^{2} \rho^2sin\phi d\rho d\phi\ d\theta + \int_{0}^{2\pi} \int_{\pi/3}^{\pi/2} \int_{0}^{4cos\phi} \rho^2sin\phi d\rho d\phi d\theta ##, and evaluating this gives ##10\pi/3##. One last question though, the question suggested that I change the iterated order to ##d\phi d\rho d\theta##, how would I do this and how would this simplify the problem?

LCKurtz
Homework Helper
Gold Member
Ah ok I think I understand now, I found the angle of intersecion by setting ##4cos\phi=2##, giving ##\phi=\pi/3## , so the integral becomes ##\int_0^{2\pi}\int_0^{\pi/3}\int_0^2 \rho^2sin\phi d\rho d\phi\ d\theta + \int_0^{2\pi}\int_{\pi/3}^{\pi/2}\int_0^{4\cos\phi} \rho^2sin\phi d\rho d\phi d\theta ##, and evaluating this gives ##\pi/3##. One last question though, the question suggested that I change the iterated order to ##d\phi d\rho d\theta##, how would I do this and how would this simplify the problem?
I fixed your misplaced braces. You should get the correct answer now.

There is no point in switching the order of integration. And putting the ##\phi## before the ##\rho## integration is a bad idea because as it is, it's easy to solve for ##\rho## in terms of ##\phi##. To reverse the order you will get an inverse cosine in there. Not simpler.

I fixed your misplaced braces. You should get the correct answer now.

There is no point in switching the order of integration. And putting the ##\phi## before the ##\rho## integration is a bad idea because as it is, it's easy to solve for ##\rho## in terms of ##\phi##. To reverse the order you will get an inverse cosine in there. Not simpler.

Oh ok, strange that the question suggested for me to do so then. Either way, thanks for all the help.