Deriving the Ideal Rocket Equation