# Solution of Brachistochrone Problem with friction

$$\def \b {\mathbf}$$

solution of Brachistochrone Problem with friction

from

https://mathworld.wolfram.com/BrachistochroneProblem.html

I found the EL equation (29) and the parametric solution equations $$~(32)~,(33)~$$.

Eq. (29)

$$2\, \left( y -\mu\,x \right) {\frac {d^{2}}{d{x}^{2}} }y \left( x \right) + \left( 1+ \left( {\frac {d}{dx}}y \left( x \right) \right) ^{2} \right) \left( 1+ \left( {\frac {d}{dx}}y \left( x \right) \right) \mu \right) =0\tag 1$$ Eq. (32),(33) $$x=k(\theta-\sin(\theta))+\mu(1-\cos(\theta))\\ y=k(1-\cos(\theta))+\mu(\theta+\sin(\theta))$$

with:

$$\frac{dy}{dx}=\frac{\frac{dy}{d\theta}}{\frac{dx}{d\theta}}$$

and

$$\frac{d^2y}{dx^2}=\frac{d}{dx}\left(\frac{dy}{dx}\right)= \frac{\frac{d}{d\theta}\left(\frac{dy}{dx}\right)}{\frac{dx}{d\theta}}$$

in Eq. (1) , the result is not equal zero, why?

for solution of Brachistochrone Problem with out friction $$~\mu=0~$$ I obtain that Eq (1) is equal zero.

to obtain the results i use those equations (generatet with MAPLE)

with \begin{align*} &x=k \left( \varphi -\sin \left( \varphi \right) \right) +\mu\, \left( 1-\cos \left( \varphi \right) \right)\\ &y=k \left( 1-\cos \left( \varphi \right) \right) +\mu\, \left( \varphi +\sin \left( \varphi \right) \right) \end{align*} \begin{align*} &\frac{dx}{d\varphi}=k \left( 1-\cos \left( \varphi \right) \right) +\mu\,\sin \left( \varphi \right)\\ &\frac{dy}{d\varphi}=k\sin \left( \varphi \right) +\mu\, \left( 1+\cos \left( \varphi \right) \right) \end{align*}

thus \begin{align*} &\frac{d}{d\varphi}\left(\frac{dy}{dx}\right)=\frac{1}{\cos(\varphi)-1}\quad, \Rightarrow \frac{dy}{dx}= \cot(1/2\varphi)\\ &\frac{d^2 y}{d x^2}=\frac{\frac{1}{\cos(\varphi)-1}}{\frac{dx}{d\varphi}} =-{\frac {1}{ \left( \cos \left( \varphi \right) -1 \right) \left( -k +k\cos \left( \varphi \right) -\mu\,\sin \left( \varphi \right) \right) }} \end{align*}

Edit

you can obtain the EOM's with the metric $$~\b G~$$

\begin{align*} &\b G=\left[ \begin {array}{cc} \left( y-\mu\,x \right) ^{-1}&0 \\ 0& \left( y-\mu\,x \right) ^{-1}\end {array} \right] \end{align*}

and with the generalized coordinates

\begin{align*} &\b q=\begin{bmatrix} x \\ y \\ \end{bmatrix}\quad, \b{\dot{q}}=\begin{bmatrix} \dot x \\ \dot y \\ \end{bmatrix} \end{align*} the kinetic energy $$~T=\frac{1}{2}\,\b{\dot{q}}^T\,\b G\,\b{\dot{q}}~$$ we obtain with EL two differential equations
\begin{align*} & \ddot{x}+ \left( y-\mu\,x \right) \left( 1/2\,{\frac {{{\dot{x}}}^{2} \mu}{ \left( y-\mu\,x \right) ^{2}}}-{\frac {{\dot{y}}\,{\dot{x}}}{ \left( y-\mu\,x \right) ^{2}}}-1/2\,{\frac {{{\dot{y}}}^{2}\mu}{ \left( y-\mu\,x \right) ^{2}}} \right) =0\\ &\ddot{y}+ \left( y-\mu\,x \right) \left( {\frac {{\dot{y}}\,\mu\,{ \dot{x}}}{ \left( y-\mu\,x \right) ^{2}}}-1/2\,{\frac {{{\dot{y}}}^{2}}{ \left( y-\mu\,x \right) ^{2}}}+1/2\,{\frac {{{\dot{x}}}^{2}}{ \left( y -\mu\,x \right) ^{2}}} \right) =0 \end{align*}

