In general I would like to know how to minimise fuel mass spent for an orbiting body that continuously jettisons its mass (i.e. ion thruster) so as to perform efficient transfer maneuver in heterogenous gravitational field.
But for the sake of this question let us consider the simpler case: We have a body in 1D space with a given initial position $x_0$ and velocity $v_0$ and we want it to transfer to a given position $x_1$ at given time $t1$. Gravitational acceleration $-g$ is constant. Mass of the body is mass of fuel $mp$. Jettisoned mass velocity is constant (relatively to the body)$vs$.
I tried solving it by the means of Hamilton principle, where Lagrangian can be: $$L=T-V+W$$ Where the work done by the the thrust is: $$\text{W}\text{=}\int \text{vs} \frac{d \left(\text{mp}\left(t_0\right)-\text{mp}(t)\right)}{dt} \sqrt{x'(t)} \, dt$$ and kinetic and potential energy is: $$T\text{=}\frac{1}{2} \text{mp}(t) x'(t)^2$$ $$V\text{=}g \text{mp}(t) x(t)$$
Then by incorporating Euler-:Lagrange equation:
$\frac{d \frac{\partial L}{\partial \frac{d q_i}{dt}}}{dt}=\frac{\partial L}{\partial q_i}$
Assuming the jettisoned mass is a generalized coordinate then we have 2 equations: $$\left\{-\frac{\text{vs} \text{mp}'(t) x'(t)}{\sqrt{x'(t)^2}}+\text{mp}'(t) x'(t)+\text{mp}(t) x''(t)=-g \text{mp}(t),-\text{vs} \sqrt{x'(t)^2}=\frac{1}{2} x'(t)^2-g x(t)\right\}$$ -I’ve expected it would yield me the function $mp(t)$ – that would show the lowest mass spent for given given position at tgiven time. Unfortunately these equations rather show this is a DAE system and mass cant be a generalized coordinate here because of dependency to position of a body. I think my approach is dead end, isn’t it? How can I minimize the fuel spent the right way for mentioned case? Ive tried but havent found an alternative solution so far.