A Complex Lie-Symmetry Approach to Calculate First Integrals and Their Numerical Preservation

We calculated Noether-like operators and first integrals of a scalar second-order ordinary differential equation using the complex Lie-symmetry method. We numerically integrated the equations using a symplectic Runge–Kutta method. It was seen that these structure-preserving numerical methods provide qualitatively correct numerical results, and good preservation of first integrals is obtained.


Introduction
Marius Sophus Lie proposed a symmetry-based method for the analytical solution of differential equations using groups of continuous transformations known as Lie groups [1][2][3][4].Amalie Emmy Noether later presented her remarkable theorem that relates variational symmetries with conservation laws or first integrals in Reference [5].In the literature, different methods are available to calculate first integrals of ordinary differential equations (ODEs), including the direct method, the characteristic or multiplier method, the Noether approach, and the partial Noether approach [6][7][8][9].In this paper, we used the classical Noether approach to calculate the first integrals of a harmonic oscillator.We then applied the complex symmetry method in the restricted domain to find the first integrals of a system of harmonic oscillators by considering the Lagrangian in the complex variable domain [10][11][12].
Concerning the numerical solutions of ODEs with quadratic first integrals, it is well known that symplectic numerical methods are a suitable candidate [13].These methods are a subclass of geometric integrators that preserve the geometric properties of the exact flow of ODEs.One class of symplectic methods with optimal order are the Gauss-Legendre Runge-Kutta methods.They are one-step numerical methods for ODEs and preserve all linear and quadratic first integrals of a dynamic system [14].If we intend to preserve cubic or higher-order first integrals, we do not have a general numerical scheme for such a purpose, but we can design a numerical method that has this as its specific goal, for example, with the splitting and discrete-gradient methods [14].In this paper, we present a way of constructing symplectic Runge-Kutta methods.We then take fourth-order Gauss-Legendre Runge-Kutta methods for the numerical integration of ODEs and report good preservation of first integrals by the numerical solution.

Symmetries and First Integrals
Consider a second-order ordinary differential equation, which admits a Lagrangian L satisfying the Euler-Lagrange equation, To explain the invariance criteria for variational problems under a group of transformation, we consider the operator where X is the Noether symmetry generator for the Lagrangian L with gauge function B(t, y), provided the following condition holds, where X (1) is a first-order prolongation of X and D represents total derivative, According to the Noether theorem, for each Noether symmetry of a Euler-Lagrange equation, there corresponds a function called the first integral or conserved quantity of Equation ( 1) with respect to symmetry generator X.