where $$~x=x(\varphi)~,y=y(\varphi)~$$

again substitute $$~x(\varphi)~,y(\varphi)~$$ from Eq. (32), (33) in the EOM's only in case where $$~\mu=0~$$ the results are zero

• Crossposted from math.stackexchange.com/q/4738971/11127 Commented Jul 20, 2023 at 18:49
• Comment to the post (v7): Eqs. (32) & (33) in the post are slightly different than in the Wolfram source, i.e. $\mu$ should be $k\mu$ Consider to double-check. Commented Jul 21, 2023 at 9:40
• $~2\,g~$ is one and instead of $~\frac 12\,k^2~$ I put k, but for $~\mu=0~$ the solution is correct. I am going to put more details
– Eli
Commented Jul 21, 2023 at 9:45
• What is the relation between dot and $\frac{d}{d\varphi}$? Does dot mean differentiation wrt. $\varphi$? Commented Jul 23, 2023 at 13:21
• dot is $~\frac{d}{d\varphi}~$
– Eli
Commented Jul 23, 2023 at 17:12

TL;DR: OP has a point. The solutions (32) and (33) on the Wolfram page contain an error (July 2023): They lack the correct integration constants.

Below is a sketched derivation of the brachistochrone problem with friction with the initial condition that the bead starts from rest. (We also choose an $$(x,y)$$ coordinate system with the $$y$$-axis pointing downwards such that the bead starts at the origin.)

1. First of all, here's an interpretation of eq. (26): We can approximate an infinitesimal hypotenuse arclength $$\delta s$$ with an horizontal cathetus path $$\delta x$$ (with normal force $$mg$$) and a vertical cathetus path $$\delta y$$ (with zero normal force and hence zero friction force). Therefore the infinitesimal work-energy theorem reads $$\delta E_{\rm kin}~=~ \delta W~=~mg(\delta y-\mu\delta x).\tag{A}$$ Integrating using the initial conditions yields $$\frac{1}{2}mv^2~=~mg( y-\mu x).\tag{26}$$

2. Recall that the action (=spent time) is \begin{align}S~=~&\int_0^a\! \mathrm{d}x~L,\cr L~=~&\sqrt{\frac{1+y^{\prime 2}}{y-\mu x}}~=~\sqrt{\frac{1+(z^{\prime}+\mu)^2}{z}},\cr z~:=~&y-\mu x, \end{align}\tag{28} with boundary conditions $$y(0)=0$$ and $$y(a)=b$$. (Here we chose for simplicity units of time and space such that $$2g=1$$. A prime denotes a differentiation wrt. $$x$$.)

3. Since the Lagrangian $$L(z,z^{\prime},x)$$ has no explicit $$x$$-dependence the corresponding notion of energy is conserved: $$E~=~ z^{\prime} \frac{\partial L}{\partial z^{\prime}}-L~\stackrel{(28)}{=}~-\frac{1+\mu y^{\prime}}{\sqrt{z(1+y^{\prime 2})}}~<~0,\tag{30a}$$ cf. the Beltrami identity/Noether's theorem. Equivalently, $$E^2z~\stackrel{(30a)}{=}~\frac{(1+\mu y^{\prime})^2}{1+y^{\prime 2}}. \tag{30b}$$ The Euler-Lagrange eq. (29) is derived in my Math.SE answer here.

4. Substituting $$y^{\prime}~=~\cot\frac{\Delta\theta}{2},\qquad \Delta\theta~=~\theta-\theta_0, \tag{31}$$ leads to $$E^2z~\stackrel{(30b)+(31)}{=}~\left(\sin\frac{\Delta\theta}{2} +\mu\cos\frac{\Delta\theta}{2}\right)^2.\tag{B}$$

