1 Introduction

The numerical integration of isospectral flows is a classical subject of study in numerical analysis [7, 10]. The interest in this problem is motivated by the numerical simulation of integrable systems, which are deeply related to isospectral flows via the Lax pair formulation. The quasi-periodic dynamics of integrable systems depends on the presence of a large number of first integrals. In the Lax pair formulation, some of these first integrals can be presented as a linear combination of the eigenvalues of the dynamical variable. Therefore, the preservation of the spectrum of the dynamical variable is a key feature of a numerical scheme applied to isospectral flows, in order to expect the right qualitative behaviour of the discrete approximate solutions [7]. Furthermore, as a special case, Lie–Poisson systems on the dual of reductive Lie algebras can be seen as isospectral flows [18]. A reductive Lie algebra is defined as the direct sum of a semisimple Lie algebra and an abelian Lie algebra. In this paper, the crucial property of real semisimple Lie algebras is that they can be represented as matrix Lie algbras which are closed under conjugate transpose [12, Prop. 6.28]. Moreover, any real matrix Lie algebra which is closed under conjugate transpose is reductive [12, Prop. 1.56].Footnote 1 Because of this, Lie–Poisson systems on the dual of a reductive Lie algebra can be equivalently seen as isospectral flows of the form (1.2) below. Lie–Poisson systems originate from the Poisson reduction of canonical Hamiltonian systems on the cotangent bundle of a Lie group [15]. Classical examples of Lie–Poisson systems are the rigid body [21], the heavy top and the incompressible Euler equations [1]. It is known from the backward error analysis, that Lie–Poisson preserving numerical schemes are superior to standard methods when applied to Lie–Poisson systems, especially for long-time simulations. As state-of-the-art, well established theories on numerical methods for both isospectral and Lie–Poisson systems exist in the literature (see for example [4, 10, 20]). For Lie–Poisson systems various symplectic algorithms have been developed (see [6] for a recent survey). However, few examples of numerical schemes that are intrinsically defined in the space where the dynamics takes place are known (e.g. [16]). This issue often causes a lack of efficiency for these schemes, which rely on group to algebra maps (e.g. the matrix exponential or the Cayley map) or a large number of unknowns. Before presenting our result, let us introduce the mathematical setup used throughout the paper.

Isospectral flows are first order ODEs of the form:

$$\begin{aligned} \dot{W}= & {} [B(W),W], \quad W\in V\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\nonumber \\ W(0)= & {} W_0. \end{aligned}$$
(1.1)

Here, \([\cdot ,\cdot ]\) denotes the matrix commutator, V is a linear subspace of the Lie algebra \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\), and the function \(B:V\rightarrow {\mathfrak {n}}(V)\) maps V into its \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\)-normalizer algebra \({\mathfrak {n}}(V)\).Footnote 2 The most studied case in literature is when \(V={{\,\mathrm{Sym}\,}}(n,{\mathbb {R}})\) is the space of symmetric real matrices, for which the normalizer is the Lie algebra of skew-symmetric real matrices \({\mathfrak {n}}(V) = {{\mathfrak {s}}}{{\mathfrak {o}}}(n)\). For Lie–Poisson systems on the dual of a reductive Lie algebra, we have that \(V={\mathfrak {g}}^*\) is the dual of a reductive Lie subalgebra of \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\), for which the \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})-\)normalizer is \({\mathfrak {n}}(V) = {\mathfrak {g}}_0\oplus {\mathfrak {c}}({\mathfrak {g}})\) (see Definition 2 and Lemma 2, in Section 2). Throughout the paper, we identify \({\mathfrak {g}}^*\) with \({\mathfrak {g}}\), via the Frobenius inner product \(\langle A,B\rangle ={{\,\mathrm{Tr}\,}}(A^\dagger B)\), where \(^\dagger \) is the conjugate transpose. Via this identifications, Lie–Poisson systems on the dual of a reductive Lie algebra \({\mathfrak {g}}\) take the form:

$$\begin{aligned} \dot{W}= & {} [\nabla H(W)^\dagger ,W], \quad W\in {\mathfrak {g}}\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\nonumber \\ W(0)= & {} W_0, \end{aligned}$$
(1.2)

for \(H:{\mathfrak {g}}\rightarrow {\mathbb {C}}\), a smooth function called Hamiltonian.

A class of numerical methods to solve (1.1)–(1.2), called Isospectral Symplectic Runge–Kutta (IsoSyRK), has been introduced in [18]. In the case of Lie–Poisson systems these schemes are symplectic. In this paper, we focus on the IsoSyRK associated to the implicit midpoint method, which turns out to have a specially nice structure. On the one hand, we provide a simpler proof (avoiding the use of the B-series theory) that for the implicit midpoint method, the respective IsoSyRK defined in [18] is isospectral for any \(B=B(W)\). On the other hand, we derive a simpler scheme reducing the number of unknowns up to minimality, revealing an intrinsic relation between the implicit midpoint method and the Cayley transform. The resulting integrator, although implicit, is second order, isospectral and symplectic when the isospectral flow is Lie–Poisson. The scheme is also intrinsically defined on V, for a large class of isospectral flows (see section 2 for details) and, when the isospectral flow is Lie–Poisson, it preserves the coadjoint orbits. Furthermore, only one evaluation of \(B(\cdot )\) and two matrix multiplications per iteration are required, making the scheme very efficient. In the last section of this paper, we show some numerical examples of our scheme and we compare it with the spherical midpoint method, which is another minimal-variable Lie–Poisson integrator on \({\mathbb {R}}^3\). Finally, we show how our scheme looks on \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\), defining what we call the hyperbolic midpoint method.

2 Main result

Let us consider an isospectral flow of the form (1.1). In order to present our result, we need a short detour on some concepts and basic results on Lie algebras. As already mentioned in section 1, for (1.1) to be well defined, we have to require \(B(\cdot )\) to take values in the \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\)-normalizer algebra of V. We recall here the definition of the normalizer Lie group and normalizer Lie algebra:

