No constrains affecting L.-E. equations,

**(A)** but there is a constrain $u(0)=0$, $u(a)=h$

**(B)** In fact, one can remove the last constrain.

With (A) we are looking for the fastest slide between two points (so given are horizontal projection and the difference in heights)

With (B) only horizontal projection..

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