Lets say we shoot a rocket from Earth and assume it starts with a base velocity. For something close to Earth one would use this to calculate its height depending on time etc. $$ \frac{1}{2}at^2 + v_0t + h_0 = h(t) $$ If we try to calculate its height, we have to consider that the acceleration drops depending on its height. Thus the output of the function depends on itself (recursive). Normally I would solve this by programming, but I am interested if there is a "prettier" method. I know about using energies to calculate the height, but this method cannot be used if i have something like air friction or a continuous thrust.
Does somebody know about ways to calculate such trajectories or is it common to do it using programs with small timesteps.