Definition 1

Let G be a Lie group and \({\mathfrak {g}}\) its Lie algebra. Furthermore, let \(V\subseteq {\mathfrak {g}}\) be a linear subspace. Then the two sets

$$\begin{aligned}&N(V)=\lbrace g\in G \mid g^{-1} V g\subseteq V \rbrace \\&{\mathfrak {n}}(V)=\lbrace \xi \in {\mathfrak {g}}\mid [\xi ,V]\subseteq V \rbrace \end{aligned}$$

are respectively called the G-normalizer and the \({\mathfrak {g}}\)-normalizer of V. Notice that N(V) is a subgroup of G and \({\mathfrak {n}}(V)\) is a Lie subalgebra of \({\mathfrak {g}}\).

A related concept to normalizer is the centralizer Lie algebra.

Definition 2

Let \({\mathfrak {g}}\) be a Lie algebra and let \(V\subseteq {\mathfrak {g}}\) be a linear subspace. Then the set

$$\begin{aligned}&{\mathfrak {c}}(V)=\lbrace \xi \in {\mathfrak {g}}\mid [\xi ,V]=0 \rbrace \end{aligned}$$

is called the \({\mathfrak {g}}\)-centralizer of V. Notice that \({\mathfrak {c}}(V)\) is a Lie subalgebra of \({\mathfrak {g}}\).

We now recall the definition of a J-quadratic Lie algebra.

Definition 3

A Lie subalgebra \({\mathfrak {g}}\) of \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) is called J-quadratic Lie algebra if there exists an invertible matrix J, such that

$$\begin{aligned} W\in {\mathfrak {g}}\iff W^\dagger J + J W = 0. \end{aligned}$$
(2.1)

Lemma 1

Let \({\mathfrak {g}}\) be a Lie subalgebra of \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) such that there exists a matrix J for which

$$\begin{aligned} W\in {\mathfrak {g}}\iff W^\dagger J + J W = 0. \end{aligned}$$

Then \({\mathfrak {g}}={\mathfrak {g}}^\dagger \) implies \(J^2 \in {\mathfrak {c}}({\mathfrak {g}}) \). Moreover, if J is invertible and \(J^2 \in {\mathfrak {c}}({\mathfrak {g}}) \), then \({\mathfrak {g}}={\mathfrak {g}}^\dagger \).

Proof

Suppose \({\mathfrak {g}}={\mathfrak {g}}^\dagger \). Then, for all \(W\in {\mathfrak {g}}\), both the following identities hold:

$$\begin{aligned}&W^\dagger J + J W = 0,\\&W J + J W^\dagger = 0. \end{aligned}$$

The second of these implies that \(W J^2 + J W^\dagger J = 0\) and the first one \(J W^\dagger J + J^2 W = 0\). Subtracting these identities, we get \([W,J^2]=0\). Hence \(J^2 \in {\mathfrak {c}}({\mathfrak {g}}) \).

Now assume that \({\mathfrak {g}}\) is \(J-\)quadratic and \(J^2 \in {\mathfrak {c}}({\mathfrak {g}})\). Then, for all \(W\in {\mathfrak {g}}\) we have \(0 = JW^\dagger J + J^2 W = JW^\dagger J + WJ^2\) and hence \(W J + J W^\dagger = 0\), being J invertible. Therefore \({\mathfrak {g}}\) and \({\mathfrak {g}}^\dagger \) are defined by the same identity and they coincide. \(\square \)

Lemma 2

Let \({\mathfrak {g}}\) be a Lie subalgebra of \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) such that \({\mathfrak {g}}={\mathfrak {g}}^\dagger \). Then the \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})-\)normalizer of \({\mathfrak {g}}\) is \({\mathfrak {n}}({\mathfrak {g}})={\mathfrak {g}}_0\oplus {\mathfrak {c}}({\mathfrak {g}})\), where \({\mathfrak {g}}_0\) is the semisimple ideal of \({\mathfrak {g}}\) such that \({\mathfrak {g}}={\mathfrak {g}}_0 \oplus {\mathfrak {z}}({\mathfrak {g}})\), for \({\mathfrak {z}}({\mathfrak {g}})\) the center of \({\mathfrak {g}}\).Footnote 3

Proof

Let \({\mathfrak {g}}^\perp \) be the orthogonal complement of \({\mathfrak {g}}\) in \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) with respect to the Frobenius inner product. It is not hard to check that the following properties hold:

$$\begin{aligned}{}[{\mathfrak {g}},{\mathfrak {g}}]\subset {\mathfrak {g}}, [{\mathfrak {g}},{\mathfrak {g}}^\perp ]\subset {\mathfrak {g}}^\perp , [{\mathfrak {g}}^\perp ,{\mathfrak {g}}^\perp ]\subset {\mathfrak {g}}. \end{aligned}$$

Hence, if \(A\in {\mathfrak {n}}({\mathfrak {g}})\cap {\mathfrak {g}}^\perp \) it must be \([{\mathfrak {g}},A]=0\). Therefore, A has to be in \({\mathfrak {c}}({\mathfrak {g}})\). Moreover, we have that the following inclusions always hold \({\mathfrak {z}}({\mathfrak {g}})\subset {\mathfrak {c}}({\mathfrak {g}})\subset {\mathfrak {n}}({\mathfrak {g}})\). Therefore, \({\mathfrak {n}}({\mathfrak {g}})={\mathfrak {g}}_0\oplus {\mathfrak {c}}({\mathfrak {g}})\), being \({\mathfrak {g}}_0\) centerless.\(\square \)