5. Note that we have shifted the parameter $$\theta\to\Delta\theta$$ in eq. (31) as compared to the Wolfram page to ensure that $$\theta=0$$ corresponds to the initial parameter value. The initial condition $$z(\theta\!=\!0)=0$$ in eq. (26) implies that \begin{align} \tan\frac{\theta_0}{2}~\stackrel{(B)}{=}~&\mu \cr\Updownarrow&\cr \theta_0~=~&2\arctan\mu. \end{align}\tag{C}

6. Differentiating eq. (B) wrt. $$x$$ yields \begin{align} E^2(\cot\frac{\Delta\theta}{2}-\mu)~\stackrel{(31)}{=}~& E^2z^{\prime}\cr ~\stackrel{(B)}{=}~&\left(\sin\frac{\Delta\theta}{2} +\mu\cos\frac{\Delta\theta}{2}\right)\cr &\left(\cos\frac{\Delta\theta}{2} -\mu\sin\frac{\Delta\theta}{2}\right)\theta^{\prime},\end{align}\tag{D} or \begin{align} 2E^2\frac{dx}{d\theta} ~\stackrel{(D)}{=}~& 2\sin\frac{\Delta\theta}{2}\left(\sin\frac{\Delta\theta}{2} +\mu\cos\frac{\Delta\theta}{2}\right)\cr ~=~&1-\cos\Delta\theta+\mu\sin\Delta\theta,\end{align}\tag{E} and \begin{align} 2E^2\frac{dy}{d\theta}~\stackrel{(31)}{=}~&2E^2\frac{dx}{d\theta}\cot\frac{\Delta\theta}{2}\cr ~\stackrel{(E)}{=}~&2\cos\frac{\Delta\theta}{2}\left(\sin\frac{\Delta\theta}{2} +\mu\cos\frac{\Delta\theta}{2}\right)\cr ~=~&\sin\Delta\theta+\mu(1+\cos\Delta\theta).\end{align}\tag{F}

7. Integrating eqs. (E) & (F) yields the solution \begin{align} 2E^2x~\stackrel{(E)}{=}~&\theta-\sin\Delta\theta+\mu(1-\cos\Delta\theta)+2E^2x_0\cr ~\stackrel{(G)}{=}~&\theta-\sin\Delta\theta-\mu(1+\cos\Delta\theta)\tag{32}\cr ~\stackrel{(C)}{=}~&\theta-\mu-\sqrt{1+\mu^2}\sin\left(\theta -\frac{\theta_0}{2}\right)\cr ~\stackrel{(C)}{=}~&\theta-\mu-\sqrt{1+\mu^2}\left(\sin\theta-\mu\cos\theta\right),\cr 2E^2y~\stackrel{(F)}{=}~&1-\cos\Delta\theta+\mu(\theta+\sin\Delta\theta)+2E^2y_0\cr ~\stackrel{(G)}{=}~&1-\cos\Delta\theta+\mu(\theta+\sin\Delta\theta)\tag{33}\cr ~\stackrel{(C)}{=}~&1+\mu\theta-\sqrt{1+\mu^2}\cos\left(\theta -\frac{\theta_0}{2}\right)\cr ~\stackrel{(C)}{=}~&1+\mu\theta-\sqrt{1+\mu^2}\left(\cos\theta+\mu\sin\theta\right), \end{align} where the integration constants $$E^2x_0~=~-\mu \qquad\text{and}\qquad E^2y_0~=~0\tag{G}$$ are determined by the initial conditions $$x(\theta\!=\!0)~=~0 \qquad\text{and}\qquad y(\theta\!=\!0)~=~0.\tag{H}$$ Note that eqs. (32) and (33) are modified as compared to the Wolfram page to ensure correct initial conditions.

