I've been trying to derive the rocket equation ($ m \ddot{x} = - \dot{m} v_e $) from Hamilton's Principle and I've hit a wall. The way I went about it was by extremizing the action $ S = \int L dt $, where $ L = K_{rocket} + K_{exhaust} $. That way the system (rocket + exhaust) is closed, and so in theory, Hamilton's Principle should apply. In particular, $ K_{rocket} = \frac{1}{2} m \dot{x}^2 $ and $$ K_{exhaust} = \int \frac{1}{2} (-dm) ( \dot{x} - v_e)^2 \implies K_{exhaust}(t) = - \frac{1}{2} \int_{t_0}^{t} \dot{m}(\tau) ( \dot{x}(\tau) - v_e)^2 d\tau .$$ This was more or less already addressed in the Stack Exchange (see The Tsiolkovsky equation derived via the Lagrange funtion), but inconclusively. In advance, thank you for helping or even just reading; I really appreciate it! (Please excuse any formatting issues — I’m new to Stack Exchange and still learning the ropes)
My issue comes down to this. Extremizing the action corresponding to $ L = K_{rocket} + K_{exhaust} $ does not result in the Rocket Equation as the EOM. However, extremizing the action corresponding to $ L = K_{rocket} - K_{exhaust} $ does result in the Rocket Equation as the EOM. I simply do not understand why. My work is as follows:
Suppose, in general, we have the following action:
$$ S = \int_{t_0}^{t_1} \left( G(t,x(t),\dot{x}(t))+\int_{t_0}^{t}f(\tau,x(\tau),\dot{x}(\tau))d\tau \right) dt $$
Now, $S$ can be rewritten as such:
$$ S = \int_{t_0}^{t_1} G(t,x(t),\dot{x}(t)) \; dt + \int_{t_0}^{t_1}\int_{t_0}^{t} f(\tau,x(\tau),\dot{x}(\tau)) \; d\tau \; dt \\ = \int_{t_0}^{t_1} G(t,x(t),\dot{x}(t)) \; dt + \int_{t_0}^{t_1}\int_{\tau}^{t_1} f(\tau,x(\tau),\dot{x}(\tau)) \; dt \; d\tau \\ = \int_{t_0}^{t_1} G(t,x(t),\dot{x}(t)) \; dt + \int_{t_0}^{t_1}\int_{t}^{t_1} f(t,x(t),\dot{x}(t)) d\tau \; dt \\ = \int_{t_0}^{t_1} G(t,x(t),\dot{x}(t)) \; dt + \int_{t_0}^{t_1} (t_1-t)f(t,x(t),\dot{x}(t)) \; dt \\ = \int_{t_0}^{t_1} G(t,x(t),\dot{x}(t)) + (t_1-t)f(t,x(t),\dot{x}(t)) \; dt $$
From here, the variation of the action will be taken with respect to $x$:
$$ \delta S = \delta \int_{t_0}^{t_1} G(t,x,\dot{x}) + (t_1-t)f(t,x,\dot{x}) \; dt \\ = \int_{t_0}^{t_1} \delta G(t,x,\dot{x}) + (t_1-t) \delta f(t,x,\dot{x}) \; dt \\ = \int_{t_0}^{t_1} \frac {\partial G}{\partial x} \delta x + \frac {\partial G}{\partial \dot{x}} \delta \dot{x} + (t_1-t) \left( \frac {\partial f}{\partial x} \delta x + \frac {\partial f}{\partial \dot{x}} \delta \dot{x} \right) dt \\ = \int_{t_0}^{t_1} \left( \left( \frac {\partial G}{\partial x} + (t_1-t) \frac {\partial f}{\partial x} \right) \delta x + \left( \frac {\partial G}{\partial \dot{x}} + (t_1-t) \frac {\partial f}{\partial \dot{x}} \right) \delta \dot{x} \right) dt $$
Then by using IBP and $ \delta x (t_0) = \delta x (t_1) = 0 $:
$$ \delta S = \int_{t_0}^{t_1} \left( \left( \frac {\partial G}{\partial x} + (t_1-t) \frac {\partial f}{\partial x} \right) \delta x - \frac{d}{dt} \left( \frac {\partial G}{\partial \dot{x}} + (t_1-t) \frac {\partial f}{\partial \dot{x}} \right) \delta x \right) dt \\ = \int_{t_0}^{t_1} \left( \frac {\partial G}{\partial x} + (t_1-t) \frac {\partial f}{\partial x} - \frac{d}{dt} \left( \frac {\partial G}{\partial \dot{x}} + (t_1-t) \frac {\partial f}{\partial \dot{x}} \right) \right) \delta x \; dt $$
Now, after applying Hamilton's Principle ($ \delta S = 0$):
$$ \frac {\partial G}{\partial x} + (t_1-t) \frac {\partial f}{\partial x} - \frac{d}{dt} \left( \frac {\partial G}{\partial \dot{x}} + (t_1-t) \frac {\partial f}{\partial \dot{x}} \right) = 0 \\ \implies \frac {\partial G}{\partial x} - \frac {d}{dt} \frac {\partial G}{\partial \dot{x}} + (t_1-t) \left( \frac {\partial f}{\partial x} - \frac {d}{dt} \frac {\partial f}{\partial \dot{x}} \right) + \frac {\partial f}{\partial \dot{x}} = 0 $$
Here's where I start making sketchy decisions... Let $t_1 = t$, effectively restricting the action to the time interval containing the initial and current time:
$$ \implies \frac {\partial G}{\partial x} - \frac {d}{dt} \frac {\partial G}{\partial \dot{x}} + \frac {\partial f}{\partial \dot{x}} = 0 $$
As a gut check, plugging in $ G(t,x,\dot{x}) = \frac{1}{2} m \dot{x}^2 $ and $ f(t,x,\dot{x}) = -kx \dot{x} = \frac{d}{dt} \left( - \frac{1}{2} kx^2 \right) $, which should be the same as choosing $ L = \frac{1}{2} m \dot{x}^2 - \frac{1}{2} kx^2 $, results in the EOM of $ \; m \ddot{x} + kx = 0 \; $ as expected.
Now, for the rocket-exhaust system, choosing $ G(t,x,\dot{x}) = \frac{1}{2} m \dot{x}^2 $ and $ f(t,x,\dot{x}) = - \frac{1}{2} \dot{m}(t) ( \dot{x} - v_e )^2 $, corresponding with $ L = K_{rocket} + K_{exhaust} $, results in an EOM of $ \; m \ddot{x} + 2 \dot{m} \dot{x} - \dot{m} v_e = 0 $, which is definitely not the rocket equation! What's bizarre is that choosing $ f(t,x,\dot{x}) = \frac{1}{2} \dot{m}(t) ( \dot{x} - v_e )^2 $ (keeping $G$ the same), corresponding with $ L = K_{rocket} - K_{exhaust} $, results in an EOM of $ \; m \ddot{x} + \dot{m} v_e = 0 $, which is the rocket equation! But how? What on Earth is going on?!