Notice that, since always \({\mathfrak {n}}({\mathfrak {g}})^\dagger = {\mathfrak {n}}({\mathfrak {g}}^\perp )\), we have that \({\mathfrak {n}}({\mathfrak {g}}^\perp )={\mathfrak {g}}_0\oplus {\mathfrak {c}}({\mathfrak {g}})^\dagger \), whenever \({\mathfrak {g}}={\mathfrak {g}}^\dagger \). In conclusion, we have the following corollary:

Corollary 1

Let \({\mathfrak {g}}\) be a J-quadratic Lie subalgebra of \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) such that \(J^2 \in {\mathfrak {c}}({\mathfrak {g}})\). Then the \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})-\)normalizer of \({\mathfrak {g}}\) and \({\mathfrak {g}}^\perp \) are respectively \({\mathfrak {n}}({\mathfrak {g}})={\mathfrak {g}}_0\oplus {\mathfrak {c}}({\mathfrak {g}})\) and \({\mathfrak {n}}({\mathfrak {g}}^\perp )={\mathfrak {g}}_0\oplus {\mathfrak {c}}({\mathfrak {g}})^\dagger \). In particular, under the identification of \({\mathfrak {g}}^*\) with \({\mathfrak {g}}\) via the Frobenius inner product, any Lie–Poisson system on \({\mathfrak {g}}^*\) can be written in the form (1.2).

Notice that by [12, Prop. 1.56] any \({\mathfrak {g}}\) such as in Corollary 1 is a reductive Lie algebra. As mention in the introduction, Lie–Poisson systems on the dual of reductive Lie algebras can be written in the form (1.2). In particular, this is true for Lie–Poisson systems on the dual of \({\mathfrak {g}}\oplus {\mathfrak {Z}}\), where \({\mathfrak {Z}}\) is an Abelian Lie algebra. We can now state the main result of this paper.

Theorem 1

Let \(W_k\in D\subset V\), for a domain D in the linear subspace \(V\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\). Assume that the normalizer splits as \({\mathfrak {n}}(V)={\mathfrak {g}}_0\oplus {\mathfrak {c}}(V)\), for some Lie algebra \({\mathfrak {g}}_0\), which satisfies

$$\begin{aligned} N\in {\mathfrak {g}}_0 \iff N^\dagger P + P N = 0. \end{aligned}$$
(2.2)

for some constant matrix P. Furthermore, let \(B:D\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\rightarrow {\mathfrak {n}}(V)\) be continuously differentiable. Then, for some \(h> 0\), there exists \({\widetilde{W}}\in V\) such that the numerical scheme \(W_k\rightarrow W_{k+1}\), implicitly defined by:

$$\begin{aligned} \boxed { \begin{array}{ll} &{}W_{k}=(Id - \frac{h}{2}B({\widetilde{W}})){\widetilde{W}}(Id + \frac{h}{2}B({\widetilde{W}}))\\ &{}W_{k+1}=(Id + \frac{h}{2}B({\widetilde{W}})){\widetilde{W}}(Id - \frac{h}{2}B({\widetilde{W}})), \end{array} } \end{aligned}$$
(2.3)

is a second order isospectral integrator for (1.1), for any \(k\ge 0\).Footnote 4. Moreover, when (1.1) is a Lie–Poisson system on \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})^*\) or on the dual of some J-quadratic Lie algebra \({\mathfrak {g}}\) such that \(J^2 \in {\mathfrak {c}}({\mathfrak {g}}) \) (or even on \({\mathfrak {g}}\oplus {\mathfrak {Z}}\), where \({\mathfrak {Z}}\) is an Abelian Lie algebra), then (2.3) is a Lie–Poisson integrator for (1.1) which preserves the coadjoint orbits in \({\mathfrak {g}}^*\).

Remark 1

The main contribution of Theorem 1, with respect to the results presented in [18], is that the scheme (2.3) is a minimal-variable isospectral (Lie–Poisson) integrator. Minimal-variable means here that the only unknown is \({\widetilde{W}}\), which lives in a vector space of dimension \(\dim (V)\). Hereafter, we will refer to the scheme (2.3) as the isospectral minimal midpoint. Moreover, the proof of the properties of (2.3), unlikely to [18, Cor. 1], does not require any application of the B-series theory and reveals a deep connection with the Cayley transform (see the proof of Lemma 4). The latter is a quite interesting fact because the Cayley transform arises as a necessary consequence of the use of the implicit midpoint scheme and not, as it has always appeared in literature, as a prescribed choice to construct a certain numerical scheme. We also emphasize that the condition (2.2) and the ones on J in Theorem 1 to get a Lie–Poisson integrator is slightly more general than the one considered in [18, Thm. 1–2].

We will give the proof of Theorem 1 in some lemmas.

Lemma 3