• @Qmechnik 1. is your new solutions solve my problem? 2. If so can you please show it. 3. Can you also write your remarks on my solution, it seem for me much easier then yours ?
– Eli
Commented Jul 28, 2023 at 6:37
• 1. Apparently. 2. My answer contains a derivation. It would be nice if my solution is checked with e.g. Maple. 3. I wrote a comment. Commented Jul 28, 2023 at 10:14
• this equation $~\frac{ (1+y'^2)\,(y-\mu\,x)}{ (1+y'\,\mu)^2 }~=C$ must be constant , but with the "Wolfram" solution it is not!, so again what is the right solution ?
– Eli
Commented Aug 2, 2023 at 13:38
• The modified eqs. (32) and (33) in this answer. Commented Aug 2, 2023 at 14:27
• Look here math.stackexchange.com/q/4738971
– Eli
Commented Aug 4, 2023 at 6:36

\begin{align*} &2\,(y-\mu\,x)\,y''+\left[1+y'^2\right]\,(1+\mu\,y')=0\tag 1 \end{align*}

where $$~y=y(x)~$$

I found that those solutions fulfilled equation (1) \begin{align*} &x(\theta)=k \left( -\mu\,\cos \left( \theta \right) +\theta +\sin \left( \theta \right) \right)\\ &y(\theta)=k \left( 1+{\mu}^{2}+\cos \left( \theta \right) +\mu\, \left( \theta +\sin \left( \theta \right) \right) \right) \end{align*}

with:

$$y'=\frac{dy}{dx}=\frac{\frac{dy}{d\theta}}{\frac{dx}{d\theta}}$$

and

