Solve $f^2(x)=\frac{k}{f''(x)}$ While studying physics I have many time stumbled upon forces that are directly affected by the position of a particle. Moreover given $f(x)$ how could we approach solving the equation:
$$f^2(x)=\frac{k}{f''(x)}$$
I am new to differential equations and I would really appreciate if someone could explain the thinking process and the steps needed to reach a solution. Thanks in advance.
 A: Well, we have that (multiply both sides by $\text{f}\space'\left(x\right)$):
$$\text{f}\left(x\right)^2=\frac{\text{k}}{\text{f}\space''\left(x\right)}\space\Longleftrightarrow\space\int\text{f}\space'\left(x\right)\text{f}\space''\left(x\right)\space\text{d}x=\int\text{f}\space'\left(x\right)\cdot\frac{\text{k}}{\text{f}\left(x\right)^2}\space\text{d}x\tag1$$
We get, when we use:


*

*$$\int\text{f}\space'\left(x\right)\text{f}\space''\left(x\right)\space\text{d}x=\frac{\text{f}\space'\left(x\right)^2}{2}+\text{C}_1\tag2$$

*$$\int\text{f}\space'\left(x\right)\cdot\frac{\text{k}}{\text{f}\left(x\right)^2}\space\text{d}x=\text{C}_2-\frac{\text{k}}{\text{f}\left(x\right)}\tag3$$


So:
$$\frac{\text{f}\space'\left(x\right)^2}{2}=\text{C}_3-\frac{\text{k}}{\text{f}\left(x\right)}\space\Longleftrightarrow\space\int\frac{\text{f}\space'\left(x\right)}{\sqrt{\text{C}_3-\frac{2\text{k}}{\text{f}\left(x\right)}}}\space\text{d}x=\int\pm1\space\text{d}x=\text{C}_4\pm x\tag4$$
For the intergal, substitute $\text{u}=\text{f}\left(x\right)$:
$$\int\frac{\text{f}\space'\left(x\right)}{\sqrt{\text{C}_3-\frac{2\text{k}}{\text{f}\left(x\right)}}}\space\text{d}x=\int\frac{1}{\sqrt{\text{C}_3-\frac{2\text{k}}{\text{u}}}}\space\text{d}\text{u}\tag5$$
A: A general procedure is as follows:
$$f^2(x)=\frac{k}{f''(x)}$$
$$\implies f''(x)=\frac{k}{f^2(x)}$$
$$\implies 2f'\cdot f''(x)=\frac{k}{f^2(x)}\cdot 2f'$$
$$\implies (f'^2)'=-2k\cdot \left(\frac{1}{f}\right)'$$
Where $'$ means first order derivative with respect to $x$ and $"$ means second order derivative with respect to $x$
So integrating, we get
$$f'^2=-\frac{2k}{f}+c$$
$$\implies f'=\sqrt{c-\frac{2k}{f}}$$
$$\implies \frac{df}{\sqrt{c-\frac{2k}{f}}}=dx$$
Can integrate this now?
Hope this helps you.
A: Along with the brilliant answer from Jan EerLand.
$$
f''= f'\frac{d}{df}f' = \frac{k}{f^2} 
$$
Sidenote: The first equality is a result of my physics undergrad days.
$$
\frac{d}{df}\frac{f'^2}{2} = \frac{k}{f^2} 
$$
or
$$
\frac{f'^2}{2} = \int \frac{k}{f^2} df  + C = -\frac{k}{f} + C
$$
then you can re-arrange and follow Jan's answer.
A: Putting $y = f(x)$, we have
$$y^{\prime\prime} = \frac{k}{y^2}.$$ 
Now multiplying both sides by $2y^\prime$, we get
$$2y^\prime y^{\prime\prime} =  \frac{2ky^\prime}{y^2},$$
which can be rewritten as
$$\left( \left( y^\prime \right)^2 \right)^\prime  =  \frac{2ky^\prime}{y^2} = \frac{\mathrm{d}}{\mathrm{d} x} \left( - \frac{2k}{y} \right),$$
which upon integration of both sides gives
$$ \left( y^\prime \right)^2 = c -\frac{2k}{y},$$
where $c$ is an arbitrary constant of integration. So
$$ y^\prime = \left( c -\frac{2k}{y} \right)^{\frac{1}{2}},$$ and therefore 
$$ \frac{y^\prime  }{ \left( c -\frac{2k}{y} \right)^{\frac{1}{2}} } = 1,$$
which we can rewrite as 
$$ \frac{ y^\frac{1}{2} y^\prime }{\left( cy - 2k \right)^\frac{1}{2} } = 1, $$
or $$ \frac{1}{c^\frac{1}{2}} \left( \frac{y}{ y - \frac{2k}{c} } \right)^\frac{1}{2} y^\prime = 1.$$
Can you take it from here on?