Let \(B:D\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\rightarrow {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) continuously differentiable in the domain D. Then, for every \(Y\in D\), there exist \({\overline{h}}>0\) such that the equation

$$\begin{aligned} Y=\left( Id - \frac{h}{2}B(X)\right) X\left( Id + \frac{h}{2}B(X)\right) \end{aligned}$$
(2.4)

has a solution \(X\in {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) for any \(0\le h<{\overline{h}}\).

Proof

In order to get a solution to (2.4), we consider the function \(F_h(X) := Y + \frac{h}{2}[B(X),X] + \frac{h^2}{4}B(X)XB(X)\), such that (2.4) is equal to \(X = F_h(X)\). In order to determine \({\overline{h}}\), we consider the initial value problem:

$$\begin{aligned} \dfrac{d}{dh}X&= \dfrac{\partial F_h(X)}{\partial h} + DF_h(X)\left[ \dfrac{d}{dh}X\right] \\ X(0)&= Y. \end{aligned}$$

Since \(\dfrac{\partial F_h(X)}{\partial h}\) is continuous, if we prove that the operator \((Id - D F_h(X))\) is continuous and invertible, then the Peano existence theorem will ensure a solution X(h), for any h in some interval \([0,{\overline{h}})\), for \({\overline{h}}>0\). Indeed, \(D F_h(X)=h G(D B (X),B(X),X,h)\), where G is polynomial in its variables and DB(X) is continuous by hypothesis. Hence, \(D F_h(X)\rightarrow 0\), for \(h\rightarrow 0\), therefore there exist some \({\overline{h}}>0\) such that \((Id - D F_h(X))\) is invertible, for any \(0\le h<{\overline{h}}\). \(\square \)

Lemma 4

Let \(B:D\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\rightarrow {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) continuously differentiable in the domain D and let \(0\le h<{\overline{h}}\) as in Lemma 3. Then, for every \(W_k\in D\), the numerical scheme \(W_k\rightarrow W_{k+1}\) is isospectral. Moreover, if \(D\subset V\), for D domain in the linear subspace \(V\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\), and \(B:D\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\rightarrow {\mathfrak {n}}(V)\), where \({\mathfrak {n}}(V)={\mathfrak {g}}_0\oplus {\mathfrak {c}}(V)\), for some Lie algebra \({\mathfrak {g}}_0\) which satisfies (2.2), then \(W_{k+1}\in V\). Furthermore, when V is a J-quadratic Lie algebra such that \(J^2 \in {\mathfrak {c}}({\mathfrak {g}}) \), then \(W_{k+1}\in {\mathscr {O}}_{W_k}\subset V\), where \({\mathscr {O}}_{W_k}\) is the coadjoint orbit of which \(W_k\) belongs.

Proof

Clearly \(W_{k+1} = (Id + \frac{h}{2}B({\widetilde{W}}))(Id - \frac{h}{2}B({\widetilde{W}}))^{-1}W_k(Id - \frac{h}{2}B({\widetilde{W}}))(Id + \frac{h}{2}B({\widetilde{W}}))^{-1}\) and hence \(W_{k+1}\) and \(W_k\) are similar. Furthermore, we notice that \((Id - \frac{h}{2}B({\widetilde{W}}))(Id + \frac{h}{2}B({\widetilde{W}}))^{-1}=\text{ Cay }(\frac{h}{2}B({\widetilde{W}}))\), where \(\text{ Cay }\) is the Cayley transform. Therefore we have that:

$$\begin{aligned} W_{k+1}=\text{ Cay }\left( \frac{h}{2}B({\widetilde{W}})\right) ^{-1}W_k\text{ Cay }\left( \frac{h}{2}B({\widetilde{W}})\right) . \end{aligned}$$
(2.5)

Assuming \({\mathfrak {n}}(V)={\mathfrak {g}}_0\oplus {\mathfrak {c}}(V)\), for some Lie algebra \({\mathfrak {g}}_0\) which satisfies (2.2), by [7, Lemma IV.8.7], \(\text{ Cay }\left( \frac{h}{2}B({\widetilde{W}})\right) \) is in the normalizer group N(V) of V and therefore \(W_{k+1}\) is in V as well. When \(V = {\mathfrak {g}}^*\) for \({\mathfrak {g}}\) a J-quadratic Lie algebra such that \(J^2 \in {\mathfrak {c}}({\mathfrak {g}}) \), the transformation (2.5) coincides with the coadjoint action of G on \({\mathfrak {g}}^*\), where G is the respective connected component to the identity of a Lie group with Lie algebra \({\mathfrak {g}}\). Therefore, (2.5) fixes the coadjoint orbits. \(\square \)

Remark 2

We point out that the equation (2.5) reveals an interesting relation between the Cayley transform and the implicit midpoint method. Indeed, the fact that the Cayley transform appears as a consequence of the reduction of the implicit midpoint from \(T^*GL(n,{\mathbb {C}})\) to \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})^*\) may indicate a deeper, perhaps canonical, relation between symplectic Runge–Kutta methods and the Cayley transform. The former are associated to conservation of quadratic first integrals of ODEs and the latter to transforming quadratic Lie algebras in quadratic Lie groups.

Corollary 2

Let the hypotesis of Lemma 3 hold. Then, if \({\mathfrak {n}}(V)={\mathfrak {g}}_0\oplus {\mathfrak {c}}(V)\) and \({\mathfrak {g}}_0\) is a compact Lie algebra, there exists \({\overline{h}}>0\) independent from k such that the scheme (2.3) has solution.

Proof

Since \({\mathfrak {g}}_0\) is a compact Lie algebra, the associate connected Lie group G is compact and therefore the orbits of the action (2.5) are compact. Hence, we can find a minimum \({\overline{h}}>0\) in Lemma 3 independent from the iteration \(k\ge 0\). \(\square \)

Lemma 5

Let \(B:D\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\rightarrow {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\) continuously differentiable in the domain D and let \(0\le h<{\overline{h}}\) as in Lemma 3. Then, for every \(W_k\in D\), the numerical scheme \(W_k\rightarrow W_{k+1}\) in (2.3) descends from the method defined in [18, Def. 1] associated with the implicit midpoint method. In particular, if \(B = \nabla H^\dagger \) for some function \(H:D\subset {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})^*\rightarrow {\mathbb {R}}\), then the method is Lie–Poisson in \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})^*\).

Proof

Consider the second order method as defined in [18, Def. 1] associated with the implicit midpoint method:

$$\begin{aligned} \begin{array}{llll} &{}X=-h(W_k + \frac{1}{2}X)B({\widetilde{W}})\\ &{}Y=hB({\widetilde{W}})(W_k + \frac{1}{2}Y)\\ &{}K=\frac{h}{2}B({\widetilde{W}})(X + K)\\ &{}{\widetilde{W}}=W_k + \frac{1}{2}(X+Y+ K)\\ &{}W_{k+1}=W_k + h[B({\widetilde{W}}),{\widetilde{W}}],\end{array} \end{aligned}$$
(2.6)

