This week’s Riddler Classic is about baking the biggest pie. Just in time for π day!
You have a sheet of crust laid out in front of you. After baking, your pie crust will be a cylinder of uniform thickness (or rather, thinness) with delicious filling inside.
To maximize the volume of your pie, what fraction of your crust should you use to make the circular base (i.e., the bottom) of the pie?
Here is my solution:
[Show Solution]
Since we have a fixed amount of crust that we will shape into a cylinder, the problem is one of maximizing the volume for a fixed area. This is known as the isovolume problem (which is a misnomer; it should really be called the isoarea problem).
Let’s suppose the crust has an area of $A$. Given this area, we would like to maximize the volume of the cylinder. Let’s suppose the radius of the base is $r$ and the height is $h$. Then the formulas are:
\[
A = 2\pi r^2 + 2\pi r h \qquad\text{and}\qquad V = \pi r^2 h.
\]Since the area $A$ is fixed, we are not free to choose $r$ and $h$ independently. Once $r$ is chosen, $h$ is uniquely determined by the equation for $A$. Solving for $h$ in terms of $A$ from the area equation, we obtain:
\[
h = \frac{A-2\pi r^2}{2\pi r}
\]Substituting this value of $h$ into the equation for $V$, we obtain:
\[
V= \frac{1}{2} r (A-2\pi r^2)
\]Here is a plot of what this function $V(r)$ looks like for a value of $A=1$:
We can maximize $V$ by looking for an $r$ such that $\frac{\mathrm{d}V}{\mathrm{d}r}=0$ and $\frac{\mathrm{d}^2V}{\mathrm{d}r^2}\lt 0$. In other words, at the optimal choice of $r$, the tangent to the curve $V(r)$ is flat and the curvature is negative (curves downward). This leads to the equations:
\[
\frac{1}{2}(A-6\pi r ^2) = 0 \qquad\text{and}\qquad -6\pi r \lt 0
\]Since $r\geq 0$ (radius can’t be negative), the second equation is always satisfied, and the first equation implies that $r=\sqrt{\frac{A}{6\pi}}$. If $A=1$ as in the plot above, this leads to $r=0.23033$, which looks about right! With the optimal choice of $r$, the corresponding choice of $h$ becomes $h=\sqrt{\frac{2A}{3\pi}}$ and the corresponding optimal volume is $V=\frac{A^{3/2}}{3\sqrt{6\pi}}$. Interestingly, we can observe that with these choices,
\[
2r = 2\sqrt{\frac{A}{6\pi}} = \sqrt{\frac{4A}{6\pi}} = \sqrt{\frac{2A}{3\pi}} = h
\]So in order to maximize the area, the diameter should be equal to the height! In other words, when viewed from the side, our pie should have a square shape; we’ll be making more of a cake rather than a pie.
The fraction of crust used for the base of the optimal pie is:
\[
\frac{\pi r^2}{A} = \frac{\pi \left(\frac{A}{6\pi}\right)}{A} = \frac{1}{6}.
\]
$\displaystyle
\begin{aligned}
&\text{So we should use $\tfrac{1}{6}$ of the crust for the base, $\tfrac{1}{6}$ for the top,}\\
&\text{and the remaining $\tfrac{2}{3}$ for the sides.}
\end{aligned}$
One way to explain the shape of this tall pie is to think back to the isovolume problem discussed earlier. The solution to the isovolume problem is a sphere. So in order to be as efficient as possible, the pie’s shape should be as close to a sphere as possible, hence the tall shape. For a sphere, $A=4\pi r^2$ and $V=\frac{4}{3}\pi r^3$, so by eliminating $r$, we obtain $V=\frac{A^{3/2}}{6\sqrt{\pi}}$.
If we take the ratio of the volume of the sphere and the volume of the optimized cylinder, we obtain:
\[
\frac{V_\text{cylinder}}{V_\text{sphere}} = \frac{ \frac{A^{3/2}}{3\sqrt{6\pi}} }{ \frac{A^{3/2}}{6\sqrt{\pi}} } = \sqrt{\frac{2}{3}} \approx 0.8165
\]So the optimized cylindrical pie will have a volume which is about 82% of the largest possible volume.
Bonus: Different bottom and top area
If the top and bottom areas of the pie have different radii, then the shape is no longer a cylinder, but rather a frustom of a cone. The formulas are now a bit more complicated, because they depend on two radii ($r$ and $R$) and the height $h$:
\begin{align}
A &= \pi (r+R) \sqrt{h^2+(R-r)^2}+\pi \left(r^2+R^2\right)\\
V &= \frac{1}{3} \pi h \left(r^2+r R+R^2\right)
\end{align}Using a similar procedure as before (solving for $h$ in the area equation and substituting this into the volume equation), we obtain the following volume formula that depends only on the radii of the top and bottom
\[
V = \frac{\left(r^2+r R+R^2\right) \sqrt{\left(A-2 \pi r^2\right) \left(A-2 \pi R^2\right)}}{3 (r+R)}
\]A necessary condition for optimality is that both partial derivatives are zero, namely $\frac{\partial V}{\partial r} = \frac{\partial V}{\partial R} = 0$. This leads to the equations:
\begin{align}
\frac{\partial V}{\partial r} &= -\frac{r \left(A-2 \pi R^2\right) \left(2 \pi \left(4 r^2 R+2 r^3+2 r R^2+R^3\right)-A (r+2 R)\right)}{3 (r+R)^2 \sqrt{\left(A-2 \pi r^2\right) \left(A-2 \pi R^2\right)}} \\
\frac{\partial V}{\partial R} &= -\frac{R \left(A-2 \pi r^2\right) \left(2 \pi \left(2 r^2 R+r^3+4 r R^2+2 R^3\right)-A (2 r+R)\right)}{3 (r+R)^2 \sqrt{\left(A-2 \pi r^2\right) \left(A-2 \pi R^2\right)}}
\end{align}Much messier than the ordinary cylinder case… But we can simplify this. It must be true that $A\gt 2\pi R^2$ and $A\gt 2\pi r ^2$, since the area of the smaller circle plus the area of the sides must be at least the area of the larger circle (they are only equal when the pie is flat). So if $\frac{\partial V}{\partial r} = \frac{\partial V}{\partial R} = 0$, we can cancel a bunch of terms and we are left with:
\begin{align}
2 \pi \left(4 r^2 R+2 r^3+2 r R^2+R^3\right)-A (r+2 R) &= 0& &(1) \\
2 \pi \left(2 r^2 R+r^3+4 r R^2+2 R^3\right)-A (2 r+R) &= 0& &(2)
\end{align}This still looks rather messy to solve, but we can make a clever observation. If we subtract one equation from the other $(2)-(1)$ and factor, we obtain:
\[
(R-r) \left(A+2 \pi r^2+6 \pi r R+2 \pi R^2\right)=0
\]The right factor consists of a sum of positive terms, and therefore must be positive. So we conclude that $R=r$. Put another way, the only way we’ll have an optimized volume is if the top and bottom circles are of equal size. This reduces our more complicated case to the simpler case we already solved above.