Trying to get my head around the Lagrangian

Nov 2013
552
30
New Zealand
In the calculus of variation they set up the problem as action S



where
and


In the case of finding the shortest distance between two points this makes sense but in the case of finding the path of least time as in a roller coaster shaped like a e Brachistochrone
I am not getting why the case of
applies?

How does this work in that case?
 
Nov 2013
552
30
New Zealand
ok, I misread the Brachistochrone problem. it also involves two points and finding a path between them.