On the Fast Track
Logic, Geometry, Calculus; Difficulty: Hard
How Fast Can You Make The Track?
This week’s Riddler Classic is a Brachistochrone curve problem, but with a constraint. The solution can be intuited with knowledge of the Brachistochrone problem, proving optimality takes some effort. The Classic reproduced:
This week’s Classic is sure to break your brachistochrone:
While passing the time at home one evening, you decide to set up a marble race course. No Teflon is spared, resulting in a track that is effectively frictionless.
The start and end of the track are 1 meter apart, and both positions are 10 centimeters off the floor. It’s up to you to design a speedy track. But the track must always be at floor level or higher — please don’t dig a tunnel through your floorboards.
What’s the fastest track you can design, and how long will it take the marble to complete the course?
*spoiler alert* solution and answer follow below
Brachistochrone Review
The Brachistochrone problem originally posed by Johann Bernoulli over three centuries ago addresses the case of the fastest descent curve for a bead/marble sliding frictionlessly on a track, starting from rest, and purely under the influence of gravity. This 3Blue1Brown video provides an excellent review of the very interesting history and the solution and is a highly recommended primer for this week’s Riddler problem. Bernoulli’s solution using Fermat’s least time principle and Snell’s law is particularly clever.
The solution for the shortest time curve is just the largest radius (inverted) cycloid that passes through the two points where the second point obviously has to be at or below the level of the first one for the bead/marble to reach that destination.
That fact should ideally make short work of this question which is almost the same as the originally posed problem by Bernoulli. But unfortunately we are faced with a wrinkle which becomes obvious once we look at the solution to the original unconstrained problem:
The unconstrained (non) solution:
Since the start and end points are at the same height, the optimum cycloid will make 1 full rotation and hence have to have diameter \(d = \frac{100}{\pi}\) cms.
More formally, using the cycloid brachistochrone solution, setting our coordinate system to have the floor at \((0,0)\) and the starting point as \((0,10)\), the equation of (inverted) cycloids that pass through our starting point \((0,10)\) in parametric form is:
\begin{align*}
x &= r(\theta- \sin \theta) \ ; \ y = 10-r(1-\cos \theta) \\
\textit{where parameter }\quad \theta &= t \sqrt{\frac{g}{r}} \\
\end{align*}
where \(r\) is the cycloid radius and \(t\) is time and \(g\) is the acceleration due to gravity.
This gives us the solution \(r = \frac{100}{2\pi}\) cms and is shown in the figure below with the dashed portion falling below floor level.
It is now clear this solution will not work! It requires the ball to drop to max of 31.8 cms from the start, as shown in the figure above. This will require quite a bit of tunneling (to a depth of 21.8 cms) through the floor(boards) which is strictly prohibited!
The optimum time if we were allowed to breach the floor (or start higher) is given by:
\[
2\pi \sqrt{\frac{r}{g}} \approx 0.80 \ seconds
\]
Solution without damaging the floor
Since the unconstrained optimum solution goes below the floor, it’s reasonable to assume that our required fastest track must hit the floor at some point and eventually travel back up. This is because using the entire initial height gives the marble the highest possible speed (all potential energy w.r.t. floor converted into speed). We will prove this in the last section.
A simple symmetry argument shows that path back up to the end point in this new optimum solution will be symmetric to the path down to the floor. If that were not the case and one was faster than the other, we’d just switch both the ascent and descent to the faster one!
What remains to be determined is the point where the track meets the floor.
Let’s work with our cycloid and find the farthest point on the floor a cycloid will get us. Once we have this I show why this must be an optimum solution.
Using the cycloid equations above, it is seen that as the radius of the cycloid is reduced from the optimum, it hits the floor further out from the start. The farthest point on the floor that a cycloid can make contact with will then naturally have the floor be a tangent to the cycloid at the point of contact. This occurs when the cycloid has the same diameter as the height \(h = 10\) cms.
Or more formally, using parametric form from above when the cycloid hits the floor i.e. when \(y = 0\) :
\[
x = r\left [ \cos^{-1}\left ( 1-\frac{10}{r} \right ) -\sqrt{\frac{20r-100}{r^2}} \right ]
\]
This is maximum when \(r = 5\) cms or the diameter is the height \(h = 10\) cms as before. This maximum is one rotation of the cycloid or \(\pi r = 5 \pi \).
Pending proof that this can’t be beat (last section), this gives us the needed fastest track comprising of 3 sections:
- a cycloid of radius \(r = 5\) cms to start that descends and meets the floor at a distance of \(5\pi \)
- A flat portion along the floor all the way to \(100 – 5\pi\) cms
- Finally a cycloid again of the same radius \(r = 5\) cms ascending to the finish point.
The time for each component is:
- \(t_1\): the cycloid rotates through \(\theta = \pi \) giving a marble travel time (cycloid equation and brachistochrone solution above) of \(t_1 = \pi \sqrt{\frac{r}{g}} \approx 0.224 \) seconds.
- \(t_2\): the marble now travels horizontally at floor level for a distance of \(100 – 10\pi \) with a constant speed of \(\sqrt{2gh}\) i.e. all potential energy is now kinetic energy. \(t_2 = \frac{100-10\pi}{\sqrt{2gh}} \approx 0.490\) seconds
- \(t_3\): the marble ascends the cycloid symmetric to the first section taking an equal amount of time \(t_3 \approx 0.224\) seconds
Adding the three times above gives us the shortest time \(\approx\) = 0.9382 seconds or just under a second! This is about 17.3% slower than if we could just raise the track to a height of 31.8 cms.
The fastest track (3 sections) and the animated motion of the marble is shown below: at about real speed in the first figure and slowed down 5x in the second.
Proving optimality
The figure above represents the starting region of our track. Our posited optimal track is S-P-R where P is the point at which the cycloid part of the track meets the floor.
Hitting the floor left of P: If our track were to hit the floor to the left of P and then rolled horizontally to P, we would necessarily take more time than our cycloid track S-P-R. This is because the cycloid is the optimal track to get to P as was shown 3 centuries ago!
Hitting the floor to the right of P (or never hitting the floor):
Consider a curve such as the one in black above that hits the floor at point R. Let’s say that this curve passes directly above our posited optimum at point Q. The marble will inevitably arrive at Q at a slower speed than our path at P, because it has fallen through a smaller vertical distance. But this marble may also arrive in less time at Q. This suggests there might be a path from Q to R such that in total we arrive faster at R than through S-P-R leading to a better solution! We have to show this is not possible.
Now consider this point Q. The original Brachistochrone solution tells us that the optimal path to Q has to be a cycloid (shown in purple) and NOT the curve in black. So we’d presumably use the purple cycloid from S to Q and then switch to the black.
Now let’s calculate the time it takes to get from the start S to the point Q along the cycloid. Let the height of Q above P, i.e. \(PQ = a \). Using the original parametric cycloid equations along with the condition that it pass through the point Q \( (5\pi, a) \) gives us:
\begin{align*}
5\pi &= r(\theta – \sin \theta) \\
a &= 10 – r(1- \cos \theta) \\
t &= \theta \sqrt{\frac{r}{g}}
\end{align*}
Remember that \(r\) is the radius of the cycloid, and \(t\) is the time from the start. Using \(r\) from the first equation and substituting in the third equation (for time) gives us:
\[
t = \theta \sqrt{\frac{5\pi}{g(\theta- \sin \theta)}}
\]
Now, keep in mind that \(\theta\) necessarily has to be greater than \(\pi\) since \(r\) has to be less than the 5 cms for our optimal path for the cycloid to get to Q. This is also seen in the figure above.
Now recollect that the time to get to P in our optimal path was:
\[
t_{P} = \pi \sqrt{\frac{5}{g}}
\]
Comparing the time \( t\) to get to Q with \(t_P\) the time to get to P we can actually show that the former is greater than the latter. i.e. it takes more time to get to any Q than to get to P!
\begin{align*}
t &\stackrel{?}{\geq} t_p \\
\theta \sqrt{\frac{5\pi}{g(\theta- \sin \theta)}} \ &\stackrel{?}{\geq} \ \pi \sqrt{\frac{5}{g}} \\
\Rightarrow \qquad \theta \sqrt{\frac{\pi}{\theta- \sin \theta}} \ &\stackrel{?}{\geq} \ \pi \\
\Rightarrow \qquad \frac{{\theta}^2}{\pi(\theta – \sin \theta)} \ &\stackrel{?}{\geq} \ 1 \\
\Rightarrow \qquad \theta (\theta – \pi) + \pi \sin \theta &\stackrel{?}{\geq} \ 0 \\ \\
\textit{Since } \theta > \pi \ \textit{ Let } \theta &= \pi + \phi \qquad 0 < \phi \leq \pi \\
\Rightarrow \qquad (\pi + \phi)\phi +\pi \sin (\pi + \phi) &\stackrel{?}{\geq} \ 0 \\
\Rightarrow \qquad \phi^2 + \pi (\phi – \sin \phi) &\stackrel{?}{\geq} \ 0 \\ \\
\textit{always true since} \quad \phi &\geq \sin \phi \qquad 0 < \phi \leq \pi \\
\end{align*}
This shows you can never get to any Q above P faster than getting to P. So there can be no better path that meets the floor after P. Also there can never be one that never meets the floor. If this is non obvious, consider P’, Q’ symmetrically on the other (right) side of the cycloid. Going from this Q’ to the finish will take longer than going from P’. Also the PP’ journey necessarily has to be faster than any QQ’ since the speed at P is greater than at Q and any QQ’ cannot be shorter than QQ’.
Q.E.D.
2 thoughts on “On the Fast Track”
Nice solution for this, basically Newton’s solution adapted for the existing problem and proven. Animated graphics that would be nice to see on this would be one giving the solution to the problem overlayed with one giving the hypothetical solution assuming that there was no height limitation in both real time and slow motion.
Thanks, Mark. That’s such a great suggestion for animating the comparison of the unconstrained and the floor constrained. Wish I’d thought of that. I’ll see if I can get to adding that.