Calculus of variations for the functional $I[x]=\int_{t_0}^{t_1}\frac{1}{x} + \frac{(\dot{x})^2}{x} \ dt$ My question concerns the functional
$$I[x]=\int_{-4}^{4}\frac{1}{x} + \frac{(\dot{x})^2}{x} \ dt$$
and what $x$ makes the functional stationary, where $(t, x)$ ranges from $(-4, 3)$ to $(4, 3)$. I have obtained the following from Euler-Lagrange: $2x\ddot{x}=(\dot{x})^2-1$. I am told that the correct answer has the form $x(t) = \frac{1}{c}-\frac{ct^2}{4}$ for some constant $c$. 
Where am I going wrong? The DE I obtained seems way too complicated and I cannot think of a way of solving it. I am fairly new to Calc. of Variations, so a full solution would be much appreciated.
 A: The DGL, you have derive is correct. You question is how to solve it. For this it is import to know that given the fact that the DGL derives from a Lagrangian gives insights towards the solution.
In particular, in this case, the Lagrangian does not depend on $t$. With that you immediately can integrate the DGL once and reduce it to a first order DGL! In fact, what is called the `energy' $$E = \dot x \frac{\partial L}{\partial \dot x} - L = \frac{\dot x^2 -1}{x} \tag{1}$$
is conserved (that is it does not change over time).
This can be easily checked
$$ \frac{d}{dt} E = \frac{d}{dt}\frac{\dot x^2 -1}{x} =\frac{2 x \ddot x}{x} - \frac{\dot x (\dot x^2 -1)}{x^2} =\frac{\dot x (2 x \ddot x -\dot x^2 +1)}{x^2} = 0$$
due to the Euler-Lagrange equation.
So the remaining task is to integrate (1) once. The equation is separable and we obtain
$$\int_3^x \frac{dy}{\sqrt{E y -1}}= \frac{2}{E} \Bigl(\sqrt{1+ Ex}-\sqrt{1+3E}\Bigr) = t+4\;. \tag{2}$$
The boundary condition $(4,3)$ immediately determines the constant $$E=-\frac{1}{4}\;.$$
Solving (2) for $x$ yields the result $$ x= 4-\frac{1}{16} t^2\;. $$
