Any reason why the Lagrangian just happens to show up in the path integral? I saw that derivation in which they start with the Schrodinger equation propagator and introduce a resolution of identity between each term. And boom ! The lagrangian showed up in the phase. But....why?
I'd simply have accepted it as "It is what it is" if the Lagrangian wasn't an important quantity coming from a completely different formulation of classical mechanics.
As it stands, the Lagrangian now has two relationships with the Hamiltonian. One being the Legendre transform. The other being the Lagrangian happening to show up in the path integral. So again...why does the Lagrangian happen to show up in the path integral?
EDIT To be more precise, is there a derivation of the path integral which uses a generic Hamiltonian $H(X,P)$ for the propagator and shows that the Legendre transform of $H$ must show up in the phase?
Or is it just an accident that it happens to be so for the Hamiltonian $\frac{P^2}{2m}+V(x)$?
 A: The path integral exists for arbitrary Hamiltonians at least in its Hamiltonian form (where we integrate over both $q(t)$ and $p(t)$), see Weinberg's QFT book, chapter 9.1. which derives the path integral without making any assumptions on the structure of $H$. Assuming that $H = p^2 + V(q)$ is a common simplifying assumption that sidesteps some annoying arguments but it is not necessary.
The Lagrangian version - where we only integrate over the Lagrangian path $q(t)$ - requires assuming a quadratic momentum, but in both cases the phase is $\mathrm{e}^{\mathrm{i}S}$, i.e. the action of our theory as a function of either a Hamiltonian or a Lagrangian path.
Asking "Why is the exponent a Legendre transform?" is hence a red herring - the exponent is just the action. The reason the action appears is because the classical path must (at least intuitively) be the one dominating the integral, and the classical paths are precisely stationary points of the action, hence the points where the phase varies slowest. If we're going to get an integral over a phase, then the exponent of that phase should be a function like the classical action, before doing any computations, solely on the principle of the classical limit/correspondence principle/whatever you want to call this heuristic.
If you accept that the classical action is the integral of the Lagrangian (and hence the integral of the Legendre transform of the Hamiltonian), there's nothing more mysterious going on here (see this question for discussions of what a Legendre transform actually does)
A: The reason why the overlap
$$\langle q_f,t_f|q_i,t_i \rangle~\sim~\int_{q(t_i)=q_i}^{q(t_f)=q_f} \!{\cal D}q~{\cal D}p~\exp\left[ \frac{i}{\hbar}S[q,p]\right],\tag{1} $$
is given by the Hamiltonian phase space path integral with Hamiltonian action
$$S[q,p]~=~\int_{t_i}^{t_f}\!dt~\left[ p\dot{q}- H(q,p)\right],\tag{2}$$
essentially follows from 2 facts:

*

*Unitary time-evolution is controlled by the Hamiltonian.


*The symplectic $p\dot{q}$ term follows from the $pq$ overlap formula
$$ \langle p,t  \mid  q,t \rangle~=~\frac{1}{\sqrt{2\pi\hbar}}\exp\left[\frac{pq}{i\hbar}\right].  \tag{3} $$
See e.g. my Phys.SE answer here for more details on the correspondence between
$$
\text{Operator formalism}\qquad \longleftrightarrow \qquad
\text{Path integral formalism} 
\tag{4}
$$
Finally, to go from the Hamiltonian path integral to the Lagrangian path integral, perform the momentum integrations.
