Solving the Brachistochrone Problem

### 13.8.3 Solving the Brachistochrone Problem

To solve the brachistochrone problem (see Section 13.8.1), you can first find the Euler-Lagrange equations for the Lagrangian

L(x,y(x),y′(x))= |
√
1+y′(x)2
2 g y(x)
| .

You can simplify this somewhat by assuming that you are using units where 2g=1.

assume(y>=0):; euler_lagrange(sqrt((1+y'^2)/y),x,y)

| ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ | − |
1
√
⎛ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ | ⎛ ⎜ ⎜ ⎝ |
d
dx
| y | ⎛ ⎝ | x | ⎞ ⎠ | ⎞ ⎟ ⎟ ⎠ |
2
| +1 | ⎞ ⎟ ⎟ ⎟ ⎟ ⎟ ⎠ | y | ⎛ ⎝ | x | ⎞ ⎠
| =K2, |
d2
dx2
| y | ⎛ ⎝ | x | ⎞ ⎠ | = |
− | ⎛ ⎜ ⎜ ⎝ |
d
dx
| y | ⎛ ⎝ | x | ⎞ ⎠ | ⎞ ⎟ ⎟ ⎠ |
2
| −1
2 y | ⎛ ⎝ | x | ⎞ ⎠
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦

It is easier to solve the first equation for y which can be rewritten as

dy
dx
| =− |
√
C
x
| −1

for appropriate C, which can be solved by separation of variables, getting you the parametric equations

⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩ |
x= |
1
2
| C | ⎛ ⎝ | 2θ −sin(2θ) | ⎞ ⎠
y= |
1
2
| C | ⎛ ⎝ | 1 −cos(2θ) | ⎞ ⎠

which parameterize a cycloid. This implicitly defines a function y=y(x) as the only stationary function for L. The problem is to prove that it minimizes T, which would be easy if the integrand L was convex. However, it’s not the case here:

assume(y>=0):; convex(sqrt((1+y'^2)/y),y(x))

| ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ | − | ⎛ ⎜ ⎜ ⎝ |
d
dx
| y | ⎛ ⎝ | x | ⎞ ⎠ | ⎞ ⎟ ⎟ ⎠ |
2
| +3≥ 0 | ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦

This is equivalent to |y′(t)|≤√3, which is certainly not satisfied by the cycloid y near the point x=0.

Using the substitution y(x)=z(x)2/2, you get y′(x)=z′(x) z(x) and

L(x,y(x),y′(x))=P(x,z(x),z′(x))= | √ |
2(z(x)−2+z′(x)2)
| .

The function P is convex:

assume(z>=0):; convex(sqrt(2*(z^(-2)+z'^2)),z(x))

true |  |  |  |  |  |  |  |  |  |

Hence the function z(t)=√2 y(t), stationary for P (verified directly), minimizes the objective functional

U(z)= | ∫ |
x1
0
| P(x,z(x),z′(x)) dx.

From here and U(z)=T(y) it easily follows that y minimizes T and is therefore the brachistochrone.