I need to derive the Hamiltonian from the Lagrangian defined in the following way:
$$L[x, \dot{x}] = \int_{t_0}^{t_1} f(x(t), t) \sqrt{1 + \dot{x}^2} \mathrm{d}t.\tag{1}$$
The usual method is to compute the momentum $p$:
$$p = \frac{\partial L}{\partial \dot{x}} = \int_{t_0}^{t_1} f(x(t), t) \frac{\dot{x}}{\sqrt{1 + \dot{x}^2}} \mathrm{d}t,\tag{2}$$
invert the relation and write $\dot{x} = \dot{x}(x, p)$ and then compute the Hamiltonian:
$$H(x, p) = \dot{x}(x, p) p - L[x, \dot{x}(x, p)].\tag{3}$$
But in this case it is not possible to simply get the formula for $\dot{x}$. It is still possible to get the Hamiltonian?