Skip to main content

How to demonstrate if a dynamical system can be Hamiltonian

To demonstrate whether a dynamical system can be Hamiltonian, you check a small set of strict mathematical conditions. Below is a clear, technical checklist, from fastest rejection to constructive proof.



Start from the system form 

\[ \dot{x} = f(x), \qquad x \in \mathbb{R}^{2n}. \]

The system is Hamiltonian if and only if it can be written as

\[ \dot{x} = J \nabla H(x), \]

where the canonical symplectic matrix is 
\[ \dot{x} = J \nabla H(x), \] where \[ J = \begin{pmatrix} 0 & I_n \\ - I_n & 0 \end{pmatrix} \] is the canonical symplectic matrix, and \( H(x) \) is a scalar Hamiltonian function. 
Necessary condition: zero divergence 
 Hamiltonian flows preserve phase--space volume (Liouville's theorem): \[ \nabla \cdot f(x) = 0. \] If \( \nabla \cdot f(x) \neq 0 \), the system is not Hamiltonian. If \( \nabla \cdot f(x) = 0 \), Hamiltonian structure is possible. Example: damped pendulum \[ \dot q = \frac{p}{m\ell^2}, \qquad \dot p = -m g \ell \sin q - c p \] The divergence is \[ \nabla \cdot f = \frac{\partial \dot q}{\partial q} + \frac{\partial \dot p}{\partial p} = 0 - c = - c \neq 0. \] Therefore, the system cannot be Hamiltonian. 
Canonical Hamiltonian form 
 For a two--dimensional system \[ \dot q = f(q,p), \qquad \dot p = g(q,p), \] a Hamiltonian \( H(q,p) \) exists if \[ \dot q = \frac{\partial H}{\partial p}, \qquad \dot p = -\frac{\partial H}{\partial q}. \] 
Integrability condition 
 Taking mixed derivatives yields the consistency condition \[ \frac{\partial f}{\partial q} = -\frac{\partial g}{\partial p}. \] If this condition fails, no Hamiltonian exists. If it holds, a Hamiltonian can be constructed. 
Hamiltonian construction 
 If the integrability condition holds, define \[ H(q,p) = \int f(q,p)\, dp + C(q), \] and enforce \[ \frac{\partial H}{\partial q} = -g(q,p) \] to determine \( C(q) \). 
The Hamiltonian is unique up to an additive constant. 
Example: undamped pendulum 
 \[ \dot q = \frac{p}{m\ell^2}, \qquad \dot p = -m g \ell \sin q \] Check: \[ \frac{\partial \dot q}{\partial q} = 0, \qquad -\frac{\partial \dot p}{\partial p} = 0. \] Hamiltonian: \[ H(q,p) = \frac{p^2}{2 m \ell^2} + m g \ell (1 - \cos q). \] 
Non-Hamiltonian example: damped pendulum 
 \[ \dot p = -m g \ell \sin q - c p \] \[ -\frac{\partial \dot p}{\partial p} = c \neq 0. \] Hence, no scalar Hamiltonian \( H(q,p) \) exists. 
Jacobian matrix test 
 Let \( Df(x) \) be the Jacobian of \( f(x) \). Hamiltonian systems satisfy \[ Df(x)\,J + J\,Df(x)^{\mathsf T} = 0. \] Violation of this condition implies the system is not Hamiltonian. 
Energy conservation 
For Hamiltonian systems, \[ \frac{dH}{dt} = \nabla H^{\mathsf T} J \nabla H = 0. \] Energy conservation is necessary but not sufficient for Hamiltonian structure.

Comments

Popular posts from this blog

How to Play a Sound After a Terminal Command Completes

  Sometimes, while working on the terminal, especially during long-running processes, it’s useful to have an audible notification when the task is finished. In this guide, we’ll show you how to make your terminal play a sound after any command completes, ensuring you're alerted without constantly checking the terminal. Why Do This? This trick can save time and improve workflow, especially when: You’re running lengthy build processes or installations. You’re waiting for large file transfers. You're programming embedded systems and need confirmation when flashing is done. Let’s dive into how to do this on a Linux system. Step-by-Step Guide to Playing a Sound After a Command 1. Using paplay or aplay to Play Sounds On most Linux distributions, you can use paplay or aplay to play sound files directly from the terminal. Here's how you can append a sound notification after a command. Basic Command Structure : PC:~$ your_command && paplay /path/to/soundfile.oga  Or, if...

Building a Robot Actuator with ESP32 and a 5010 BLDC Motor

Introduction Modern robotics demands actuators that aren’t just strong, but also smart — capable of precise control, smooth motion, and safe human interaction. Traditional servos are great for small robots, but they can be stiff, noisy, and limited in range or torque. This project demonstrates a custom robot actuator built around a 5010 360 KV brushless DC (BLDC) motor , controlled by an ESP32 running the SimpleFOC library. The goal is to create a compliant joint — one that can be moved by hand, but automatically returns to its home position with adaptive stiffness. 🧠 What Makes This Actuator Special Unlike a typical servo, this actuator behaves intelligently : You can turn it by hand — it feels soft and back-drivable. When you release it, the motor returns to its initial position smoothly. If you twist it harder (e.g., due to gear reduction), it becomes stiffer , resisting displacement more strongly. It’s powered by 12 V and controlled by a simple ESP32 boar...

How to Automatically Change Citation Color in Word (e.g., Blue) Using Zotero + Macro

  Hi everyone 👋 I’ll be honest upfront: I’m not a huge fan of Microsoft Word — I usually work in LaTeX , where formatting and citations behave exactly the way I want without any hacks 😄 That said, we all occasionally find ourselves back in Word , whether for collaborations, journal templates, or institutional requirements. And when that happens, a few quirky tricks can go a long way. If you’re using Zotero with Microsoft Word and want to improve the visual style of your document, this small trick can be surprisingly useful. In many scientific papers and technical documents, in-text citations appear in blue , similar to hyperlinks. Unfortunately, Zotero does not provide a built-in option to automatically change citation colors in Word. The good news? You can achieve this easily using a simple Word VBA macro  no need to abandon Zotero or manually format citations one by one. i originally found this in zotero forms this >  Post  < Below is a simple,...