# Volume of sphere with a out of origin spherical hole inside

I'm trying to find the volume of a sphere of radius $$R$$ with a spherical hole of radius $$s$$ centered out of the origin calculating the integrals to understand what happens to the limits of integration and i'm kinda confused with this part.

So let's say the hole is centered at distance $$z=H$$ from the origin.

The equation of the hole would be

$$x^2+y^2+(z-H)^2=s^2$$ or in spherical coordinates

$$r(\theta )=Hcos(\theta) \pm \sqrt{s^{2}-H^{2}+H^{2}cos^{2}(\theta)}$$

I'm guessing the limits of integration for r should depend on $$r(\theta)$$ in the region where the hole is present but i cant tell exactly how specially the same goes for the polar angle $$\theta$$. For the azimuthal $$\\phi$$ i think the limits are as usual $$0 \le \phi \le 2\phi$$.

Hope anyone can offer me some help.

• If it is a spherical hole, then it is just the volume of one sphere minus the volume of the sphere that has been cut out (note that this is different from a cylindrical hole). – Clayton Apr 28 at 0:56
• As long as the inner sphere that is cut out is entirely inside the larger sphere, then for the volume computation it doesn't matter where the inner sphere is placed. – Dave Apr 28 at 0:57
• Maybe OP's integrating over the sphere – Saketh Malyala Apr 28 at 0:58
• Yhea but i'm trying to find out through integration to understand what happens with the limits of integration. – user5983411 Apr 28 at 1:00

The volume of the solid is $$(4/3) \pi (R^3-S^3)$$ regardless the position of the smaller sphere as long as the small sphere is contained in the larger one .

If you insist on finding the answer with integrals it is better to use the formula for the volume of solids of revolution instead of double or triple integrals.

• Yhea, i was trying to solve this problem to understand the limits of integration to obtain the density of a sphere with a hole inside and i'm guessing if i can use the same approach of revolution solids in that case. – user5983411 Apr 28 at 1:45
• If the density is uniform, then you can find the mass and the center of mass of the solid using the solid of revolution approach. – Mohammad Riazi-Kermani Apr 28 at 2:07