I tried to solve a physics problem about two body problem where the masses $M$ and $m$ are $M \gg m$. The body $m$ is at radius $R$ from the mass $M$ and is falling down with initial speed $v(0) = 0$. I need to calculate the time of falling.
The point is not how can I solve it the problem (I have found a better way).
I tried to find the solution it by solving the differential equation $$\ddot x(t) = \frac{k}{x(t)^2}$$ but had no success. The way I tried is the following: $$ \dot x \ddot x = \frac{k}{x^2} \dot x \\ \frac{1}{2} D[(\dot x)^2] = k \frac{\dot x}{x^2} \\ \int \frac{1}{2} D[(\dot x)^2]\ dt = k \int \frac{\dot x}{x^2}dt\\ \frac{1}{2}(\dot x)^2 = -k \frac{1}{x} + C \\ \dot x = \sqrt{-2k\frac{1}{x} + C} $$
which doesn't seem correct to me.
I want to solve it using clever tecniques (by clever I mean multiply or add a nice terms and make calculations almost instant).
Could you suggest me something?
What you have done seems correct to me - and also quite simple. You got the multiply-by-$\dot{x}$ trick which is the 'standard' way to solve this. I think it will be hard finding a much easier route. To complete the solution, you only need to fix the value of $C$ and integrate up once more. This is also fairly simple since from
$$\dot{x} = \sqrt{-\frac{2k}{x}+C}$$
we can use $v(0)=0 \to C = \frac{2k}{R}$ (particle starts at $x=R$ and falls to $x=0$) and then (using $k=-GM$)
$$T =\int dt = \int \frac{dx}{\dot{x}} = \int_{0}^{R} \frac{dx}{\sqrt{\frac{2k}{R}-\frac{2k}{x}}} = \sqrt{\frac{R^3}{2GM}}\int_{0}^{1} \frac{dy}{\sqrt{\frac{1}{y}-1}} = \frac{\pi}{2}\sqrt{\frac{R^3}{2GM}}$$
Solving the last integral is probably the most tricky part here (I cheated using math software). Also, from a 'physics point of view', all the important parts have already been done when you get to that last integral. What remains is just a calculation (which in principle can be done numerically if you cannot solve it).
EDIT: Another way to get to the $\dot{x}$ equation above is to use conservation of energy during the fall. The total energy is equal to the initial energy:
$$\frac{1}{2}m\dot{x}^2 - \frac{GMm}{x} = \frac{1}{2}m0^2 - \frac{GMm}{R}$$
which gives
$$\dot{x} = \sqrt{\frac{2GM}{x} - \frac{2GM}{R}}$$
directly.