Posted on May 22, 2026
June the ant is on a cylinder. More specifically, she is on the edge of one of the cylinder's two circular faces. Her dinner is on the edge of the opposite circular face, and all the way around on the other side of that face. The radius of the cylinder is 2 meters and its height is 2 meters.
Your job is to help June find the shortest path along the surface of the cylinder so that she can chow down as quickly as possible. What's the length of this shortest path?
There are three natural path types to compare:
If June stays entirely on the curved side, we can cut the cylinder open and flatten that side into a rectangle of height \(2\) and width \(4\pi\).
The starting point and dinner are half a circumference apart, so in the flattened picture they are separated horizontally by \(2\pi\) and vertically by \(2\). The straight-line distance is therefore
\[ \sqrt{(2\pi)^2+2^2}=2\sqrt{\pi^2+1}\approx 6.5938. \]
Now consider paths that use exactly one flat face, say the top one. If June crosses the top face from her starting point to a rim point at angle \(a\), then the top-face piece is a chord of length
\[ 4\sin\left(\frac a2\right). \]
From there she still has to reach dinner along the curved side. After unrolling that side, the remaining piece has vertical change \(2\) and horizontal change \(2(\pi-a)\), so its length is
\[ 2\sqrt{1+(\pi-a)^2}. \]
Thus the one-face family has total length
\[ T(a)=4\sin\left(\frac a2\right)+2\sqrt{1+(\pi-a)^2}, \qquad 0\le a\le \pi. \]
Write \(x=\pi-a\). Then
\[ T(a)=4\cos\left(\frac x2\right)+2\sqrt{1+x^2}, \qquad 0\le x\le \pi. \]
If \(0\le x\le \sqrt{8}\), then
\[ \cos\left(\frac x2\right)\ge 1-\frac{x^2}{8} \qquad\text{and}\qquad \sqrt{1+x^2}\ge 1+\frac{x^2}{4}, \]
so
\[ T(a)\ge 4\left(1-\frac{x^2}{8}\right)+2\left(1+\frac{x^2}{4}\right)=6. \]
If \(\sqrt{8}\le x\le \pi\), then the side piece alone already has length
\[ 2\sqrt{1+x^2}\ge 2\sqrt{9}=6, \]
so again \(T(a)\ge 6\). Equality occurs only when \(x=0\), that is, \(a=\pi\). So the best one-face path is the diameter across the top followed by a vertical drop, with length
\[ T(\pi)=4+2=6. \]
Finally, suppose June crosses the top face to some rim point at angle \(a\), then travels down the curved side, then crosses the bottom face symmetrically. On each circular face, the shortest route between two rim points is a chord, so each face-contribution has length
\[ 4\sin\left(\frac a2\right). \]
The remaining angular change on the curved side is \(\pi-2a\), so the side-contribution is
\[ \sqrt{2^2+\bigl(2(\pi-2a)\bigr)^2}=2\sqrt{1+(\pi-2a)^2}. \]
That makes the total length
\[ L(a)=8\sin\left(\frac a2\right)+2\sqrt{1+(\pi-2a)^2}, \qquad 0\le a\le \frac{\pi}{2}. \]
Differentiate:
\[ L'(a)=4\cos\left(\frac a2\right)-\frac{4(\pi-2a)}{\sqrt{1+(\pi-2a)^2}}. \]
On the whole interval, this derivative is positive, so \(L(a)\) increases as soon as \(a>0\). Therefore the minimum within this three-piece family occurs at \(a=0\), which is exactly the side-only path of length \(2\sqrt{\pi^2+1}\).
That identifies the mistake in the original argument: it proved only that adding matching top and bottom face segments never helps. It did not compare the side-only path against the one-face path, and that omitted case is better.
So the true shortest path is: cross the top along a diameter, then go straight down the side. Its length is
It is useful to write the general version once. Let the cylinder have radius \(r\), height \(h\), and let the angular separation between the start and finish be \(\Delta\), where \(0\le \Delta\le \pi\).
A shortest path can be simplified so that it uses each of the three surface pieces at most once: top face, curved side, bottom face. On each piece, the shortest subpath is a geodesic: a straight segment on a flat face, or a straight segment after unrolling the side. Therefore every minimizing path must belong to one of these four families:
By symmetry, the second and third families have the same minimum, so there are really only three values to compare.
For the side-only family, unrolling the curved side gives
\[ L_S=\sqrt{h^2+(r\Delta)^2}. \]
For the top-then-side family, suppose the path crosses the top face to a rim point that is angle \(a\) from the starting point. Then the top-face piece is a chord of length \(2r\sin(a/2)\), and the remaining side piece has length \(\sqrt{h^2+(r(\Delta-a))^2}\). Thus
\[ L_T(a)=2r\sin\left(\frac a2\right)+\sqrt{h^2+\bigl(r(\Delta-a)\bigr)^2}, \qquad 0\le a\le \Delta. \]
The endpoint values are
\[ L_T(0)=L_S \qquad\text{and}\qquad L_T(\Delta)=h+2r\sin\left(\frac{\Delta}{2}\right). \]
Its derivative is
\[ L_T'(a)=r\cos\left(\frac a2\right)-\frac{r^2(\Delta-a)}{\sqrt{h^2+\bigl(r(\Delta-a)\bigr)^2}}. \]
So any interior optimum in this family must satisfy
\[ \cos\left(\frac a2\right)=\frac{r(\Delta-a)}{\sqrt{h^2+\bigl(r(\Delta-a)\bigr)^2}}. \]
That equation gives the optimal entry angle for the one-face family.
For the top-side-bottom family, symmetry gives
\[ L_{TSB}(a)=4r\sin\left(\frac a2\right)+\sqrt{h^2+\bigl(r(\Delta-2a)\bigr)^2}, \qquad 0\le a\le \frac{\Delta}{2}. \]
Its derivative is
\[ L_{TSB}'(a)=2r\cos\left(\frac a2\right)-\frac{2r^2(\Delta-2a)}{\sqrt{h^2+\bigl(r(\Delta-2a)\bigr)^2}}. \]
So any interior optimum in this family must satisfy
\[ \cos\left(\frac a2\right)=\frac{r(\Delta-2a)}{\sqrt{h^2+\bigl(r(\Delta-2a)\bigr)^2}}. \]
This is the exact condition for the optimal matched entry/exit angle in the two-face family.
So the complete mathematical recipe for a general cylinder is:
That classification really does cover every possible shortest path. What changes from one cylinder to another is which family wins, and whether its minimizing angle is an endpoint or an interior critical point.
For the original Fiddler values \((r,h,\Delta)=(2,2,\pi)\), the one-face family is minimized at the endpoint \(a=\pi\), the two-face family is minimized at the endpoint \(a=0\), and the winner is the one-face path of length \(6\).
Drag the picture or use the rotation slider. Switch to the shell view to see why the extra-credit path dives through the annulus, uses the inner wall, and comes back out.
Cylinder path length: \(6\), from a diameter across the top plus a vertical drop.
Now, June is on a hollowed-out cylinder, also known as a cylindrical shell. The shell's outer radius is 2 meters and its inner radius is 1 meter. The shell is 2 meters tall. June is on the outer edge of one of the cylinder's two flat faces. Her dinner is on the opposite face, and all the way around on the other end of that face.
Once again, your job is to help June find the shortest path along the surface of the shell so that she can chow down as quickly as possible. What's the length of this shortest path?
Here it can pay to use the inner curved wall, because going halfway around on radius \(1\) is cheaper than going halfway around on radius \(2\).
Let June cross the top annulus from the outer rim to the inner rim at angle \(a\), descend the inner wall, then cross the bottom annulus symmetrically. For the minimizing path, the annulus pieces stay in the direct-segment regime, so each top or bottom piece has length
\[ \sqrt{2^2+1^2-2\cdot 2\cdot 1\cos a}=\sqrt{5-4\cos a}. \]
The inner-wall piece has vertical change \(2\) and angular change \(\pi-2a\) at radius \(1\), so its length is
\[ \sqrt{2^2+(\pi-2a)^2}. \]
Thus
\[ F(a)=2\sqrt{5-4\cos a}+\sqrt{4+(\pi-2a)^2}. \]
Setting \(F'(a)=0\) gives
\[ \frac{2\sin a}{\sqrt{5-4\cos a}} = \frac{\pi-2a}{\sqrt{4+(\pi-2a)^2}}. \]
Solving numerically gives
\[ a\approx 0.45775\text{ radians}\approx 26.23^\circ. \]
Plugging that in, the shortest shell-path has length
If we do not assume symmetry in advance, the more general two-angle family is this: June crosses the top annulus from the outer rim at angle \(0\) to the inner rim at angle \(a\), descends the inner wall to angle \(b\), then crosses the bottom annulus from the inner rim at angle \(b\) to the dinner point on the outer rim at angle \(\pi\).
As long as both annulus crossings stay in the direct-segment regime, the total length is
\[ G(a,b)=\sqrt{5-4\cos a}+\sqrt{4+(b-a)^2}+\sqrt{5+4\cos b}. \]
An interior critical point must satisfy
\[ \frac{\partial G}{\partial a} = \frac{2\sin a}{\sqrt{5-4\cos a}} - \frac{b-a}{\sqrt{4+(b-a)^2}} =0 \]
and
\[ \frac{\partial G}{\partial b} = \frac{b-a}{\sqrt{4+(b-a)^2}} - \frac{2\sin b}{\sqrt{5+4\cos b}} =0. \]
So any interior optimum in this two-variable family must satisfy
\[ \frac{2\sin a}{\sqrt{5-4\cos a}} = \frac{b-a}{\sqrt{4+(b-a)^2}} = \frac{2\sin b}{\sqrt{5+4\cos b}}. \]
This family is symmetric under \((a,b)\mapsto (\pi-b,\pi-a)\), and solving the critical-point equations numerically gives
\[ a\approx 0.457751785,\qquad b\approx 2.683840868=\pi-a. \]
So the optimal two-variable path is exactly the symmetric one already used above. Its length is again
\[ G(a,b)\approx 5.368959019. \]
In particular, allowing separate entry and exit angles does not improve on the one-variable solution; it just recovers it.
There is a clean general version of the winning shell family as well. Let the shell have outer radius \(R\), inner radius \(r\), height \(h\), and angular separation \(\Delta\), with \(0\le \Delta\le \pi\).
If a shortest path chooses to use the inner wall, then it must cross the top annulus from the outer rim to the inner rim, travel down the inner wall, and cross the bottom annulus back out to the outer rim. In the symmetric family, let the entry point on the top inner rim be angle \(a\) from the starting radial line, and let the exit point on the bottom inner rim be angle \(a\) short of the destination radial line.
Each annulus crossing is a straight segment from radius \(R\) to radius \(r\), so its length is
\[ \sqrt{R^2+r^2-2Rr\cos a}. \]
The inner-wall piece has vertical change \(h\) and angular change \(\Delta-2a\) at radius \(r\), so after unrolling the inner wall its length is
\[ \sqrt{h^2+\bigl(r(\Delta-2a)\bigr)^2}. \]
Thus the full inner-wall family is
\[ F_{in}(a)=2\sqrt{R^2+r^2-2Rr\cos a}+\sqrt{h^2+\bigl(r(\Delta-2a)\bigr)^2}, \qquad 0\le a\le \frac{\Delta}{2}. \]
Its derivative is
\[ F_{in}'(a)= \frac{2Rr\sin a}{\sqrt{R^2+r^2-2Rr\cos a}} - \frac{2r^2(\Delta-2a)}{\sqrt{h^2+\bigl(r(\Delta-2a)\bigr)^2}}. \]
So any interior optimum in this family must satisfy
\[ \frac{R\sin a}{\sqrt{R^2+r^2-2Rr\cos a}} = \frac{r(\Delta-2a)}{\sqrt{h^2+\bigl(r(\Delta-2a)\bigr)^2}}. \]
For the Fiddler values \((R,r,h,\Delta)=(2,1,2,\pi)\), this reduces exactly to the equation above, and the numerical solution is \(a\approx 0.45775\).
The full shell classification is more complicated than the solid-cylinder case, because annulus geodesics between two outer-rim points can change form depending on the parameters: sometimes the direct chord stays in the annulus, and sometimes the shortest annulus path bends into tangent segments and an inner-circle arc. So for the shell there is no comparably tidy universal two-family threshold. The honest general recipe is the same as before: classify the admissible surface-order families, write the correct length function for each, and compare their minima.
More Fiddlers: Previous | Next