# Trying to get my head around the Lagrangian

#### kiwiheretic

In the calculus of variation they set up the problem as action S

$image=http://latex.codecogs.com/png.latex?S+=+\int^a_b+f+[+y(x),+y^{+\prime+}+(x),+x+]+dx&hash=99958cb3f51b17e679a2895ba1e98013$

where
$image=http://latex.codecogs.com/png.latex?Y(x)+=+y(x)+++\eta+(x)&hash=74d39e01f549f913983f6bb44a5acf74$
and
$image=http://latex.codecogs.com/png.latex?\eta+(x_1)=\eta+(x_2)+=+0&hash=806297617ef235a3e2effcbe9effc9ef$

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
$image=http://latex.codecogs.com/png.latex?\eta+(x_1)=\eta+(x_2)+=+0&hash=806297617ef235a3e2effcbe9effc9ef$
applies?

How does this work in that case?

#### kiwiheretic

ok, I misread the Brachistochrone problem. it also involves two points and finding a path between them.