for \(k\ge 0\) with unknowns \(X,Y,K\in {{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})\). It is not hard to check that the following identities hold:

$$\begin{aligned}&Y+K=hB({\widetilde{W}}){\widetilde{W}}\\&X=-h{\widetilde{W}}B({\widetilde{W}})+\frac{h^2}{2}B({\widetilde{W}}){\widetilde{W}}B({\widetilde{W}}). \end{aligned}$$

Applying these to (2.6) we get, after some computations, the scheme (2.3). In [18, Thm. 3], it has been proven that when \(B(W)=\nabla H(W)^\dagger \), for some functions \(H:{{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})^*\rightarrow {\mathbb {R}}\), the method is a Lie-Poisson integrator in \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})^*\). The scheme \(W_k\rightarrow W_{k+1}\) defined in (2.3) coincides with (2.6), but with the elimination of the intermediate variables XYK. Therefore, (2.3) is a Lie–Poisson integrator. \(\square \)

Proof. (Theorem 1)

The proof simply follows from the lemmas. Lemma 3 says that the method (2.3) has solution for h sufficiently small. Under the assumptions of Lemma 4 proves the isospectrality of the scheme and its intrinsic restriction V, when \({\mathfrak {n}}(V)={\mathfrak {g}}_0\oplus {\mathfrak {c}}(V)\), for some Lie algebra \({\mathfrak {g}}_0\) which satisfies (2.2). Finally, in Lemma 5 is shown that the scheme descends from the isospectral midpoint method defined in [18] and therefore it is a second order Lie–Poisson integrator in \({{\mathfrak {g}}}{{\mathfrak {l}}}(n,{\mathbb {C}})^*\), when (1.1) is. Putting together Lemma 4, Lemma 5 and Corollary 1, we have that when a V is the dual of a J-quadratic Lie algebra such that \(J^2 \in {\mathfrak {c}}({\mathfrak {g}})\) (possibly plus a commutative Lie algebra) and (1.1) is Lie–Poisson, the scheme (2.3) is a Lie–Poisson integrator on V, which preserves the coadjoint orbits. \(\square \)

Remark 3

We notice that the isospectral minimal midpoint (2.3) is somehow similar to the modified implicit midpoint rule introduced in [4]. However, in their scheme, \({\widetilde{W}}\) was set to be \(\frac{W_{k+1}+W_k}{2}\) which does not hold in general while solving the isospectral minimal midpoint (2.3). In fact, even though the scheme in [4] is isospectral, it is not symplectic.

Remark 4

The isospectral minimal midpoint (2.3) can be derived in a different way, as proposed in [6]. The construction there is more general and (2.3) can be recovered choosing as a retraction map the Cayley transform instead of the exponential map. This surprising connection opens up a question about a geometrical description of the methods proposed in [18, Def. 1]. Let us consider for any \(s=1,2,\ldots \) and a\(s\times s\) real matrix, a retraction map \(\tau _a:{\mathfrak {g}}^{\oplus s}\rightarrow G^{\times s}\). Then, similarly to [6], for each \(i=1,\ldots ,s\), it is implicitly defined by the differential of the retraction map \(d\tau _a\) a discrete map \(W_k\mapsto {\widetilde{W}}_i\ni {\mathfrak {g}}\). Finally, we define our integrator \(\varPsi _h:W_k\mapsto W_{k+1}\) as:

$$\begin{aligned} W_{k+1} = W_k + h\sum _{i=1}^s b_i[B({\widetilde{W}}_i),{\widetilde{W}}_i], \end{aligned}$$

for some real numbers \(b_i\). The question is whether, for any s-stage symplectic Runge–Kutta method, there exists a retraction map \(\tau _a:{\mathfrak {g}}^{\oplus s}\rightarrow G^{\times s}\), such that any Lie–Poisson integrator defined in [18] can be obtained in this way.

3 Numerical examples

In this section we present some applications of the isospectral minimal midpoint (2.3) on isospectral flows and Lie–Poisson systems found in literature. We also compare our method in the case of \({{\mathfrak {s}}}{{\mathfrak {o}}}(3)\cong ({\mathbb {R}}^3,\times )\) with the spherical midpoint method, showing that the isospectral minimal midpoint (2.3) has the same computational cost. Finally, we show explicitly how the isospectral minimal midpoint (2.3) looks on \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\), applying it to the the point vortex equations on the hyperbolic plane. For the example considered in this section, we plot the variation of the first integrals of (1.1). As expected, we get exact conservation (up to round-off errors) of the Casimir functions and, when the flow is Hamiltonian, near conservation of the Hamiltonian.

3.1 The generalized rigid body

A classical example among Hamiltonian isospectral systems is the generalized rigid body. It represents a class of completely integrable systems on \({{\mathfrak {s}}}{{\mathfrak {o}}}(n)\), for every \(n\ge 1\), [14]. The Hamiltonian is given by

$$\begin{aligned} H(W) = \frac{1}{2}{{\,\mathrm{Tr}\,}}(({\mathscr {I}}^{-1}W)^\dagger W),\qquad W\in {{\mathfrak {s}}}{{\mathfrak {o}}}(n), \end{aligned}$$
(3.1)

where \({\mathscr {I}}:{{\mathfrak {s}}}{{\mathfrak {o}}}(n)\rightarrow {{\mathfrak {s}}}{{\mathfrak {o}}}(n)\) is a symmetric positive definite inertia tensor. The equations of motion are then

$$\begin{aligned} \left. \begin{array}{ll} {\dot{W}} = -[{\mathscr {I}}^{-1}W,W] \\ W(0)=W_0. \end{array}\right. \end{aligned}$$
(3.2)

We discretize this system for \(n=10\). Our implementation uses Newton iterations for the non-linear system.Footnote 5 The inertia tensor is given by

