I have a question about gravity: How do i formulate an equation that incorporates the change in distance between two objects- in other words, where the acceleration due to gravity is changing as the distance changes, instead of simply where the acceleration is held constant. Here's how far ive gotten: y=-.5ax^2+sx+d where y is location(distance) and x is time. s is initial velocity and d is initial location and a is acceleration due to gravity. But just one simple change and things become much more complicated. Suppose i want to include the change in acceleration. I use a=gm/d^2 where a is the acceleration, g is the gravitational constant, m is the mass of the planet, and d is distance. Which means d^2y/dx^2=gm/y^2, so y'' is a function of y and not a function of x. That's my problem. How do i integrate the derivative when the derivative is a function of the dependent variable? I need to know the function of x that equals y in order to integrate, but i need to integrate to find the function of x that equals y. So im kind of left going in circles trying to solve an impossible problem. I cant figure out how to integrate this. I could try integrating to find dx/dy, which would be the inverse of velocity(time/distance instead of distance/time), and manipulate that to get something meaningful, but im unsure whether thats even possible. I dont think i can simply replace a with gm/y^2, but im not sure because this is really confusing me. when i differentiate implicitly to find velocity after replacing a with gm/y^2, i get dy/dx=f[x,y]. Now i have to differentiate velocity=dy/dx to find acceleration=d^2y/dx^2 and verify whether the second derivative equals gm/y^2. But how do i find the second derivative when the first derivative is a function of both variables? this seems to be related to the problem that y'' is a function of y, and y is a function of both x and y''. That's why i dont think i can simply replace a with gm/y^2. The problem is, whenever i would evaluate y at a moment in x after replacing a with gm/y^2, it will be as if the acceleration at that moment in time has been the acceleration at all previous times. But then again, im not sure. I think whats happening here is the function itself actually changes into another function as the variables change. This is really confusing me. The only way i figure i can solve this is by splitting space(splitting time would be simpler because i wouldnt have to solve a million quadratics, but i dont think incrementalizing time would be as accurate.) into increments. I would solve the first problem, then plug the variables and its derivatives at the end of that increment into the next problem, adjust for acceleration using gm/y^2, solve the next problem, and then keep repeating that over and over until i go insane from mindless calculations, knowing that i havent actually solved the dynamics of the problem. Theres no freaking way im going to attempt that.