Skip to content
Vamshi Jandhyala

Books · The Riddler

Chapter 78

Can You Bake The Biggest Pie?

Riddler Classic

A fixed sheet of crust is formed, with no waste, into a sealed cylinder (top, bottom and side) holding the filling. To maximise the volume, what fraction of the crust should be the circular base?

Solution

The crust is all the cylinder’s surface: a top and bottom disc plus the side, total area A=2πr2+2πrhA = 2\pi r^2 + 2\pi r h, held fixed. Maximise the volume V=πr2hV = \pi r^2 h subject to that. With a Lagrange multiplier λ\lambda, setting V=λA\nabla V = \lambda \nabla A: h: πr2=λ2πr  λ=r2,r: 2πrh=λ(4πr+2πh).\frac{\partial}{\partial h}: \ \pi r^2 = \lambda\, 2\pi r \ \Rightarrow\ \lambda = \frac r2, \qquad \frac{\partial}{\partial r}: \ 2\pi r h = \lambda(4\pi r + 2\pi h). Substituting λ=r/2\lambda = r/2 into the second equation gives 2rh=2r2+rh2rh = 2r^2 + rh, so h=2rh = 2r: the optimal pie is as tall as it is wide (its height equals its diameter), the cylinder closest to a sphere. The base is then a fraction πr22πr2+2πrh=πr22πr2+4πr2=16\frac{\pi r^2}{2\pi r^2 + 2\pi r h} = \frac{\pi r^2}{2\pi r^2 + 4\pi r^2} = \boxed{\tfrac16} of the crust, with another sixth for the top and the remaining two-thirds for the side.

The computation

Hold the total crust area fixed and maximise the cylinder’s volume over its radius, then report the base’s share of the area.

import numpy as np
from scipy.optimize import minimize_scalar
A = 1.0                                          # fixed total crust area
def neg_vol(r):
    h = (A - 2 * np.pi * r**2) / (2 * np.pi * r)  # side + 2 discs use all crust
    return -np.pi * r**2 * h
r = minimize_scalar(neg_vol, bounds=(1e-3, (A / (2 * np.pi))**0.5),
                    method='bounded').x
print(np.pi * r**2 / A)                         # 0.1667 = 1/6