$$\begin{aligned} ({\mathscr {I}}^{-1}W)_{ij} =\left\{ \begin{array}{ll} \frac{W_{ij}}{i} , \quad i=1,\ldots ,5,j=1,\ldots ,10\\ \frac{W_{ij}}{11-i} , \quad i=6,\ldots ,10,j=1,\ldots ,10\end{array}\right. \end{aligned}$$
(3.3)

and we use the stepsize \(h=0.1\). The initial conditions are given by

$$\begin{aligned} (W_0)_{ij}=1/10 \quad \text {for}\quad i<j \qquad \text {and}\quad W_0^\dagger = -W_0 \end{aligned}$$
(3.4)

As shown in Fig. 1, the Hamiltonian is nearly conserved and the Casimir functions are conserved up to the accuracy of the Newton iterations.

Fig. 1
figure 1

Casimir and Hamiltonian variation in time \(T=100\), for the generalized rigid body on \({{\mathfrak {s}}}{{\mathfrak {o}}}(10)\) and time-step \(h=0.1\)

3.2 The Brockett flow

In this section we specify the isospectral minimal midpoint (2.3) for the Brockett flow, or double bracket flow:

$$\begin{aligned} {\dot{W}} = [[N,W],W], \end{aligned}$$
(3.5)

where NW are \(n\times n\) self-adjoint complex matrices. In [3], Brockett shows that for N diagonal matrix with distinct entries and \(W_0\) self-adjoint matrix with distinct eigenvalues, for \(t\rightarrow \infty \), W(t) converges exponentially fast to a diagonal matrix with the eigenvalues sorted accordingly to the order of the entries of N. In Fig. 2, we plot the eigenvalue variation for a randomly generatedFootnote 6 self-adjoint initial matrix \(W_0\) of dimension \(10\times 10\) and \(N=diag(1,2,\ldots ,10)\). The asymptotic stationarity of the eigenvalues variation reflects the fact that W is close to a diagonal matrix.

Fig. 2
figure 2

Eigenvalue variation in time \(T=1000\), for the isospectral minimal midpoint (2.3) applied to (3.5) with time-step \(h=0.1\). Then initial value \(W_0\) is a randomly generated self-adjoint matrix of dimension \(10\times 10\) and \(N=diag(1,2,\ldots ,10)\)

3.3 Lie–Poisson systems on \(({\varvec{\mathbb {R}}}^3,\times )\)

On \(({\mathbb {R}}^3,\times )\) the isospectral minimal midpoint (2.3) can be written as:

$$\begin{aligned} \begin{array}{ll} &{}w_k={\widetilde{w}} + \frac{h}{2}{\widetilde{w}}\times B({\widetilde{w}}) - \frac{h^2}{4}B({\widetilde{w}})(B({\widetilde{w}})\cdot {\widetilde{w}})\\ &{}w_{k+1}={\widetilde{w}} - \frac{h}{2}{\widetilde{w}}\times B({\widetilde{w}}) - \frac{h^2}{4}B({\widetilde{w}})(B({\widetilde{w}})\cdot {\widetilde{w}}), \end{array} \end{aligned}$$
(3.6)

for \({\widetilde{w}},w_k,w_{k+1}\in {\mathbb {R}}^3\) and \(B:{\mathbb {R}}^3\rightarrow {\mathbb {R}}^3\). We want to compare the isospectral minimal midpoint (3.6) with another minimal-variable symplectic integrator on \({\mathbb {R}}^3\) introduced in [17], i.e. the spherical midpoint method:

$$\begin{aligned}&w_{k+1}=w_k + h\dfrac{\sqrt{w_{k+1}}\sqrt{w_k}(w_{k+1}+w_k)}{|w_{k+1}+w_k|}\times B\left( \dfrac{\sqrt{w_{k+1}}\sqrt{w_k}(w_{k+1}+w_k)}{|w_{k+1}+w_k|}\right) .\nonumber \\ \end{aligned}$$
(3.7)

Remark 5

Let \(B(\cdot )\) be orthogonal with respect to the rays, i.e. \(B(w)\cdot w=0\), for every \(w\in {\mathbb {R}}^3\). It is immediate to check that then (3.6) coincides with the classical midpoint scheme:

$$\begin{aligned} \begin{array}{ll}&w_{k+1}=w_k + h\dfrac{w_{k+1}+w_k}{2}\times B\left( \dfrac{w_{k+1}+w_k}{2}\right) . \end{array} \end{aligned}$$
(3.8)

In [17] it is shown that also (3.7) coincides with (3.8) when \(B(\cdot )=\nabla H(\cdot )\), for some Hamiltonian function \(H:{\mathbb {R}}^3\rightarrow {\mathbb {R}}\) constant on the rays (which implies \(B(\cdot )\) to be orthogonal to the rays). In this case, (3.8) is known to be symplectic, whereas this fails for general Hamiltonian H. Therefore, (3.6) can be seen as the second order correction of (3.8) to be symplectic for any Hamiltonian H.

Let us now consider the two schemes (3.6) and (3.7). Both methods are implicit and therefore an implicit solver has to be used. Here we show that they exhibit the same computational cost. The example we consider is the Heisenberg spin chain on \({\mathbb {R}}^{3N}\). For this one has to extend both the isospectral minimal midpoint (3.6) and the spherical midpoint (3.7) to direct products of \({\mathbb {R}}^3\) (see [17, 18]).

The Heisenberg spin chain of micromagnetics is defined as:

$$\begin{aligned} {\dot{w}}_i = w_i\times (w_{i-1} + w_{i+1}), \end{aligned}$$
(3.9)

where \(w_i\in {\mathbb {S}}^2\), for \(i=1,\ldots ,N\) and \(w_{N+1}=w_1\). It corresponds, up to scaling, to spatial discretization of the Landau–Lifschitz PDE:

$$\begin{aligned} {\dot{w}} = w\times \partial _{xx} w, \end{aligned}$$
(3.10)

for \(w:{\mathbb {S}}^1\rightarrow {\mathbb {S}}^2\) smooth. We notice that (3.9) is a Lie–Poisson system on \({\mathbb {R}}^{3N}\), with Hamiltonian:

$$\begin{aligned} H(w_1,\ldots ,w_N) = \sum _{i=1}^{N} w_i\cdot w_{i+1}. \end{aligned}$$

Clearly, to get a good approximation of (3.10), N has to be large. In Fig. 3 we show the average time cost for time-step with respect to the number of spin particles for both the isospectral minimal midpoint (3.6) and the spherical midpoint (3.7). We conclude that the complexity grows similarly.

Fig. 3
figure 3

Average time cost per time-step in seconds, with respect to the number of spin particles, for randomly generated initial values. The upper and the lower line are referred to, respectively, the isospectral minimal midpoint (3.6) and the spherical midpoint (3.7)

Fig. 4
figure 4

Hamiltonian variation \(|H(k h)-H(0)|\) in time \(T=1000\), for the isospectral minimal midpoint (3.6) above and the spherical midpoint (3.7) below, for \(N=100\) spin particles and time-step \(h=0.1\)

In terms of conservation properties, the two schemes exactly preserve the linear invariants and nearly conserve the the quadratic first integrals of the form \(\sum _{i,j}w_i^\dagger A w_j\). Moreover, the spherical midpoint has the advantage of exactly conserving all the quadratic first integrals of the form \(w_i^\dagger A w_i\), for some square matrix A, whereas the isospectral minimal midpoint (3.6) exactly conserves only the quadratic invariants \(w_i^\dagger w_i\). In Fig. 4 we compare the isospectral minimal midpoint (3.6) and the spherical midpoint (3.7) for the initial data given as am equispaced discretization in \(N=100\) points of the closed spherical curve:

$$\begin{aligned} w(x)=(\cos (2\pi x^2)\sin (2\pi x^3),\sin (2\pi x^2)\sin (2\pi x^3),\cos (2\pi x^3)), \end{aligned}$$

for \(x\in [0,1]\). We can conclude from Fig. 4 that the spherical midpoint performs slightly better than the isospectral minimal midpoint (3.6). However, both the schemes show the desired conservation properties due to their symplecticity. Finally, in Fig. 5, we present the error diagram for the isospectral minimal midpoint (3.6) and the spherical midpoint (3.7). The curves in Fig. 5 show the expected second order of the schemes, with no significant difference.

Fig. 5
figure 5

Maximum error in total time \(T=1s\), and time-step h, for \(h=1, 0.5^{2},\ldots ,0.5^{17}\), in loglog scale, for the isospectral minimal midpoint (3.6), dot-dashed line, and the spherical midpoint (3.7), dashed line, for \(N=100\) spin particles. The continuous line is \(h\mapsto h^2\)

3.4 Lie–Poisson systems on \(\varvec{{{\mathfrak {s}}}{{\mathfrak {l}}}}(2,{\varvec{\mathbb {R}}})^*\)

In this section we specify the isospectral minimal midpoint (2.3) in the case of the Lie algebra \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\), i.e. the \(2\times 2\) matrices with zero trace. The first observation is that \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\cong {{\mathfrak {s}}}{{\mathfrak {p}}}(2,{\mathbb {R}})\), which is a non-compact J-quadratic Lie algebra with respect to \(J=\begin{bmatrix} 0&\quad -1\\ 1&\quad 0 \end{bmatrix}.\) From this, it is straightforward to see that, when \(B:{{\mathfrak {g}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\rightarrow {{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\) and \(W_k\in {{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\), \({\widetilde{W}}\) in (2.3) is also in \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\). We notice that this is no longer true for \({{\mathfrak {s}}}{{\mathfrak {l}}}(n,{\mathbb {R}})\), for \(n>2\). On the other hand, any element in \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\) can be written as a vector in \({\mathbb {R}}^3\), via the vector spaces isomorphism:

$$\begin{aligned} \begin{bmatrix} x&\quad y+z\\ y-z&\quad -x \end{bmatrix}\mapsto \begin{bmatrix}x\\y\\z \end{bmatrix}, \end{aligned}$$
(3.11)

for any \(x,y,z\in {\mathbb {R}}\). In this coordinates, we can express the isospectral minimal midpoint (2.3) for \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\) as:

$$\begin{aligned} w_k= & {} {\widetilde{w}} + \frac{h}{2}2L({\widetilde{w}}\times B({\widetilde{w}})) - \frac{h^2}{4}M(B({\widetilde{w}}),{\widetilde{w}},B({\widetilde{w}}))\nonumber \\ w_{k+1}= & {} {\widetilde{w}} - \frac{h}{2}2L({\widetilde{w}}\times B({\widetilde{w}})) - \frac{h^2}{4}M(B({\widetilde{w}}),{\widetilde{w}},B({\widetilde{w}})), \end{aligned}$$
(3.12)

for \({\widetilde{w}},w_k,w_{k+1}\in {\mathbb {R}}^3\) and \(B:{\mathbb {R}}^3\rightarrow {\mathbb {R}}^3\), where:

$$\begin{aligned} L := \begin{bmatrix} 1&\quad 0&\quad 0\\ 0&\quad 1&\quad 0\\ 0&\quad 0&\quad -1 \end{bmatrix} \end{aligned}$$

and

$$\begin{aligned}&M(a,b,c) \\&\quad := \begin{bmatrix} c_1(a_1b_1 + (b_2 - b_3)(a_2 + a_3)) - (c_2 - c_3)(b_1(a_2 + a_3) - a_1(b_2 + b_3))\\ c_1(b_1(a_2 + a_3) - a_1(b_2 + b_3)) + (c_2 + c_3)(a_1b_1 + (b_2 - b_3)(a_2 + a_3))\\ c_1(b_1(a_2 - a_3) - a_1(b_2 - b_3)) + (c_2 - c_3)(a_1b_1 + (b_2 + b_3)(a_2 - a_3)) \end{bmatrix}, \end{aligned}$$

for any \(a,b,c\in {\mathbb {R}}^3\).

We notice that the map (3.11) is a Lie algebra isomorphism from \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})\) to \(({\mathbb {R}}^3,\times _L)\), where \(a\times _L b = 2L (a\times b)\), for any \(a,b\in {\mathbb {R}}^3\). Furthermore, the tensor L defines also the hyperbolic inner product \(a\cdot _L b = a\cdot (Lb)\), for any \(a,b\in {\mathbb {R}}^3\). We recall that the coadjoint orbits in \({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})^*\) are hyperboloids of the form \(\lbrace x^2+y^2-z^2=const\rbrace \). Hence, in analogy with the spherical midpoint method in [16], we will call (3.12) the hyperbolic midpoint method.

