How can I calculate the distance an accelerating object will be pulled by another object in a given amount of time?
I am creating a simulation of space objects interacting with each other. To test the strength of gravity, Earth does not orbit the sun but will be pulled into it. The Earth will start slowly, and accelerate. I know the time, initial speed, distance between the two objects at the start of the time, and both objects' masses. This question is different from this question because that question assumes that the Earth isn't already accelerating. Thanks.
Edit: To garyp, sorry, I didn't want to just repeat the title above, but basically, it's the second offered. "how to calculate that distance for large (say a month, so that the acceleration will obviously change) intervals of time?"
This is not a homework question, and only mentions that I am creating a simulation so that it is known that I don't want the actual acceleration of Earth or an explanation of why the Earth doesn't fall into the Sun. I wanted an equation of distance fallen over time, which would be useful to the broader community, and to future users. I wasn't the one who tagged it as a homework and exercises question, so sorry about that.