From f7cd8ea5c209250b17acd8341550c68fb5447b48 Mon Sep 17 00:00:00 2001 From: Luc Date: Wed, 3 Apr 2024 19:55:17 +0200 Subject: [PATCH] Added Hamiltonian mechanics. --- config/en/mkdocs.yaml | 4 +- .../hamiltonian-formalism.md | 96 +++++++++++++++++++ .../hamiltons-equations.md | 2 + .../lagrangian-formalism.md | 7 +- 4 files changed, 104 insertions(+), 5 deletions(-) create mode 100644 docs/en/physics/mechanics/hamiltonian-mechanics/hamiltonian-formalism.md create mode 100644 docs/en/physics/mechanics/hamiltonian-mechanics/hamiltons-equations.md diff --git a/config/en/mkdocs.yaml b/config/en/mkdocs.yaml index a21ded8..f77896a 100755 --- a/config/en/mkdocs.yaml +++ b/config/en/mkdocs.yaml @@ -133,7 +133,9 @@ nav: - 'Applications': - 'Celestial mechanics': physics/mechanics/lagrangian-mechanics/applications/celestial-mechanics.md - 'Oscillations': physics/mechanics/lagrangian-mechanics/applications/oscillations.md -# - 'Hamiltonian mechanics': + - 'Hamiltonian mechanics': + - 'Hamiltonian formalism': physics/mechanics/hamiltonian-mechanics/hamiltonian-formalism.md + - "Hamilton's equations": physics/mechanics/hamiltonian-mechanics/hamiltons-equations.md # - 'Relativistic mechanics': # - 'Quantum mechanics': - 'Electromagnetism': diff --git a/docs/en/physics/mechanics/hamiltonian-mechanics/hamiltonian-formalism.md b/docs/en/physics/mechanics/hamiltonian-mechanics/hamiltonian-formalism.md new file mode 100644 index 0000000..8184d18 --- /dev/null +++ b/docs/en/physics/mechanics/hamiltonian-mechanics/hamiltonian-formalism.md @@ -0,0 +1,96 @@ +# Hamiltonian formalism + +The Hamiltonian formalism of mechanics is based on the definitions posed by [Lagrangian mechanics](/en/physics/mechanics/lagrangian-mechanics/lagrangian-formalism) and the axioms, postulates and principles posed in the [Newtonian formalism](/en/physics/mechanics/newtonian-mechanics/newtonian-formalism/). + +Where the Lagrangian formalism used the [principle of virtual work](/en/physics/mechanics/lagrangian-mechanics/lagrange-equations/#principle-of-virtual-work) to derive the Lagrangian equations of motion, the Hamiltonian formalism will derive the Lagrangian equations with the stationary action principle. A derivative of Fermat's principle of least time. + +In Hamilton's formulation the principle is referred to as Hamilton's principle. + +## Hamilton's principle + +> *Principle 1*: of all the kinematically possible motions that take a mechanical system from one given configuration to another within a time interval $T \subset \mathbb{R}$, the actual motion is the stationary point of the time integral of the Lagrangian $\mathcal{L}$ of the system. Let $S$ be the functional of the trajectories of the system, then +> +> $$ +> S = \int_T \mathcal{L} dt, +> $$ +> +> has stationary points. + +The functional $S$ is often referred to as the action of the system. With this principle the equations of Lagrange can be derived. + +> *Theorem 1*: let $\mathcal{L}: (\mathbf{q}, \mathbf{q'}) \mapsto \mathcal{L}(\mathbf{q}, \mathbf{q'})$ be the Lagrangian, the equations of Lagrange are given by +> +> $$ +> \partial_{q_j} \mathcal{L}(\mathbf{q}, \mathbf{q'}) - d_t \Big(\partial_{q_j'} \mathcal{L}(\mathbf{q}, \mathbf{q'}) \Big) = 0, +> $$ +> +> for all $t \in \mathbb{R}$. + +??? note "*Proof*:" + + Let the redefined generalized coordinates $\mathbf{q}: (t,a) \mapsto \mathbf{q}(t,a)$ be given by + + $$ + \mathbf{q}(t,a) = \mathbf{\hat q}(t) + a \varepsilon(t), + $$ + + with $\mathbf{\hat q}: t \mapsto \mathbf{\hat q}(t)$ the generalized coordinates of the system and $\varepsilon: t \mapsto \varepsilon(t)$ a smooth differentiable function. + + Let $S: a \mapsto S(a)$ be the action of the system and let $\mathcal{L}: (\mathbf{q}, \mathbf{q'}) \mapsto \mathcal{L}(\mathbf{q}, \mathbf{q'})$ be the Lagrangian of the system, according to Hamilton's principle + + $$ + S(a) = \int_T \mathcal{L}(\mathbf{q}, \mathbf{q'})dt, + $$ + + for all $a \in \mathbb{R}$. To determine the stationary points we must have that $S'(0) = 0$. We have that $S'$ is given by + + $$ + \begin{align*} + S'(a) &= \int_T \partial_a \mathcal{L}(\mathbf{q}, \mathbf{q'})dt, \\ + &= \int_T \sum_{j=1}^f \bigg(\partial_{q_j} \mathcal{L} \partial_a q_j + \partial_{q_j'} \mathcal{L} \partial_a q_j'\bigg)dt, \\ + &= \int_T \sum_{j=1}^f \bigg(\partial_{q_j} \mathcal{L} \varepsilon_j(t) + \partial_{q_j'} \mathcal{L} \partial_a \partial_t q_j\bigg)dt. \\ + \end{align*} + $$ + + Partial integration may be used for the second part: + + $$ + \begin{align*} + \int_T \partial_{q_j'} \mathcal{L} \partial_a \partial_t q_j dt &= \Big[\partial_{q_j'} \mathcal{L} \partial_a q_j \Big]_T - \int_T \partial_a q_j d_t (\partial_{q_j'} \mathcal{L})dt, \\ + &= \Big[\partial_{q_j'} \mathcal{L} \varepsilon_j(t) \Big]_T - \int_T \partial_a q_j d_t (\partial_{q_j'} \mathcal{L})dt. + \end{align*} + $$ + + Choose $\varepsilon_j$ such that + + $$ + \Big[\partial_{q_j'} \mathcal{L} \varepsilon_j(t) \Big]_T = 0. + $$ + + Obtains + + $$ + \int_T \partial_{q_j'} \mathcal{L} \partial_a \partial_t q_j dt = - \int_T \partial_a q_j d_t (\partial_{q_j'} \mathcal{L})dt. + $$ + + The general expression of $S'$ may now be given by + + $$ + \begin{align*} + S'(a) &= \int_T \sum_{j=1}^f \bigg(\partial_{q_j} \mathcal{L} \varepsilon_j(t) - \partial_a q_j d_t (\partial_{q_j'} \mathcal{L})\bigg)dt, \\ + &= \int_T \sum_{j=1}^f \bigg(\partial_{q_j} \mathcal{L} \varepsilon_j(t) - \varepsilon_j(t) d_t (\partial_{q_j'} \mathcal{L})\bigg)dt, \\ + &= \sum_{j=1}^f \int_T \varepsilon_j(t) \Big(\partial_{q_j} \mathcal{L} - d_t (\partial_{q_j'} \mathcal{L})\Big)dt. + \end{align*} + $$ + + Then + + $$ + S'(0) = \sum_{j=1}^f \int_T \varepsilon_j(t) \Big(\partial_{q_j} \mathcal{L} - d_t (\partial_{q_j'} \mathcal{L})\Big)dt = 0, + $$ + + since $\varepsilon_j$ can be chosen arbitrary this implies that + + $$ + \partial_{q_j} \mathcal{L} - d_t (\partial_{q_j'} \mathcal{L}) = 0. + $$ \ No newline at end of file diff --git a/docs/en/physics/mechanics/hamiltonian-mechanics/hamiltons-equations.md b/docs/en/physics/mechanics/hamiltonian-mechanics/hamiltons-equations.md new file mode 100644 index 0000000..975b3f4 --- /dev/null +++ b/docs/en/physics/mechanics/hamiltonian-mechanics/hamiltons-equations.md @@ -0,0 +1,2 @@ +# Hamilton's equations + diff --git a/docs/en/physics/mechanics/lagrangian-mechanics/lagrangian-formalism.md b/docs/en/physics/mechanics/lagrangian-mechanics/lagrangian-formalism.md index a08ad58..d9b685a 100644 --- a/docs/en/physics/mechanics/lagrangian-mechanics/lagrangian-formalism.md +++ b/docs/en/physics/mechanics/lagrangian-mechanics/lagrangian-formalism.md @@ -1,6 +1,6 @@ # Lagrangian formalism -The Lagrangian formalism of mechanics is based on the axioms, postulates and principles posed in the [Newtonian formalism](/en/physics/newtonian-mechanics/newtonian-formalism.md). +The Lagrangian formalism of mechanics is based on the axioms, postulates and principles posed in the [Newtonian formalism](/en/physics/mechanics/newtonian-mechanics/newtonian-formalism/). ## Configuration of a system @@ -65,12 +65,11 @@ for all $t \in \mathbb{R}$ (inexplicitly). > with > > $$ -> a_{rs}(\mathbf{q}) = \sum_{i=1}^n \frac{1}{2} m_i \langle \partial_r \mathbf{x}_i(\mathbf{q}), \partial_s \mathbf{x}_i(\mathbf{q}), +> a_{rs}(\mathbf{q}) = \sum_{i=1}^n \frac{1}{2} m_i \Big\langle \partial_r \mathbf{x}_i(\mathbf{q}), \partial_s \mathbf{x}_i(\mathbf{q}) \Big\rangle, > $$ > > for all $t \in \mathbb{R}$. ??? note "*Proof*:" - Will be added later. - + Will be added later. \ No newline at end of file