# Volume of the part of the sphere that stays outside a cuboid.

Graphics3D[{Sphere[{0, 0, 0}, 1], Cuboid[{-(Sqrt[2]/2), -(Sqrt[2]/2), -(Sqrt[2]/2)}, {Sqrt[2]/2, Sqrt[2]/2, Sqrt[2]/2}]}, Boxed -> False]

How to calculate the volume of one of these sphere cuts? (what remains outside the cuboid)

-

## 1 Answer

Basically you just have to plug the values in the formula:

$$V=\frac{\pi h^2(3R-h)}3$$

In your case $R=1$ and $h=1-\frac{\sqrt{2}}2$.

Let me add one of the possible derivations of this formula. (I am aware this is not what the question is asking, but it might be interesting anyway.)

As I am not a native English speaker and I was never taught geometry in English, it is possible that in some places my terminology might be unusual. I'll be grateful, if more knowledgeable users correct me.

Volume of spherical cap using Cavalieri's principle:

We want to compare the volume of hemisphere (of radius $R$) and part of the cylinder outside the cone (both cylinder and cone have height and radius of the base equal to $R$).

See the following picture or a nicer picture at wikipedia from the article on Cavalieri's principle.

Note that area of the cut in the height $y$ is in both cases the same:

For the sphere, we get in the height $y$ a circle of radius $\sqrt{R^2-y^2}$, hence the area equals $\pi(R^2-y^2)$.

In the other body (difference of cylinder and cone) the cut at the height $y$ is the area between two circles with radii $R$ and $y$, hence the area is $\pi(R^2-y^2)$, which is the same as for sphere. (See the following picture.)

Hence: volume of the hemisphere = volume of the cylinder - volume of the cone: $$V_{1/2\text{sphere}}=V_{\text{cyl}}-V_{\text{cone}}$$

$$V=\pi R^3 - \frac 13 \pi R^3 = \frac23 \pi R^3$$

Volume of the spherical cap is the volume of the cyliner minus volume of the truncated cone.

The cylinder has base with diameter $R$ and height $h$: $$V_1=\pi R^2h.$$

The radii of lower and upper base of the truncated cone are $R$ and $R-h$, thus the volume is the difference between the volume of the whole cone and the truncated part: $$V_2 = \frac 13 \pi R^3 -\frac 13 \pi (R-h)^3.$$

$$V=V_1-V_2 = \pi R^2h - \left(\frac 13 \pi R^3 -\frac 13 \pi (R-h)^3\right) =$$ $$\pi R^2h - \frac{3\pi R^2h-3\pi Rh^2+\pi h^3}3 =$$ $$\frac{\pi h^2(3R-h)}3$$

Volume of sphere is derived using Cavalieri's principle in this answer, too.

-