I'm trying to find the solution of the brachistochrone problem. I'm was wondering if there is a way to solve it directly using Mathematica. The problem is the following:
$$J[t]=\frac1{\sqrt 2 g}\int_{y_1}^{y_2}\frac{\sqrt{1+y^{\prime 2}}}{\sqrt y}\,dy$$
I have to find the equation $y(x)$ that minimizes the functional $J[t]$. This functional ($y(x)$) is the path of minimum time that a body will move from a point $y_1$ to a point $y_2$.
To achieve that, it is needed to use the Euler equation:
$$\frac{df}{dy}-\frac{d}{dx}\left(\frac{df}{dy^\prime}\right)=0$$
where
$$f=\frac{\sqrt{1+y^{\prime 2}}}{\sqrt y}$$
The code below is the solution of the Euler equation that I was trying to integrate without success.
Integrate[(-1 - y'[x]^2 - 2 y[x] y''[x])/(
2 y[x]^(3/2) (1 + y'[x]^2)^(3/2)), {y[x], 0, 1}]
This code returns:
Integral of
(-1-(y^\[Prime])[x]^2-2 Integrate`$$a$201005 (y^\[Prime]\[Prime])[x])/Integrate`$$a$201005^(3/2)
does not converge on{0,1}
. >>
Integrate
. You would have to useDSolve
for it, but I'm also not sure where it's coming from and don't feel like trying to figure out how you arrived at it. You might want to read up on the treatment of the brachistochrone problem, e.g., on Wolfram MathWorld, and then start with the Beltrami equation. As an aside, in your equations above the gravitational constant belongs underneath the square root. $\endgroup$Applications
in the documentation forEulerEquations
, the problem is discussed there. A solution is also given, but it's not found usingDSolve
. $\endgroup$VariationalMethods
package: reference.wolfram.com/language/VariationalMethods/guide/… $\endgroup$