Hamiltonian Mechanics without a Lagrangian Let's say I want to develop Hamiltonian mechanics from scratch without going through Lagrangian mechanics and Legendre transformations. How would I go about doing that? What I am struggling with is a definition of conjugate momentum. It is usually defined as a derivative of Lagrangian, and there does not seem to be a natural way of defining it in terms of trajectory. Is there an alternative definition that does not involve a Lagrangian?
 A: You can just define some Hamiltonian $H(\vec{q},\vec{p})$ and the equations of motion are Hamilton's equations
\begin{eqnarray}
\frac{{\rm d} q_i}{{\rm d} t} &=& \frac{\partial H}{\partial p^i} \\
\frac{{\rm d} p^i}{{\rm d} t} &=& - \frac{\partial H}{\partial q_i}
\end{eqnarray}
If you integrate the equations you'll get $q_i(t)$.
You might ask how to write down a Hamiltonian to represent a given system. If the system is fairly simple you can just start with a standard form like $H=\frac{\vec{p}^2}{2m} + V(\vec{q})$. For more complicated systems, it depends on the problem which formalism is the easiest to derive the equations of motion.
Finally I'll just mention that Hamiltonian mechanics is quite deep and there are some very beautiful geometric ways to formulate the theory as a symplectic manifold in a coordinate-independent way. If you have the mathematical background, this is an even more elegant way to formulate the equations; you just need to specify some two-form on the manifold that will generate the dynamics.
A: You can simply start with a Hamiltonian, but the Hamiltonian has to be written in terms of the correct Hamiltonian variables—the canonical coordinates and their conjugate momenta.  In one dimensions, that means that you can just write out a function $H=H(x,p)$ and derive Hamilton's equations from it in the usual way (e.g. $\dot{p}=\partial H/\partial x$).  The relation between the momentum $p$ and the velocity $\dot{x}$ (what you would get in the Lagrangian formalism by defining $p=\partial L/\partial\dot{x}$) is given by one of the Hamilton's equations instead, $\dot{x}=-\partial H/\partial p$. The generalization to multiple degrees of freedom is straightforward.
A: H is that thing which is invariant or conserved over time. This follows from Noether's Theorem. That thing is usually called energy.(It is also the generator of time translation. There is a connection between time translation and energy by Noether's Theorem.)
But there is a possibly even deeper explanation. This can be found in Leonard Susskind's Theoretical Minimum Vol 1 Lectures 8 and 9 and his corresponding Classical Mechanics lectures on youtube.
Hamilton's equations determine trajectories in phase space such that the volume of blobs in phase space are invariant. This can be shown by applying the mathematics of fluid flow to phase space. This is Louiville's Theorem.
If $F=F(p,q)$
In Classical Mechanics,
$\dot{F}=${$F,H$}.
-Susskind Theoretical Minimum Vol 1. page 172.
In Quantum Mechanics,
$\dot{L}=-\frac{i}{\hbar}$[L, H]
where $L$ is an operator.
-Susskind Theoretical Minimum Volume 2.page 112.
If you know the $H$ then you can easily calculate the equations of motion.
Consider two coupled oscillators.
$H =\frac{{p_1}^2}{2m_1}+\frac{{p_1}^2}{2m_1}+\frac{1}{2}k_1 {x_{1}^2}+\frac{1}{2}k_2 {x_{2}^2}+\frac{1}{2}k(x_2 − x_1)$.
-Coupled Classical and Quantum Oscillators. McDermott. Redmount
In quantum mechanics, $p$,$q$ and $H$ can be expressed in terms of raising a lowering operators. Then $H$ is an operator that acts on states. So, there are coupled quantum harmonic oscillators too.
-Coupled Harmonic Oscillators. Applications of Quantum Mechanics. Cornell University.
The harmonic oscillator and $H=\frac{1}{2} p^2 + \frac{1}{2}\omega^2 q^2$ are fundamental to Quantum Field Theory.
-Tong, David. Quantum Field Theory Lectures. page 22.
