Sorry to everyone who saw the earlier problem. I had all the measurements messed up.

Problem: You have a sphere centered around (0,0,0) with a radius of 1.5 cm and a cube centered around (0,0,0) with a length, width, and height of 2. How much empty space is there within the sphere?

My Approach: Volume of empty space = Volume of sphere - Volume of cube = 4.5*pi - 8 cm^3

I tried this and then realized that the cube is not fully within the sphere meaning that some parts of the cube lie outside of the sphere.

How would I go about finding the empty space within the sphere?


The sphere touches the edges (because the distance to edge is $\sqrt{1 + 1} = \sqrt{2} < 3/2$, but do not contain vertices (because the distance to vertices is $\sqrt{3} > 3/2$. So the picture is like this enter image description here

So we have eight corners of cube outside the sphere, but it seems hard (at least for me) to compute their volume directly. Let's instead use Caratheodory method.

Take a section of the picture by the plane $x = t$, where $t$ is a parameter varying from $-1.5$ to $1.5$. In this section you will have

  • A circle of radius $\sqrt{1.5^2 - t^2}$
  • A square of size $2\times 2$ if $|t| \le 1$ and nothing if $|t| > 1$.

So for $|t| > 1$ an empty area is $\pi(1.5^2 - t^2)$. For $|t| \le 1$ the value of empty area depends on the configuration of a circle and a square:

  • If the circle is inside the square, then the empty area is $0$. This happens when $\sqrt{1.5^2 - t^2} \le 1$, i.e $|t| \ge \frac{\sqrt{5}}{2}$. But we are considering case when $|t|\le 1$, so this never happens.
  • If the cirle touches edges of the square, but do not contain its vertices, then the empty area consists of four circular segments, each of size $r^2\arccos(1/r) - \sqrt{r^2 - 1}$, where $r = \sqrt{1.5^2 - t^2}$ is the radius of the circle . This happens when $1 \le \sqrt{1.5^2 - t^2} \le \sqrt{2}$, i.e $1/2 \le |t|\le 1$.
  • If the circle contains the square, then the empty area is $\pi(1.5^2 - t^2) - 4$. This happens when $\sqrt{1.5^2 - t^2} \ge \sqrt{2}$, i.e $|t| \le 1/2$.

Thus the total volume of empty space is equal to \begin{align*} &2\int_0^{1/2} (\pi(1.5^2 - t^2) - 4 )dt \\ &+ 2\int\limits_{1/2}^1 \left( 4(1.5^2 - t^2) \arccos(1/\sqrt{1.5^2 - t^2}) - 4\sqrt{5/4 - t^2}\right)dt \\ &+ 2\int_1^{1.5} \pi(1.5^2 - t^2) dt\end{align*}

The first and the third integrals are very simple. The fisrt equals $13\pi/6 - 4$, the third equals $2\pi/3$. The problem is with the second integral. Wolfram gives some explicit (but very huge) antiderivative. The value of the second integral turns out to be \begin{align*}\frac{1}{6}(33\pi &+ 170\operatorname{arccot}(2) - 30\arcsin(3/5) +\\ 81\arctan(7/24) &- 127 \arctan(2) -27 \arctan(11/2))\end{align*} :)

Numerically the answer to the problem (probably, if there is no mistake) is $6.23645$. This is at least reasonable, because it is smaller than the volume of the sphere, which is $4\pi \cdot 1.5^3/3 \approx 14.1372$

  • $\begingroup$ Thank you so much! $\endgroup$ – Shubham Kumar Jul 24 '18 at 20:50
  • $\begingroup$ @ShubhamKumar Actually I think I wrong because these caps do intersect :) I'll try to fix this. $\endgroup$ – Sasha Kozachinskiy Jul 24 '18 at 20:55
  • $\begingroup$ As I mentioned in a comment to the other answer, using Monte Carlo integration over 17.71 billion samples ($17.71\cdot10^9$ samples), the volume is $\approx 6.2364$, which agrees with and supports your answer. $\endgroup$ – Nominal Animal Jul 25 '18 at 1:08
  • $\begingroup$ Yeah and it makes sense since before we thought it was 2*pi , and since there is overlap it makes sense that the actual answer would be a little less than 2 * pi $\endgroup$ – Shubham Kumar Jul 25 '18 at 13:07

As noted by NominalAnimal with the following figure, we need to consider 8 protruding peaks of the cube

enter image description here

By polar coordinates the volume of each protruding peak is

enter image description here

$$V_{peak}=\int_{\frac{1}2}^{1}A(z)dz =$$

$$=\int_{\frac{1}2}^{1} \left[(1-\sqrt{1.5^2-z^2-1})-\frac12(1.5^2-z^2)\left(\frac{\pi}2-2\arctan\sqrt{1.5^2-z^2-1}\right)\right]dz$$

$$\approx 0.063651$$

and therefore the volume is

$$V = V_{sphere} - (V_{cube}-8 V_{peak})\approx 6.646375$$

  • $\begingroup$ Thank you so much! $\endgroup$ – Shubham Kumar Jul 24 '18 at 20:50
  • $\begingroup$ @ShubhamKumar You are welcome! Bye $\endgroup$ – gimusi Jul 24 '18 at 20:57
  • $\begingroup$ @ShubhamKumar Indeed, that's easy now :) $\endgroup$ – gimusi Jul 24 '18 at 21:03
  • $\begingroup$ @gimusi: the picture is misleading (which means the answer is also incorrect, because the spherical caps overlap). If we look along one axis, $\sqrt{1+1}\approx 1.414 \lt 1.5$; i.e., the square is completely within the circle. Using numerical Monte Carlo integration with 17.71 billion samples, the volume is $\approx 6.2364$. $\endgroup$ – Nominal Animal Jul 24 '18 at 21:23
  • $\begingroup$ @NominalAnimal Thanks! I check again. $\endgroup$ – gimusi Jul 24 '18 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.