I thought it would be fun to make a basic simulation of a first-stage fly-back of SpaceX's Falcon 9, but was wondering what mathematics is used to perform something like this. Looking at this page: http://en.wikipedia.org/wiki/Trajectory_of_a_projectile, there is a nice equation for calculating the distance a projectile will cover, but this is based on a flat earth, constant gravitational acceleration and an absence of drag. Furthermore, using this formula would also imply an instantaneous delta-v change for it to be accurate (unless we re-calculate $d$ every second or so during engine burn in order to get a more accurate result), which is also rather unrealistic considering the time scales involved.
So my question is this: If we consider the Falcon 9 first-stage to be a point mass so that we don't need to worry about 6 DOF attitude dynamics, and also only look at 2 dimensions instead of having to worry about a 3D spherical Earth, what equations would be used in order to accurately calculate the required burn time needed to get the Falcon 9 first-stage to within a few kilometres of its intended surface target when taking atmospheric drag and a circular Earth into consideration. Any links to informative websites covering something like this, or academic papers would be greatly appreciated. Thanks!