TITLE: 538.com's Puzzle of the Overflowing Martini Glass - How to compute the minor and major axis of an elliptical cross-section of a cone
QUESTION [11 upvotes]: FiveThirtyEight.com Riddler Puzzle / May 13
The puzzle goes like this;
"It’s Friday. You’ve kicked your feet up and have drunk enough of your martini that, when the conical glass () is upright, the drink reaches some fraction p of the way up its side. When tipped down on one side, just to the point of overflowing, how far does the drink reach up the opposite side?"
I came up with an an answer of $ p^2 $, based on the following (probably incorrect) solution;

$
\begin{aligned}
\overline{AE} &= \overline{AD} &&= 1 \dots \text{length of one side}\\
\overline{AC} &= p &&=\text{initial distance of liquid  along one side from the bottom}\\
\overline{AB} &= q &&= \text{distance when glass is tipped over to the other side}\\
h_p &= p \cos\theta &&= \text{height of upright triangle} \\
b_p &= 2p \sin\theta &&= \text{base of upright triangle} \\
h_q &= \overline{AE} \sin(2\theta) &&= \text{height of tipped-over triangle} \\
&= 2\sin\theta\cos\theta\\
b_q &= q &&= \text{base of tipped-over triangle} \\
&&&\\
\triangle(ACF) &= \left( \displaystyle \frac{h_p b_p}{2} \right) &&= p^2\sin\theta \cos\theta\\
\triangle(ABE) &= \left(\displaystyle\frac{h_q b_q}{2}\right) &&= q\sin\theta\cos\theta&&\\
\end{aligned}
$
$\begin{aligned}
\text{As   } & \text{volume of cone AEB} &&= \text{volume of cone ACF,}\\ 
  & \triangle(ACF) &&= \triangle(ABE) \dots \text{(leap of faith?)}\\ 
& q &&= p^2 \\ 
\end{aligned}
$
So the questions are;
a) Is it valid to assume that equal volumes imply equal vertical cross-sections?
b) How to derive the major and minor axes of the elliptical cross section $BE$ (so we can state the equation for the tilted volume in terms of $\overline{AB}$, and ultimately state $\overline{AB}$ as a function of $p$)?

REPLY [2 votes]: This solution is closely related to the Lorentz transformation solution I posted earlier, but is perhaps closer to the heart of the matter. Apologies for posting multiple solutions, but I hope each adds something interestingly new.

Assume without loss of generality that the side-length of the glass is $1$ and the apex a right angle, with $x$ and $y$ axes along sides of the glass as in the diagram, and consider the simple squeeze mapping $M$:
$$M=\left(\begin{matrix}
\frac{1}{k} & 0 & 0 \\
0 & k & 0 \\
0 & 0 & 1 
\end{matrix}
\right)
$$
For those unfamiliar with the matrix representation, $M$ represents a function, an affine linear transformation, that maps coordinates to coordinates as follows:
$$(x',y',z') = (\frac{x}{k},ky,z)$$
We will now show that $M$ maps (the coordinates in) the upright liquid cone to (the coordinates in) an oblique elliptical cone that also is bounded by the cone of the glass.  The planar surface of the upright liquid (the steeper blue line) is mapped to another planar surface (the shallower one). Like every point on the cone, each of the original perimeter points either is on the $x$ or $y$ axes and stays there under transformation, or is on a cross-section of the glass cone that follows a hyperbola of the form (for some particular $z$) $xy=\frac{z^2}{2}$, and stays on that hyperbola under transformation (because $x'y'=xy$), and hence stays on the cone.  So $M$ maps the perimeter to a co-planar closed curve on the cone: an ellipse.  When $k=p$, an $x$ value of $p$ maps to $1$, so the highest point on the ellipse is at the rim. Squeeze mappings are volume-preserving (see below).  Thus with $k=p$ we have the cone we are looking for: same volume, perimeter of the base on the glass cone, and tipped to the rim.  And $y=p$ maps to $y'=p^2$, so the lower edge of the elliptical surface is $p^2$ of the way up the side. Therefore the answer is $p^2$ (indeed the product of the side-lengths of the liquid cone is $p^2$ for any value of $k$).  
(To see that $M$ preserves area in the $x-y$ plane, consider any figure broken up into infinitesimal squares of side $s$ and area $s^2$, oriented with the axes. $M$ maps these to rectangles of sides $\frac{s}{k}$ and $sk$, and so they retain their area.  That volume is preserved follows easily, since depth ($z$) is unchanged.)