## 13-03-2012 Stacked Domes

Recently, when administering a bath for my one-year-old daughter, I came across an interesting question that turns out to be a somewhat tricky one to answer.

The question arises when playing with a particular bath toy. This toy (shown on the right) is a set of ridged semi-spherical domes (or rather, hemispheres), that nest within each other. The nearest ones in size can be snapped together to form a ball of sorts (one side slightly smaller than the other). Also, they can be stacked on top of each other, with smaller ones snapping on to the outside of larger ones to form a roughly conical shape.

Another feature of this toy is that each of the domes has a hole in the top with a diameter of approximately one inch. When a smaller dome is placed on top of a larger one, an open chamber is formed between them. If air then passes through them rapidly (as happens when they're dropped open-side-down into the water), the passing air creates a whistling sound. This whistling sound changes pitch depending on which combination of domes are snapped together, presumably due to the volume of the air trapped between them - the larger chamber allows a lower pitch.

It's this interaction of the pieces that brings to mind the question that we'll explore here. What combination of these domes will give us the lowest possible pitch? Or rather, if we have a hemisphere resting with its flat side down, and place a smaller hollow hemisphere on top of it, trapping space between them, what radius in the smaller hemisphere will allow the greatest possible volume contained between the two shapes?

We know that the top hemisphere can't have a radius of zero, or the volume contained would be zero as well. Also, it can't be exactly that of the larger hemisphere, or they would stack neatly together, again giving us a contained volume of zero. Between those two extremes lies the number we're looking for.

To solve this, we'll need to take the volume contained by the smaller hemisphere at any given radius, and subtract the amount that overlaps with the larger one. We can then take the derivative of that equation and solve it for zero, which should give us the point at which the volume is greatest.

For the sake of this problem, we'll say that the larger hemisphere (which we'll call h1) has a radius of 1. The smaller hemisphere (we'll call that one h2), is the one whose radius we're calculating, so we'll refer to that as r. The volume of a hemisphere is of course half that of a sphere, giving us v =

^{2}/

_{3}πr

^{3}. The more challenging part is to find the volume of the segment of h2 that overlaps with h1 (referred to as a "spherical cap").

The usual equation for the volume of a spherical cap is
πh(3a^{2} + h^{2}) / 6
where h is the height of the cap, and a is the radius of its base.
That base radius will in fact be the radius of our smaller hemisphere, r,
so we can rewrite that to say:
πh(3r^{2} + h^{2}) / 6

and subtract it from our hemisphere volume for h2:

v = ^{2}/_{3}πr^{3} - πh(3r^{2} + h^{2}) / 6

giving us a basic equation for the volume of our contained space.

The next thing we need to do is eliminate the variable h, which is the height of the cap that lies
within h2. We can actually work that out pretty easily, as shown in the
diagram on the right.
We know that h1 has a radius of 1, and that h2 has a radius we call r. That gives us two sides
of a right triangle, the long side being the radius of h2 and the hypotenuse the radius of h1.
We can use those with the Pythagorean theorem to calculate the third edge of that triangle, which represents
the distance between the bottom center points of h1 and h2.
That distance is (1 - r^{2})^{½}.
We know that the remainder of h1's radius lies within h2, and that h1 has a radius
of one, so we can say that the height of the cap we're looking for is 1 - (1 - r^{2})^{½}.

Now we can modify our volume equation, replacing h with its relationship to r:

∵ v = ^{2}/_{3}πr^{3} - πh(3r^{2} + h^{2}) / 6

∵ h = 1 - (1 - r^{2})^{½}

∴ v = ^{2}/_{3}πr^{3} - π(1 - [1 - r^{2}]^{½})(3r^{2} + [1 - (1 - r^{2})^{½}]^{2}) / 6

∴ v = ^{2}/_{3}πr^{3} - π(1 - [1 - r^{2}]^{½})(3r^{2} + 1 - 2[1 - r^{2}]^{½} + 1 - r^{2}) / 6

∴ v = ^{2}/_{3}πr^{3} - ^{π}/_{6}(1 - [1 - r^{2}]^{½})(2r^{2} + 2 - 2[1 - r^{2}]^{½})

∴ v = ^{2}/_{3}πr^{3} - ^{π}/_{3}(1 - [1 - r^{2}]^{½})(r^{2} + 1 - [1 - r^{2}]^{½})

∴ v = ^{2}/_{3}πr^{3} - ^{π}/_{3}(r^{2} + 1 - [1 - r^{2}]^{½} - r^{2}[1 - r^{2}]^{½} - [1 - r^{2}]^{½} + 1 - r^{2})

∴ v = ^{2}/_{3}πr^{3} - ^{π}/_{3}(2 - 2[1 - r^{2}]^{½} - r^{2}[1 - r^{2}]^{½})

∴ v = ^{2}/_{3}πr^{3} - ^{2π}/_{3} + ^{2π}/_{3}(1 - r^{2})^{½} + ^{π}/_{3}r^{2}(1 - r^{2})^{½}

Next we'll take its derivative:

∴ ^{dv}/_{dr} = 2πr^{2} + ^{π}/_{3}(1 - r^{2})^{-½}(-2r) + ^{2π}/_{3}r(1 - r^{2})^{½} + ^{π}/_{3}r^{2} ⋅ ½(1 - r^{2})^{-½} ⋅ (-2r)

∴ ^{dv}/_{dr} = 2πr^{2} - 2πr / 3(1 - r^{2})^{½} + 2πr(1 - r^{2})^{½} / 3 - 2πr^{3} / 6(1 - r^{2})^{½}

and let ^{dv}/_{dr} equal zero, solving for r:

0 = 2πr^{2} - 2πr / 3(1 - r^{2})^{½} + 2πr(1 - r^{2})^{½} / 3 - 2πr^{3} / 6(1 - r^{2})^{½}

∴ 0[3(1 - r^{2})^{½} / 2πr] = [2πr^{2} - 2πr / 3(1 - r^{2})^{½} + 2πr(1 - r^{2})^{½} / 3 - 2πr^{3} / 6(1 - r^{2})^{½}][3(1 - r^{2})^{½} / 2πr]

∴ 0 = 3r(1 - r^{2})^{½} - 1 + (1 - r^{2}) - r^{2}/2

∴ 0 = 3r(1 - r^{2})^{½} - 3r^{2}/2

∴ 0 = (1 - r^{2})^{½} - ^{r}/_{2}

∴ ^{r}/_{2} = (1 - r^{2})^{½}

∴ ^{r2}/_{4} = 1 - r^{2}

∴ ^{5r2}/_{4} = 1

∴ r^{2} = ^{4}/_{5}

∴ r = 2 / √5

∴ r = 2√5 / 5

Leaving us with our final answer. To contain the maximum amount of space between two stacked hemispheres, the one on top should be ^{2√5}/_{5}, or approximately 0.8944272 times the size of the one it sits on.