I have to use the Euler Lagrange Equation on a special form of the brachistochrone, which includes gravity. So the formular would be:
$$ T[y]=\int_{a}^{b}\tfrac{\sqrt{1+y'((x))^2}}{\sqrt{(y(x)g(x)}} $$
I then have the ELE:
$$ 0=\tfrac{df}{dy}-\tfrac{d}{dx}(\tfrac{df}{dy'}) $$
and got
$$ \tfrac{\sqrt{1+y'^2}}{\sqrt{(y^3g}}=\tfrac{d}{dx}(\tfrac{1}{\sqrt{y}} \cdot \tfrac{1}{\sqrt{g}} \cdot y' \cdot \tfrac{1}{\sqrt{1+y'^2}}) $$
which all in all I brought down (using product rule for the derivative) to
$$-g \cdot (1+y'^2)=-g'yy' \cdot (1+y'^2)+2y''yg $$
For easier writing I stopped using the arguiment (x) in the end, I hope it is okay. How do I continue from here? I have seen approaches with the normal ELE, which use finding the right term for a derivative and then integrating, but I can't find it here. Could anybody help me?
Thanks in advance. I hope, I did not make any mistakes in calculating or writing the code here.
Since your Lagrangian, i.e. the function $f$, is independent of $x$, you cannot use the Euler-Lagrange equations. Instead, use the Beltrami's identity, which is a degenerate case of the Euler-Lagrange equations.
So if you had to optimise $I$, $$I=\int_a^b f(y,y') dx$$ Then use the Beltrami's identity, $$f-y'\dfrac{\partial f}{\partial y'} =c$$ Where $c$ is an arbitrary constant. This should simplify your equation tremendously.
This means in your case, the Lagrangian would be $$f(y,y')=\dfrac{\sqrt{1+(y')^2}}{\sqrt{yg}}$$ Applying the Beltrami's identity, $$\dfrac{\sqrt{1+(y')^2}}{\sqrt{yg}}-y'\dfrac{\partial}{\partial y'}\left[\dfrac{\sqrt{1+(y')^2}}{\sqrt{yg}}\right]=c$$ $$\dfrac{\sqrt{1+(y')^2}}{\sqrt{yg}}-\dfrac{(y')^2}{\sqrt{yg}}\dfrac{1}{\sqrt{1+(y')^2}}=c$$ $$\dfrac{1}{\sqrt{yg}\sqrt{1+(y')^2}}=c$$ $$\sqrt{1+(y')^2}=\dfrac{1}{c\sqrt{yg}}$$ $$y' = \sqrt{\dfrac{1}{c^2gy}-1}$$