In physics, the acceleration of an object in the gravitational field of a mass M (e.g. the sun) is given by
$a = \frac{G\,M}{d^2}$
or written in a more mathematical way
$x'' = \frac{G\,M}{x^2}$
with the derivation ' with respect to the time.
Integrating once you get
$x' = G\,M\,\int{\frac{dt}{x^2}}$
But then what? I am really stuck on what to then next, or how to solve this problem. I want to calculate the relationship between the distance and the time it takes to cover this distance. So basically I am looking for an equation
$x = f(t)$
and how to come to this solution.
In the end I want to calculate e.g. the time it takes for an object to free fall from the starting distance at earth's location $x_0=150$ Million km with $v_0=0$ to the surface of the sun at $x_1=700000$ km?
The solution should be about $5.585\,\mathrm{x}\,10^6$ seconds, if my numerical integration python code is correct ...
Since the question of gravitational force is classic, so is the solution to this problem! Let v= dx/dt. Then $x''= a= dv/dt= (dx/dt)(dv/dx)= v dv/dx= \frac{GM}{x^2}$. $v dv= GM\frac{dx}{x^2}$.
Integrating both sides $\frac{1}{2}v^2= -\frac{GM}{x}+ C$. We can write that as $\frac{1}{2}v^2+ \frac{GM}{x}= C$ and, multiplying by m, the mass of the object, we get $\frac{1}{2}mv^2+ \frac{GMm}{x}= Cm$ which is "conservation of energy". The first term, $\frac{1}{2}mv^2$ is the kinetic energy and the second term, $\frac{GMm}{x}$ is the gravitational potential energy.