How to solve this ODE: $\ddot{y}+\frac{1}{2f(y)}\frac{df(y)}{dy}(\dot{y})^2=0$ Initial conditions are $y(0)=A,\dot{y}(0)=B$, and $f(\cdot)>0$ is a given function.
Thanks!
 A: Multiply everything by $2f(y) \dot{y}$. Then you have
$$ f(y) \cdot 2 \dot{y} \ddot{y} + f'(y) \dot{y} \cdot \dot{y}^2 = 0 $$
The important thing to notice here is that
$$ \frac{d}{dt} (\dot{y}^2) = 2\dot{y} \ddot{y}, $$
and
$$ \frac{d}{dt} (f(y)) = f'(y) \dot{y}, $$
so what you have here is a total derivative,
$$ \frac{d}{dt}  \left( \dot{y}^2 f(y) \right) = 0 $$
Therefore, integrating once,
$$ \dot{y}^2 f(y) - B^2 f(A) = C, $$
and $C=0$ by the boundary conditions. You can only now say
$$ \dot{y} \sqrt{f(y)} = \pm B^2 f(A), $$
which you can't get any further with unless you know what $f$ is: you can just rewrite it as
$$ \int_A^y \sqrt{f(Y)} \, dY = \pm B^2 f(A) t, $$
by integrating from $0$ to $t$ and substituting on the left.
A: Please Note:  I think we've really got to hand to Chappers on this one; his solution method is most excellent, dealing with it does with the potentially problematic case $\dot y = 0$ without resorting to extended "exception handling" as might be required in the (admittedly incomplete) solution I've posted below.  Hopefully, I can return to this answer in short order and iron out some of the wrinkles, but before I rush off to work I thought I'd put forward a different technique for arriving at the solution.  Caveat emptor!!!  The attentive reader may observe there are issues with signs I haven't fully addressed (yet).  But hopefully a different view of things will yield some, if imperfect, insight.  End of Note.
Given the equation
$\ddot{y}+\dfrac{1}{2f(y)}\dfrac{df(y)}{dy}(\dot{y})^2=0, \tag{1}$
we can, assuming for the moment that $\dot y \ne 0$, divide by $\dot y$ to obtain
$\dfrac{\ddot y}{\dot y} + \dfrac{1}{2f(y)} \dfrac{df(y)}{dy} \dot y = 0; \tag{2}$
we observe that
$\dfrac{d \ln \dot y}{dt} = \dfrac{\ddot y}{\dot y} \tag{3}$
and that
$\dfrac{d \ln f(y)}{dt} = \dfrac{1}{f(y)} \dfrac{df(y)}{dy} \dot y; \tag{4}$
we thus find
$\dfrac{d \ln \dot y}{dt} + \dfrac{1}{2}\dfrac{d \ln f(y)}{dt} = 0, \tag{5}$
or
$\dfrac{d( \ln \dot y + \frac{1}{2} \ln f(y))}{dt} = 0; \tag{6}$
it follows from (6) that
$\ln \dot y + \frac{1}{2} \ln f(y) = C, \;\; \text{ a constant}; \tag{7}$
re-arranging
$\ln (\dot y (f(y))^{1/2}) = C, \tag{8}$
or
$\dot y (f(y))^{1/2} = e^C > 0. \tag{9}$
With
$y(0) = A, \dot y(0) = B \tag{10}$
we see via (8) that
$C = \ln (B (f(A))^{1/2}), \tag{11}$
whence
$e^C = B(f(A))^{1/2}, \tag{12}$
so that (9) becomes
$\dot y (f(y))^{1/2} = B(f(A))^{1/2}. \tag{13}$
Integrating with respect to $t$, (13) yields
$\int_A^y (f(s))^{1/2}ds = B(f(A))^{1/2}t, \tag{14}$
the result reached by Chappers via a different path.  
A: $\textbf{hint}$
$$
\ddot{y} = \frac{1}{2}\dfrac{d}{dy}\dot{y}^2
$$
And
$$
\dfrac{d}{dy}\ln f(y) = \frac{1}{f(y)}\frac{df(y)}{dy}
$$