Fig. 6
figure 6

Point vortex trajectories for the initial conditions \(w_0^1,\varGamma ^1\) and \(w_0^2,\varGamma ^2\), as defined above. The purple, the blue and the yellow lines represent the point vortex trajectories. The red-dashed line is, respectively, the equilateral triangle of the initial configuration \(w_0^1\) and the geodesic passing through the initial condition \(w_0^2\). The simulations have been carried with the hyperbolic midpoint method (3.12), with time-step, respectively, \(h=0.01\) and \(h=0.001\), total time \(T=10\) and \(T=1\) and tolerance for the Newton iteration \(tol=10^{-13}\) (color figure online)

Fig. 7
figure 7

Momentum and Hamiltonian variation in time for the initial conditions \(w_0^1,\varGamma ^1\) and \(w_0^2,\varGamma ^2\), as defined above. The simulations have been carried with the hyperbolic midpoint method (3.12), with time-step, respectively, \(h=0.01\) and \(h=0.001\), total time \(T=10\) and \(T=1\) and tolerance for the Newton iteration \(tol=10^{-13}\)

We illustrate an application of the hyperbolic midpoint method (3.12) on the point vortex equations on the hyperbolic plane (see for example [8, 9, 19]). The interest in this equations is motivated also by the studies on ideal hydrodynamics on hyperbolic spaces [5, 11], and in particular on the Euler equations, for which the point vortices can be seen as a finite dimensional approximation [2]. These equations are a Lie–Poisson system on \(({{\mathfrak {s}}}{{\mathfrak {l}}}(2,{\mathbb {R}})^*)^N\cong ({\mathbb {R}}^3,\times _L)^N\), with initial values on the coadjoint orbit determined by the equations \(w_i\cdot _L w_i=-1\), for \(i=1,2,\ldots ,N\). The Hamiltonian is given by:

