A rocket works on conservation of momentum. The expelled gases from the engine propel the rocket upward. The thrust is given by
F = vo(dm/dt)
where vo is the exhaust gas speed and dm/dt is the burn rate (r). The burn time tb is given by
tb = MF/r
where MF is the mass of the fuel. The velocity at burnout (vb) is given by
vb = voLn(R) - gtb
where M = (MF + Mo)/M0 and Mo is the Mass of the empty rocket.
Its height at burnout (yb) is
yb = votb - (1/2)gtb2 + MorLn(R)/r
After burn out it achieves a final height of
y = yb + vb2/2g.
In the movie at the left you can specify the parameters r, vo and MF. Launch the rocket by clicking on it. In general, you want to get the most height for the least amount of fuel. The simulation assumes constant g (it would vary by 15% over 500 km) and no air resistance. The first would increase the height; the second would decrease it.