I have made a program in Matlab to plot the path of a projectile with air resistance, however, I am lost as to how to obtain an equation for the range. I have found my displacements in the x and y direction by solving second order differential equations, it would be far too difficult to set the y equation to zero and hence solve for the time. Basically I want a way of obtaining a formula to show the maximum distance travelled by the projectile in the x direction. If the projectile did not have air resistance then this would be easy as one would simply have to set the equation for vertical height to zero and solve for the time, this time is the total time of flight. However, when considering air resistance I am just finding it too difficult.