E-L condition:
$$\frac{d p}{dt}=\frac{\partial L}{\partial q}$$
Where $p=\frac{\partial L}{\partial \dot{q}}$
Are the following steps valid:
$$\frac{\partial q}{dt} dp=\partial L$$
$$\dot{q} \: dp = \partial L$$
$$ \int \dot{q} \: dp = L+C $$
By integration by parts the LHS becomes:
$$ \int \dot{q} \: dp = \dot{q} p-\int p \: d \dot{q} = \dot{q} p- \int \frac{\partial L}{\partial \dot{q}} \:d \dot{q}=\dot{q} p-L+C_1$$
Substituting this back into the LHS:
$$\dot{q} p-L=L+C_2$$
If steps are valid, then this indicates that the Legendre transformation of the Lagrangian is just the Lagrangian plus some constant $C_2$, and that the Hamiltonian is thus $H=L+C_2$. Seems pretty fishy. If it is not fishy (if above steps are valid), then this question: Since it is derived from the E-L condition, does this result imply that the action of all functions that are their own Legendre transformation (plus a constant) is stationary?