TITLE: Brachistochrone problem with floor restriction
QUESTION [11 upvotes]: An object starts sliding (without friction, under the influence of gravity) from $(0, h)$ along some curve $\gamma(t) = (x(t),\space y(t))$ and just like in the usual Brachistochrone problem it must reach the point $(d, 0)$ in the shortest possible time. But we add the constraint that the curve cannot go through the floor $(y=0)$, i.e $y(t) \geq 0$.
What (if it exists) is the solution curve for this problem?

REPLY [3 votes]: Arthur wrote in a comment below the question:

My immediate guess would be to follow the cycloid which is vertical at $A$ and tangent to the floor, then when you reach the floor slide along the floor to $B$.

Arthur is exactly right if $d\geq \pi \frac{h}{2}$. (If $d\leq  \pi \frac{h}{2}$, the cycloid solution between $A$ and $B$ for the unconstrained Brachistochrone problem will not dip below the floor, and hence is the optimal solution.)
Sketched proof:

It is enough to consider continuous curves $\gamma$ that can be parametrized by the $x$-coordinate. (Moving in the negative $x$-direction (or vertically for a finite period) cannot be optimal.)

We can break the optimization problem down into smaller problems. Say, given a vertical line $\ell$ with $x$-coordinate $\in]0,d[$, and let $C$ be an arbitrary point on $\ell$. Then an optimal curve $\gamma_{AB}$ from $A$ to $B$ can be found as a concatenation of an optimal curve $\gamma_{AC}$ from $A$ to $C$ and an optimal curve $\gamma_{CB}$ from $C$ to $B$, if we in the end optimize the position of $C$ along the vertical line $\ell$ wrt. the time functional $t[\gamma_{AC}]+t[\gamma_{CB}]$, cf. Fig. 1.
  y
  ^
  |          |
 A|__        |
  |  \_______|__
  |         C|  \_____
 _|__________|________\__B______> x
  |          |

$\uparrow$ Fig.1.
(Technically, for the second leg $\gamma_{CB}$, we are here slightly generalizing the classical Brachistochrone problem (where the initial speed traditionally is assumed to be zero) to the case where the initial speed could be non-zero.)

Let $C$ be the point where an optimal curve $\gamma_{AB}$ first touches the floor. (Could be the endpoint $B$). Then the optimal curve $\gamma_{AC}$ is just a cycloid solution for the unconstrained problem between $A$ and $C$.
A parametrization of the cycloid reads
$$\begin{align}\gamma_{AC}(\theta)~=~&\begin{pmatrix}x(\theta)\cr y(\theta)\end{pmatrix}~=~\begin{pmatrix}\frac{k^2}{2}(\theta-\sin\theta)\cr h- k^2\sin^2\frac{\theta}{2}\end{pmatrix}, \cr 
k~:=~&\frac{\sqrt{h}}{\sin\frac{\theta_C}{2}}, \qquad 
\theta~\in~[0,\theta_{C}],\end{align}\tag{0}$$
where $\theta_{C}\in[0,\pi]$ is a free parameter to be determined later. It is straightforward to calculate that the time for the first leg is
$$\begin{align}t[\gamma_{AC}]~=~&\int_{\gamma_{AC}}\! \frac{\mathrm{d}s}{v}
~=~\int_0^{\theta_C}\!\mathrm{d}\theta \sqrt{\frac{x^{\prime}(\theta)^2+y^{\prime}(\theta)^2 }{2g(h-y(\theta))}}\cr
~\stackrel{(0)}{=}~&\ldots ~=~\frac{k\theta_C}{\sqrt{2g}}.\end{align}\tag{1} $$

If an intermediate optimal point $C$ touches the floor, then the optimal curve $\gamma_{CB}$ must be a straight line horizontally along the floor (because staying as low as possible yields the greatest speed).
Assume for the rest of the answer that $d\geq \pi \frac{h}{2}$. The time for the second leg is
$$t[\gamma_{CB}]~=~\frac{x_B-x_C}{v}~=~\frac{d-\frac{k^2}{2}(\theta_C-\sin\theta_C)}{\sqrt{2gh}}. \tag{2}$$

If a continuous piece-wise $C^1$-curve $\gamma$ (with left- and right derivatives) has a kink in its slope, it cannot be optimal.
This argument alone shows that the optimal curve has $\theta_C=\pi$. It can also be explicitly checked from eqs. (1) & (2) that the combined time $t[\gamma_{AC}]+t[\gamma_{CB}]$ is minimized for $\theta_C=\pi$.