$$y''=\frac{d^2y}{dx^2}=\frac{d}{dx}\left(\frac{dy}{dx}\right)= \frac{\frac{d}{d\theta}\,y'(\theta)}{\frac{dx}{d\theta}}\\\\$$

solution of Brachistochrone Problem with friction

starting with the kinetic energy $$~T_y~$$ \begin{align*} &T_y= {\frac {{{ \dot x}}^{2}+{{\dot y}}^{2}}{y-\mu\,x}} \end{align*}

we obtain with EL two equations of motion \begin{align*} &{ \ddot{x}}-\frac{1}{2}\,{\frac {{{ \dot{x}}}^{2}\mu-2\,{ \dot{y}}\,{ \dot{x}}-{{ \dot{y}}}^{2}\mu}{-y+\mu\,x}} =0\tag 2 \end{align*} \begin{align*} &{ \ddot{y}}-\frac{1}{2}\,{\frac {2\,{ \dot{y}}\,\mu\,{ \dot{x}}-{{ \dot{y}}}^{2}+{{ \dot{x}}}^{2}}{-y+\mu\,x}}=0\tag 3 \end{align*}

where $$~\rm dot=\frac{d}{d\theta}~$$

to obtain the solutions we transfer the kinetic energy $$~T_y~$$ to $$~T_z~$$ with \begin{align*} &y =z+\mu\,x\quad \dot{y}=\dot{z}+\mu\,\dot{x}\quad\Rightarrow T_y\mapsto T_z\\ &T_z={\frac {{{\it px}}^{2}+ \left( {\it pz}+\mu\,{\it px} \right) ^{2}}{z} } \end{align*}

the EOM's are \begin{align*} &\ddot{x}-\frac{1}{2}\,{\frac { \left( \mu+{\mu}^{3} \right) {{ \dot{x}}}^{2}}{z}}-\frac{1}{2}\,{ \frac { \left( 2\,{ \dot{z}}+2\,{ \dot{z}}\,{\mu}^{2} \right) { \dot{x}}}{z} }-\frac{1}{2}\,{\frac {{{ \dot{z}}}^{2}\mu}{z}} =0\\ &\ddot{z}+\frac{1}{2}\,{\frac { \left( {\mu}^{2}-1 \right) {{ \dot{z}}}^{2}}{z}}+\frac{1}{2}\,{ \frac { \left( 2\,\mu+2\,{\mu}^{3} \right) { \dot{x}}\,{ \dot{z}}}{z}}+\frac{1}{2} \,{\frac { \left( 1+2\,{\mu}^{2}+{\mu}^{4} \right) {{ \dot{x}}}^{2}}{z}} =0 \end{align*} because $$~T_z~$$ is not depended on $$~x~$$ we obtain that \begin{align*} &\frac{\partial T_z}{\partial \dot{x}}=\frac{\dot{x}\,(1+\mu^2+\dot{z}\,\mu)}{z}=\text{constant}=2 \quad \Rightarrow\\ &\dot{x}={\frac {{ z- \dot{z}}\,\mu}{1+{\mu}^{2}}} \quad, \ddot{x}=\frac{1}{1+\mu^2}\left(\dot{z}-\mu\,\ddot{z}\right) \end{align*} substitute $$~\dot x~,\ddot x~$$ into the EOM's \begin{align*} &{\frac {{ \dot{z}}}{1+{\mu}^{2}}}-{\frac {\mu\,{ \ddot{z}}}{1+{\mu}^{2}}}+ \frac{1}{2}\,{\frac {{{ \dot{z}}}^{2}\mu-\mu\,{z}^{2}-2\,{ \dot{z}}\,z}{ \left( 1+ {\mu}^{2} \right) z}}=0\tag 4 \end{align*} \begin{align*} &{ \ddot{z}}-\frac{1}{2}\,{\frac {{{ \dot{z}}}^{2}-{z}^{2}}{z}}=0\tag 5 \end{align*} from here with the initial conditions $$~z(0)=z_0~,\dot{z}(0)=0~$$ we obtain (from Eq. (5)) with $$~z_0=2\,k\,(1+\mu^2) ~$$ \begin{align*} &z(\theta)=k\,[\,1+\cos(\theta)+\mu^2(1+\cos(\theta))\,]\quad\Rightarrow\\ &\dot{x}=-{\frac {{ \dot{z}}\,\mu-z}{1+{\mu}^{2}}}=\dot{x}(\theta)\quad\Rightarrow x(\theta)=\int\,\dot{x}\,d\theta\\\\ &\boxed{~x(\theta)=k\,(~\theta+\sin(\theta)-\mu\,\cos(\theta))~}\\\\ &y(\theta)=z(\theta)+\mu\,x(\theta)\\\\ &\boxed{~y(\theta)=k\,(1+\mu^2+\mu(\theta+\sin(\theta))+\cos(\theta))~} \end{align*}

the solutions $$x(\theta)~,y(\theta)~$$ are the solutions of equations (3) ,(4).

the solutions with out friction $$~\mu=0~$$ are

\begin{align*} &\boxed{~x(\theta)=k\,(\theta+\sin(\theta))~}\\\\ &\boxed{~ y(\theta)=k\,(1+\cos(\theta))~} \end{align*}

• Comment to the answer (v4): In the frictionless case $\mu=0$, the solution does not seem to agree with eqs. (14) & (15) on the Wolfram page because of different signs. In particular, it does not satisfy the initial conditions $y(\theta\!=\!0)=0$. Moreover it does not start from rest. Commented Jul 28, 2023 at 6:56
• Sorry „my solution dose not seem to agree with eg 14 & 15“ of course not , those equations are not the solution of eq 1 , and my equations are, this was my primary question
– Eli
Commented Jul 29, 2023 at 7:10
• As a test the solution should in particular work in the frictionless case $\mu=0$. Commented Jul 29, 2023 at 7:40
• In the frictionless case $\mu=0$ the initial condition $y(\theta\!=\!0)=0$ does not seem to be satisfied. Moreover the initial velocity is not zero. Commented Jul 29, 2023 at 16:10
• with $~z(0)=z_0~,\dot z(0)=0~$ and $z_0=2\,k\,(1+\mu^2)~$ you obtain the solutions $~x(\theta)=k\,(\ldots)~,y(\theta)=k\,(\ldots)~$ see neu edit
– Eli
Commented Jul 29, 2023 at 17:03