## 4 Hamiltonian Variational Formalisms versus Canonical Ones
### Classical versus Port-Hamiltonian Canonical Equation Formalisms  
In what follows, we denote \(T\overset{\text{def}}{=}\left[t_{i}\,,\,t_{f}\right]\) as the time interval and \(\partial T\overset{\text{def}}{=}\left\{t_{i}\,,\,t_{f}\right\}\) as its border. Then, in the spirit of [PERSON]'s variational viewpoint (and possibly, [PERSON]'s viewpoint with both synchronous and asynchronous variations [100; 101]), we let the final instant \(t_{f}\) be an additional degree of freedom for the variational principles (some discussion on such nontrivial variations can be found, for instance, in [102]), which become [PERSON]'s integral equations (or some kind of law of varying action [103]). Besides, in this subsection, we focus only on a small number of alternatives for action integrals, in order to indicate the place of the PHS model within the Hamiltonian variational framework. Other formulations combining different expressions of energy functionals can be found, for instance, in [91; 104]. 1.1 Classical Lagrangian Equations by [PERSON]'s Generalized Least-Action Principle in \(\mathfrak{q}\)-Configuration Space  
As is well known, the dynamic equations in Equation (31) can also be recovered from the [PERSON](-Lagrange-D'Alembert) generalized variational principle ([5], Chapter 7, p. 207; Chapter 8) (which applies as well as to non-conservative, i.e., dissipative and irreversible, processes and constrained systems as, e.g., in [99]; see also [45], Part 3, for the discrete Lagrange-d'Alembert principle):  
\[\lim_{\epsilon\searrow 0^{+}}\frac{d\overline{\mathscr{A}}_{ \mathrm{L}}[\mathfrak{q}+\epsilon\,\mathfrak{q},t_{f}]}{d\epsilon}=-\int_{t_{i} }^{t_{f}}\mathscr{P}^{\mathrm{ext}}[\mathfrak{q},\mathfrak{q}]\,d\hat{t}\] (74a) for all k.a. variations \[\mathfrak{q}\] and time interval \[T\stackrel{{\mathrm{def}}}{{=}}[t_{i},\,t_{f}],\,\,\mathrm{while} \,\mathfrak{q}_{/\partial T}=\mathfrak{0}_{5\times 1}\,.\]  
This re-states then Equation (31) as the necessary Euler-Lagrange condition of balance for the Gateaux first variation of the following _integral of action_\(\overline{\mathscr{A}}_{\mathrm{L}}[\mathfrak{q},t_{f}]\) of the _Lagrangian_\(\overline{\mathscr{L}}[\mathfrak{q},\overline{\mathbf{E}},\mathfrak{q}]\) with the constraint in Equation (23):  
\[\overline{\mathscr{A}}_{\mathrm{L}}[\mathfrak{q},t_{f}]\stackrel{{ \mathrm{def}}}{{=}}\int_{t_{i}}^{t_{f}}\overline{\mathscr{L}}[ \mathfrak{q},\overline{\mathbf{E}},\mathfrak{q}]d\hat{t}\,,\] (74b) with \[\overline{\mathscr{L}}[\mathfrak{q},\overline{\mathbf{E}},\mathfrak{q}] \stackrel{{\mathrm{def}}}{{=}}\overline{\mathscr{K}}[ \mathfrak{q},\mathfrak{q}]-\overline{\mathscr{E}}^{\mathrm{class}}[ \mathfrak{q},\overline{\mathbf{E}}]\,\,\mathrm{and}\,\,\overline{\mathbf{E}}[ \mathfrak{q}]\equiv\overline{\mathbf{B}}\,\mathfrak{q}\,\,\mathrm{over}\, \overline{\mathcal{S}}\,. \tag{74c}\]  
The Lagrangian being here scleronomic (i.e., time is not present explicitly in \(\overline{\mathscr{L}}\)), the variations of the time \(t_{f}\) (and so, \(T\)) provide, furthermore, in agreement with the power balance equation in Equation (30),  
\[\overline{\mathscr{P}}^{\mathrm{acc}}[\mathfrak{q},\mathfrak{q}]-\overline{ \mathscr{P}}^{\mathrm{int}}[\mathfrak{q},\mathfrak{q}]=\overline{\mathscr{P}} ^{\mathrm{ext}}[\mathfrak{q},\mathfrak{q}]\,\,\mathrm{from}\,\,T\,\,\mathrm{with}\,\,\mathfrak{q} \stackrel{{\mathrm{a.e.}}}{{=}}\mathfrak{q}\,\,\mathrm{on}\,\,( \overline{\mathcal{S}}\cup\overline{\mathcal{C}})\times(T\setminus\partial T)\,. \tag{75}\]  
Here, by \(\stackrel{{\mathrm{a.e. }}}{{=}}\), wherein a.e., stands for \"almost everywhere\", we mean an approximation is used by a convolution with a smooth positive mollifier over the open interval \(T\setminus\partial T\).