# Kepler's Wine Barrel Problem (Applied Optimization)

In one of his works Kepler stated and solved the following problem: Find the dimensions of the cylinder of largest volume that can be inscribed in a sphere of radius R. $Hint$: Show that an inscribed cylinder has volume $2\pi x(R^2 - x^2)$, where x is one-half the height of the cylinder.

I am having trouble even coming up with a first step to finding the volume of an inscribed cylinder, and any hints/help would be greatly appreciated.

Edit: As per Kaster's comment I tried by starting to inscribe a rectangle in a circle. I have sides $w, h$ of the rectangle and therefore $x = \frac{h}{2}$ and $y = \frac{w}{2}$ . Since $x^2 + y^2 = R^2$ we have $(\frac{h}{2})^2 + (\frac{w}{2})^2 = R^2$ . I am still not sure on where to go from here.

Edit 2: I think I understand what to do now. Since we know that a cylinder has volume $V = \pi r^2h$, and $x = \frac{h}{2}$ we can rewrite $h$ as $2x$ and by solving for $y$ in the previous case (which was the half the diameter, or the radius of the cylinder) we arrive at $y = \sqrt{R^2 - x^2}$. So by substituting into $V = \pi r^2h$ we get $V = 2\pi x(R^2 - x^2)$, which is the desired result.

To find the dimensions of the cylinder of largest volume that can be inscribed in a sphere of radius R, we maximize the objective function, $V = 2\pi x(R^2 - x^2)$, over the interval $(0, \infty)$.

$$\frac{dV}{dx} = 2\pi (R^2 - x^2) - 4\pi x^2$$

We now find the critical points,

$$\frac{dV}{dx} = 0$$

$$2\pi (R^2 - x^2) = 4\pi x^2$$ Solve for x, $$x = \frac{R}{\sqrt3}$$ Check for a maximum by second derivative test, $$\frac{dV^2}{d^2x} = -12\pi$$ So $x = \frac{R}{\sqrt3}$ is a maximum as $\frac{dV^2}{d^2x}$ at ${x=\frac{R}{\sqrt3}} < 0$ .

We check the endpoints, $V = 0$ at $x = 0$ and $V =- \infty$ at $x=\infty$, so ${x=\frac{R}{\sqrt3}}$ is indeed a global maximum.

Therefore dimensions of the inscribed cylinder are $h = \frac{2R}{\sqrt3}$ and $w= 2{R\sqrt{\frac{2}{3}}}$ .

• Start with inscribing a rectangle into the circle. – Kaster Nov 10 '15 at 6:24

$\hskip2in$
From this picture, it's obvious that if you prescribe your cylinder's height as $h$, then the cylinder radius is $$r^2(h) = R^2 - \frac {h^2}4 \tag 1$$ Now, simply use an equation for a cylinder volume through its height $h$ and radius $r$ $$V(r, h) = \pi r^2 h \tag 2$$ or after substituting $(1)$ to $(2)$ you get $$V(h) = \frac {\pi h} 4 \left( 4R^2 - h^2 \right)$$ Now, simply solve an optimization problem $$V' = \frac \pi 4 \left ( 4R^2 - 3h^2 \right ) = 0 \implies h^* = \frac {2R}{\sqrt 3}$$ I'll leave it to you, proving that it is actually a maximum. So the volume is $$V^* = \frac \pi 4 \frac {2R}{\sqrt 3} \left(4R^2 - \frac {4R^2}3 \right ) = \frac {4\pi R^3}{3\sqrt 3}$$