I am having some trouble with understanding why it makes sense to consider action in classical mechanics as function of endpoints $q_{initial}, \ q_{final}$ and endtimes $t_{initial}, \ t_{final}$. Since we want to define such function as action functional acting on physical trajectory connecting these points, i.e.
$S(q_f,q_i;t_f,t_i)= \left. \int _{t_i,q_i}^{t_f,q_f}L \mathrm{d}t \right|_{physical \ trajectory}$
But for such definition to make sense for all $q$in configuration space, isn't it required that any two points can be joined by trajectory of any time length we choose AND that such trajectory is unique? This requirement doesn't seem likely to be true.
It is also possible that I completely misunderstood what is going on. For reference, I got it from Landau's mechanics in sections "43. Action as function of coordinates" and "44. Maupertuis principle". In any case I need some tips. I suspect that I am missing something fundamentally important.
I have managed to construct an amusing counterexample for existence of such defined action function. I will post it here for it might be useful for somebody asking the same question in future. Consider system with configuration space being a circle, i.e. one spatial coordinate which is periodic, $\phi \in (0, 2 \pi )$. Consider Lagrangian
$L=\frac{1}{2} \dot{\phi}^2$
Now fix both endpoints at, say $\phi=0$, $t_{i}=0, \ t_{f}=2 \pi$. It is clear that since we consider physical trajectories, angular velocity needs to be conserved. But we can choose it to be any integer we like and we get a physical trajectory satisfying demanded conditions. It is easily calculated that action functional evaluated on such trajectory is
$S=k \pi$
for $k$ being an integer. Hence $S$ as function of coordinates is ill-defined. Several questions arise:
To what extend this " patological" behavior canbe attribute to topology of configuration space? In this case it is not simply connected.
In this e ample we can make it unambiguous by demanding that shortest trajectory is chosen. Is such prpcedure possible in general?
Is this connected to problem of existence of solutions to HJE equation? What is the "right" way to think about relation of function in HJE equation with action integral?
I will be perfectly delighte with a reference rather than complete answer!