I'm struggling with an optimization problem:
Suppose you have the amount spent on gas from 0 to a time T as $u=\int_0^T|f| dt$, where $\textbf{f}=m(\ddot{x}, \ddot{y}(t),\ddot{z}(t)+k)$ with k a constant, and $|f|^2=f_x^2+f_y^2+f_z^2$. I want to find the parametric function that minimizes spent gas. For this, I used Euler-Lagrange equations $(\frac{d}{dt}(\frac{\partial f}{\partial \dot{p_i}}) - \frac{\partial f}{\partial p_i} = 0$ with $p_i = \{v_x, v_y, v_x\} = \{\dot{x},\dot{y}, \dot{z}\}$) and got the following:
$$\dot{f_x} =\frac{f_x(\dot{f_y}f_y + \dot{f_z}f_z)}{({f_z^2 + f_y^2 })}$$
$$\dot{f_y} =\frac{f_y(\dot{f_x}f_x + \dot{f_z}f_z)}{({f_x^2 +f_z^2})}$$
$$\dot{f_z} =\frac{f_z(\dot{f_x}f_x + \dot{f_y}f_y)}{({f_x^2 + f_y^2 })}$$
I have no idea how should I solve this. I don't think I can solve them numerically, since any one function depends on the others, so I got stuck. I also need to consider the constraint $z = \sqrt{x^2+y^2}$. I'm hoping to use Lagrange multipliers but I'm not sure how should I.
What could I do? Cheers.