$$\begin{aligned} H = -\frac{1}{4\pi }\sum _{i\ne j}\varGamma _i\varGamma _j \log \left( \dfrac{w_i\cdot _L w_j + 1}{w_i\cdot _L w_j - 1}\right) . \end{aligned}$$
(3.13)

The equations of motion are then:

$$\begin{aligned} {\dot{x}}_i = -\frac{1}{\pi }\sum _{i\ne j}\varGamma _j \dfrac{w_i\times _L w_j}{(w_i\cdot _L w_j)^2 - 1}. \end{aligned}$$
(3.14)

Equations (3.14) constrain the vortices to move on the hyperboloid \(x^2+y^2-z^2=-1\). Furthermore, the \(SL(2,{\mathbb {R}})\) symmetry of (3.14) gives the conservation of the momentum vector:

$$\begin{aligned} M = \sum _{i=1}^N \varGamma _i w_i. \end{aligned}$$
(3.15)

Equations (3.14) and their \(SL(2,{\mathbb {R}})\)-relative equilibria have been studied in [8, 9, 19]. In particular, for two and three vortices most of the stability issues have been worked out in [19]. However, unlike to point vortex equations on a sphere [13], it is still unknown a general result on the stability of a relative equilibrium of point vortices on the hyperbolic plane.

Here we present the results of some numerical simulations of (3.14) with the hyperbolic midpoint method (3.12). In particular, we consider as initial values some of the relative equilibria found in [9, 19]. Let us take two different initial values in \(({\mathbb {R}}^3)^3\), \(w_0^1\) and \(w_0^2\), whose columns represent the initial position of three vortices with strengths respectively equal to \(\varGamma ^1\) and \(\varGamma ^2\), as defined here below:

$$\begin{aligned} w^1_0 = \begin{bmatrix} -0.5000&\quad -0.5000&\quad 1.0000 \\ 0.8660&\quad -0.8660&\quad -0.0000 \\ 1.4142&\quad 1.4142&\quad 1.4142 \\ \end{bmatrix}, w^2_0 = \begin{bmatrix} 2.6000&\quad 4.0000&\quad 3.0000 \\ 0.1923&\quad 0.1250&\quad 0.1667 \\ 2.7923&\quad 4.1250&\quad 3.1667 \\ \end{bmatrix}, \end{aligned}$$
$$\begin{aligned} \varGamma ^1 = \begin{bmatrix} 0.5317&\quad 0.0761&\quad 1.0000 \end{bmatrix}, \varGamma ^2 = \begin{bmatrix}0.0990&\quad 0.8091&\quad 1.0000\end{bmatrix}. \end{aligned}$$

The initial condition \(w_0^1\) is an equilateral relative equilibrium, whereas \(w_0^2\) is a geodesic relative equilibrium, as defined in [19]. The fist initial condition is known to be stable, whereas it is not known for the second one. However, from Fig. 6 we can see that both the initial conditions evolve in close trajectories, which proves numerically the stability for both of them.

We conclude showing in Fig. 7 the conservation properties for the hyperbolic midpoint method (3.12), concerning the first integrals (3.15) and (3.13).