Find volume of unreachable space by a ball in cube Given a cube box of side length 5, with a sphere of radius 1 inside it.
If the ball can roll freely in the cube, find the volume of unreachable space of the ball in the cube. For example, the ball can't reach the corners fully.Consider no gravity.

I have thought of the following spaces the ball can't reach:

*

*The four eight corners of the cube


*The eight twelve sides of the cube
But how do I calculate them?

The problem provider gave an 1-line solution:
$$8(1^3 -\frac{1}{8}\times\frac{4}{3}\pi\times1^3) +12[(1^3-\frac{1}{4}\pi\times1^2)\times3]$$
If you know what it means, please explain it below, thanks.

Note: I am looking for solutions not involving integrals.
 A: A cube actually has eight corners, not four.
It has twelve edges, not eight.
The center of the sphere can only travel within a $3\times3\times3$ cube in the center of the $5\times5\times5$ cube. Whenever the center of the sphere reaches the surface of the $3\times3\times3$ cube, some part of the sphere touches the surface of the $5\times5\times5$ cube in such a way to prevent the center from moving out of the $3\times3\times3$ cube.
If you divide the $5\times5\times5$ cube into $1\times1\times1$ little cubes, there are eight little cubes, one in each corner, in each of which the sphere can only reach the parts it occupies when it is at one corner of the little cube
(which is also one corner of the $3\times3\times3$ cube).
At this point, just one eighth of the sphere is in the little cube;
the other $\frac78$ of the sphere is in the other seven little cubes around the center of the sphere.
Since the volume of the sphere is $\frac43 \pi r^3 = \frac43 \pi \times 1^3,$ one-eighth of the volume is $\frac18 \times \frac43 \pi \times 1^3.$
But this is the part of the little cube that is reachable by the sphere;
the part that is unreachable has volume equal to the little cube's volume minus the part occupied by the sphere. This is
$ 1 - \frac18 \times \frac43 \pi \times 1^3. $
There are eight little cubes in corners of the large cube that have this much unoccupied space, so their total unoccupied space is
$$ 8 \left(1 - \frac18 \times \frac43 \pi \times 1^3\right) . \tag1$$
Along each edge of the $5\times5\times5$ cube there are three other little cubes (not including the ones in the corner of the large cube, which we've already counted).
In each of these three little cubes, the sphere is able to reach all the points it can by sliding its center along one edge of the little cube (which is also part of an edge of the $3\times3\times3$ cube). If you do that, the sphere sweeps through a volume inside the cube that is one quarter of a cylinder of radius $1$ and height $1.$
The volume of a cylinder of radius $1$ and height $1$ is
$\pi r^2 h = \pi \times 1^2 \times 1.$
One quarter of the cylinder is
$\frac14 \pi \times 1^2 \times 1.$
The unreachable volume of the little cube is the volume of the little cube, $1^3,$ minus the volume that can be reached by the sphere, so the unreachable volume is
$1^3 - \frac14 \pi \times 1^2 \times 1.$
There are three little cubes along one edge of the large cube, so in these three little cubes the total unreachable volume is
$\left[1^3 - \frac14\pi \times 1^2 \times 1\right] \times 3.$
And this is repeated along each of the twelve edges of the large cube, so the total unreachable area in all those little cubes is
$$ 12\left(\left[1^3 - \frac14\pi \times 1^2 \times 1\right] \times 3\right). \tag2$$
There are no other unreachable parts of any little cubes, so to sum up all the unreachable volume we simply add the parts found on line $(1)$ and on line $(2)$.
In the one-line solution you found, for some reason $\pi \times 1^2 \times 1$ is simplified to $\pi \times 1^2$ but $1^3$ is not simplified to $1$ and other multiplications by $1$ are not simplified. But the underlying structure of the sum is clear enough.
A: $$8(1^3 -\frac{1}{8}\times\frac{4}{3}\pi\times1^3) +12[(1^3-\frac{1}{4}\pi\times1^2)\times3]$$
The first term is for the 8 (not 4) corner spaces. Each consists of a 1x1x1 cube with one octant of the sphere taken away.
The second term is for the 12 (not 8) edges. Each is 3 units long between the corner spaces. Each unit along the edge is 1x1x1 block with a quarter circular cylinder taken away that the sphere can sweep through.
