I am gathering my mechanics notes and I put into it some examples. When I get the Hamilton principle I put a section for some basic variation calculus. There's the problem of brachistochrone, I try to solve it, but I get stuck with a integral: the integral that I should make minimal is (I'm so sorry, but I don't know how to put it in LaTex): t=int((sqrt(1+((dy/dx)^2))/sqrt(2gy))dx) and from the variation calculus, the y must be the one that complies: df/dy-(df/(dy/dx))/dx=0 where f=(sqrt(1+((dy/dx)^2))/sqrt(2gy)). then calculating the partial derivatives of f and putting them into the eq: m(1+((dy/dx)^2))+2y(dy/dx)(dm/dx)=0 or m(1+(y'^2))+2yy'(dm/dx) where y'=dy/dx and m=(1/f)(y'/(gy)) The question is how to integrate it? or which change of variable is good to integrate it in order to get the eq of the brachistochrone? NOTE: I have tried to separate variables, but this is impossible.