Complex Symmetry Analysis
We first discuss some important results related to complex Noether symmetries, complex Lagrangian, and the Noether theorem in the restricted complex domain.We use them to determine first integrals of second-order restricted complex ODEs [15].We then present expressions for Euler-Lagrange-like equations, conditions for Noether-like operators, and expressions for first integrals corresponding to these operators.For more details, see Reference [10] and references therein.
Consider a system of two second-order ordinary differential equations of the form Suppose we have a transformation y(t) = f + ig and w = w 1 + iw 2 , which converts System (7) to a second-order restricted complex ODE, y = w(t, y, y ). ( Assume that Equation (8) admits a complex Lagrangian L(t, f , g, f , g ), i.e., L = L 1 + iL 2 .Therefore, we have two Lagrangians, L 1 and L 2 , for System (7) that satisfy Euler-Lagrange-like equations: The operators are called Noether-like operators for Lagrangians L 1 and L 2 such that: 2 (L 2 ) + X (1) where A 1 and A 2 are suitable gauge functions.The two first integrals corresponding to Noether-like operators X 1 and X 2 can be found as:

Runge-Kutta Methods
Runge-Kutta methods [16] are one-step numerical methods for the approximate solution of IVPs: These methods provide approximation y n = y(t n ) of the exact solution y(t) at time t n = nh, where n = 0, 1, • • • and h corresponds to the stepsize.The generalized form of an s-stage Runge-Kutta method is with b i representing the weights and c i , the nodes at which stages Y k are evaluated.A Runge-Kutta method can be represented by a Butcher tableau: For explicit Runge-Kutta methods, we have a ki = 0 for k ≤ i,; otherwise, they are implicit.

Symplectic Runge-Kutta Methods
If Equation ( 13) has a quadratic first integral where S is a symmetric square matrix, then we have We want to determine numerical solutions y n such that first integral I(y) is preserved numerically, i.e., y n , Sy n = y n−1 , Sy n−1 n = 0, 1, . . . .

It has been shown
in References [17][18][19] that only symplectic Runge-Kutta methods preserve quadratic first integrals while numerically integrating System (13).Moreover, in this paper we are only considering implicit Runge-Kutta methods to check the numerical preservation of first integrals because explicit methods cannot be symplectic [20].A Runge-Kutta method is symplectic if its coefficients satisfy the following condition [18,19,21]: which can be derived as follows.
Firstly, apply the Runge-Kutta method ( 14) to solve the IVP (13).The stage values are Moreover, for the output values, we have Thus, Evidently from Systems ( 16) and ( 17), we have

Construction of Symplectic RK Methods
Although there exist several techniques to construct symplectic RK methods in the literature [14,22], here we constructed symplectic Runge-Kutta methods with the help of a Vandermonde transformation.This was first discussed in reference [23].
A Vandermonde matrix is given as Pre-and postmultiply, Vandermonde matrix V with symplectic condition (15) as To construct methods with two stages (s = 2), we consider For l, k = 1, For l, k = 2, ∑ i,j The following order two conditions must be satisfied.
Using Equation (24) in Equations ( 20)-( 23), we have and take summation of i from 1 to 2, we get Similarly, If we take the relation Thus, we get Similarly, we get Let us consider the shifted Legendre polynomials P * t on the interval [0, 1], For Gauss methods, we choose abscissa c i as zeros of P * t which have an order 2t.For Radau methods, we choose either c 1 = 0 or c t = 1, or both of them and then take for Radau I methods, the abscissa as the zeros of the polynomial P * t−1 (y) + P * t (y) of order 2t − 1.Similarly, for Radau II methods, we take the abscissa as the zeros of the polynomial P * t (y) − P * t−1 (y) of order 2t − 1.Moreover, for Lobatto III methods, we take the abscissa as the zeros of the polynomial P * t (y) − P * t−2 (y) of order 2t − 2. Thus, we have the following symplectic methods: Gauss, s = 2: Radau I, s = 2: Radau II, s=2: Similarly, we can construct methods with more stages and a higher order.

Construction of First Integrals and Their Numerical Preservation
We construct the first integrals of a system of harmonic oscillators (both coupled and uncoupled) determined by the second-order ODE: We take different values of k and y, as follows: Case I: (k 2 = 1 and y is real) When k 2 = 1 and y(t) is real-valued, (25) becomes a one-dimensional harmonic oscillator equation: that possesses the standard Lagrangian Taking the Lagrangian and inserting it in System (4) yields the following determining system of equations: Comparing different powers of y , we have a system of four partial differential equations whose solution gives rise to: We thus obtain the following 5-Noether symmetry generators: Using Symmetries (30) and Lagrangian (27) in Noether's Theorem (6), we obtain the following first integrals: I 2 = y sin t + y cos t, I 3 = −y cos t + y sin t, y 2 cos 2t, Among these five first integrals, only two are independent [8].We numerically integrate system (26) using a fourth-order Gauss s = 2 symplectic Runge-Kutta method that we refer to from now on as Gauss2.We compare the results of the Gauss2 method with the famous symplectic Euler method [14], given as: for numerically integrating U = f (V) and V = g(U).We take stepsize h = 0.01, and n = 10,000 number of steps.By employing symplectic integrators, we expect the first integrals of the system to be preserved by the numerical schemes, and this is what we have achieved.We look at the deviation of numerically evaluated first integral I(y n ) from the actual value of first integral I(y 0 ).We calculate error by taking the difference of the first integral evaluated at initial value I(y 0 ) with the value of the first integral evaluated at all subsequent numerically approximated values I(y n ) given by the formula Error = |I(y n ) − I(y 0 )|.Figures 1 and 2 represent the absolute error in integral I 2 using the Gauss2 and symplectic Euler method, respectively.Similarly, Figures 3 and 4 represent the absolute error in integral I 3 using the Gauss2 and symplectic Euler method, respectively.It is clear from the figures that the error is very small and bounded, depicting qualitatively correct numerical results.It is worth noting that the error of the Gauss2 method is much less compared to the error of the symplectic Euler method.The reason is that the Gauss2 method is fourth-order and more accurate compared to symplectic Euler method, which has order 1.Similar error behavior is obtained for other first integrals.Case II: (k 2 = 1 and y is complex) When k 2 = 1 and y(t) is a complex function y = f + ig for f and g being real functions of t, we get: which admits the following Lagrangians: Using Lagrangians (33) in (11), we obtain 9-Noether-like operators Invoking Equation ( 12), we obtain the following invariants: associated with Noether-like operators (34).System of Equation (32) is integrated using the Gauss2 method with stepsize h = 0.01 and n = 10,000 number of steps.The absolute error in first integrals I 2,1 , I 2,2 , I 4,1 , and I 4,2 is plotted in Figures 5-8, respectively.Similar error behavior is obtained for I 1,1 , I 1,2 , I 3,1 , I 3,2 , I 5,1 , and I 5,2 .We observe that the error does not grow out of bounds, which shows that the numerical method can mimic the true qualitative feature of the dynamical system.Case III: (k and y are complex) When k and y(t) are both complex, i.e., k = α 1 + iα 2 and y = f + ig for f , g, α 1 , and α 2 being real, the following coupled system of harmonic oscillators is obtained: which admits a pair of Lagrangians [11]: System (36) admits the following 9 Noether-like operators and first integrals:

Conclusions
The first integrals of dynamical system y = −k 2 y were obtained via the classical Noether approach and the complex symmetry method.The later approach yields invariant energy as a particular example that is stored in both oscillators.Since these first integrals are quadratic in nature, the symplectic Runge-Kutta method, whose construction is also given in this paper, was successfully applied to the system, and numerical preservation of these first integrals was obtained.Interestingly, the numerical method presented in this paper could preserve the energy of the single oscillator as well as the energy stored in the pair of coupled oscillators that arise from the complex Noether approach.The error in the first integrals remained bounded for a long time, which would not have been possible if we have employed nonsymplectic integrators.