# How do Hamilton's equations deal with non-conservative forces?

I have searched everywhere I know to look but I cannot find out how Hamilton's equations deal with non-conservative forces. In my understanding, Lagrangian mechanics deals with this as follows: the Euler-Lagrange equations no longer have a zero on the right, they have a term $$\Sigma F_q$$ that is the sum of all the non-conservative forces encountered by q.

$$\begin{equation} \frac{d}{dt} \frac{\partial L}{\partial \dot{q}} - \frac{\partial L}{\partial q}=\Sigma F_q(t) \end{equation}$$

The only document I have been able to find about how hamiltonian mechanics deals with non-conservative forces has been: https://doi.org/10.1007/BF00692025

It requires you to buy it and I felt like just the plain equations and a little context for an example like a box sliding down a hill against friction would be enough.

• To get the Hamiltonian you extend the Lagrangian to $L\rightarrow L\left( \overrightarrow{q},\overrightarrow{\dot q}\right) +\overrightarrow{q}\cdot \overrightarrow{f}\left( t\right)$ – Eli Jul 23 at 6:09

Lorentz force is an example of non-conservative conservative force that is discussed in pretty much any theoretical mechanics textbook. The Lagrangian is: $$L = \frac{m}{2}\dot{\mathbf{r}}\cdot\dot{\mathbf{r}} + q \mathbf{A}(\mathbf{r})\cdot\dot{\mathbf{r}} - q\phi(\mathbf{r}),$$ from which the momentum, the Hamiltonian, and the Hamilton equations follow as usual.
1. If a variational formulation of Lagrange equations exists (e.g. because of the existence of a generalized velocity-dependent potential $$U(q,\dot{q},t)$$ for the forces in the problem), then we can in principle derive a Hamiltonian formulation via a Legendre transformation in the standard manner.