Page 1 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 7 8 9 10 Continuous changes of variables and the Magnus 11 12 expansion 13 14 Fernando Casas,∗ Philippe Chartier,† Ander Murua‡ 15 16 July 1, 2019 17 18 19 20 Abstract 21 22 In this paper, we are concerned with a formulation of Magnus and Floquet- 23 Magnus expansions for general nonlinear differential equations. To this aim, we 24 introduce suitable continuous variable transformations generated by operators. 25 As an application of the simple formulas so-obtained, we explicitly compute the 26 first terms of the Floquet-Magnus expansion for the Van der Pol oscillator and 27 the nonlinear Schrodinger¨ equation on the torus. 28 29 30 1 Introduction 31 32 The Magnus expansion constitutes nowadays a standard tool for obtaining both an- 33 alytic and numerical approximations to the solutions of non-autonomous linear dif- 34 ferential equations. In its simplest formulation, the Magnus expansion [28] aims to 35 construct the solution of the linear differential equation 36 37 Y 0(t) = A(t)Y (t),Y (0) = I, (1) 38 39 where A(t) is a n × n matrix, as 40 41 Y (t) = exp Ω(t), (2) 42 43 where Ω is an infinite ∞ 44 X 45 Ω(t) = Ωk(t), with Ωk(0) = 0, (3) 46 k=1 47 48 whose terms are increasingly complex expressions involving iterated integrals of nested 49 of the matrix A evaluated at different times. 50 Since the 1960s the Magnus expansion (often with different names) has been used 51 in many different fields, ranging from nuclear, atomic and molecular to nu- 52 clear magnetic resonance and , mainly in connection with 53 ∗ 54 Universitat Jaume I, IMAC, Departament de Matematiques,` 12071 Castellon,´ Spain. Email: fer- [email protected] 55 † 56 INRIA, Universite´ de Rennes 1, Campus de Beaulieu, 35042 Rennes, France. Email: [email protected] 57 ‡Konputazio Zientziak eta A.A. Saila, Infomatika Fakultatea, UPV/EHU, 20018 Donostia-San Se- 58 bastian,´ Spain. Email: [email protected] 59 60 1 AUTHOR SUBMITTED MANUSCRIPT - draft Page 2 of 19

1 2 3 4 5 6 . More recently, it has also been the starting point to construct nu- 7 merical integration methods in the realm of geometric numerical integration (see [7] 8 9 for a review), when preserving the main qualitative features of the exact solution, such 10 as its invariant quantities or the geometric structure is at issue [5, 23]. The convergence 11 of the expansion is also an important feature and several general results are available 12 [6, 10, 31, 27]. 13 Given the favourable properties exhibited by the Magnus expansion in the treat- 14 ment of the linear problem (1), it comes as no surprise that several generalizations 15 have been proposed along the years. We can mention, in particular, equation (1) when 16 the (in general complex) matrix-valued function A(t) is periodic with period T . In that 17 18 case, it is possible to combine the Magnus expansion with the Floquet theorem [16] 19 and construct the solution as 20 21 Y (t) = exp(Λ(t)) exp(tF ), (4) 22 23 where Λ(t + T ) = Λ(t) and both Λ(t) and F are series expansions 24 ∞ ∞ 25 X X 26 Λ(t) = Λk(t),F = Fk, (5) 27 k=1 k=1 28 with Λ (0) = 0 for all k. This is the so-called Floquet–Magnus expansion [11], 29 k 30 and has been widely used in problems of solid state physics and nuclear magnetic 31 resonance [26, 29]. Notice that, due to the periodicity of Λk, the constant term Fn can 32 be independently obtained as Fk = Ωk(T )/T for all k. n 33 In the general case of a nonlinear ordinary differential equation in R , 34 0 n 35 x = g(x, t), x(0) = x0 ∈ R , (6) 36 37 the usual procedure to construct the Magnus expansion requires first to transform (6) 38 into a certain linear equation involving operators [1]. This is done by introducing the 39 Lie derivative associated with g and the family of linear transformations Φt such that 40 Φt[f] = f ◦ϕt, where ϕt denotes the exact flow defined by (6) and f is any (infinitely) 41 n 42 differentiable map f : R −→ R. The operator Φt obeys a linear differential equation 43 which is then formally solved with the corresponding Magnus expansion [7]. Once 44 the series is truncated, it corresponds to the Lie derivative of some function W (x, t). 45 Finally, the solution at some given time t = T can be approximated by determining 46 the 1-flow of the autonomous differential equation 47 0 48 y = W (y, T ), y(0) = x0 49 50 since, by construction, y(1) ' ϕT (x0). Clearly, the whole procedure is different and 51 more involved than in the linear case. It is the purpose of this work to provide a uni- 52 fied framework to derive the Magnus expansion in a simpler way without requiring the 53 54 apparatus of chronological calculus. This will be possible by applying the continuous 55 transformation theory developed by Dewar in perturbation theory in classical mechan- 56 ics [17]. In that context, the Magnus series is just the generator of the continuous 57 transformation sending the original system (6) to the trivial one X0 = 0. Moreover, 58 the same idea can be applied to the Floquet–Magnus expansion, thus establishing a 59 60 2 Page 3 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 natural connection with the stroboscopic averaging formalism. In the process, the re- 7 lation with pre-Lie algebras and other combinatorial objects will appear in a natural 8 9 way. 10 The plan of the paper is as follows. We review several procedures to derive the 11 Magnus expansion for the linear equation (1) in section 2 and introduce a binary oper- 12 ator that will play an important role in the sequel. In section 3 we consider continuous 13 changes of variables and their generators in the context of general ordinary differen- 14 tial equations, whereas in sections 4 and 5 we apply this formalism for constructing 15 the Magnus and Floquet–Magnus expansions, respectively, in the general nonlinear 16 setting. There, we also show how they reproduce the classical expansions for linear 17 18 differential equations. As a result, both expansions can be considered as the output 19 of appropriately continuous changes of variables rendering the original system into 20 a simpler form. Finally, in section 6 we illustrate the techniques developed here by 21 considering two examples: the Van der Pol oscillator and the nonlinear Schrodinger¨ 22 equation with periodic boundary conditions. 23 24 25 2 The Magnus expansion for linear systems 26 27 There are many ways to get the terms of the Magnus series (3). If we introduce a 28 (dummy) parameter ε in eq. (1), i.e., we replace A by εA, then the successive terms in 29 30 2 3 Ω(t) = εΩ1(t) + ε Ω2(t) + ε Ω3(t) + ··· (7) 31 32 can be determined by inserting Ω(t) into eq. (1) and computing the derivative of the 33 , thus arriving at [24] 34 35 ∞ X 1 1 1 36 εA = d exp (Ω0) ≡ adk (Ω0) = Ω0 + [Ω, Ω0]+ [Ω, [Ω, Ω0]]+··· (8) Ω (k + 1)! Ω 2 3! 37 k=0 38 39 j j−1 where [A, B] denotes the usual Lie bracket () and adAB = [A, adA B], 40 ad0 B = 0. At this point it is useful to introduce the linear operator 41 A 42 Z t 43 H(t) = (F £ G)(t) := [F (u),G(t)]du (9) 44 0 45 so that, in terms of 46 47 d 2 3 48 R(t) = Ω(t) = εR1(t) + ε R2(t) + ε R3(t) + ··· , (10) dt 49 50 equation (8) can be written as 51 52 1 1 1 ε A = R + R £ R + R £ R £ R + R £ R £ R £ R + ··· . (11) 53 2 3! 4! 54 55 Here we have used the notation 56 57 F1 £ F2 £ ··· £ Fm = F1 £ (F2 £ ··· £ Fm). 58 59 60 3 AUTHOR SUBMITTED MANUSCRIPT - draft Page 4 of 19

1 2 3 4 5 6 Now the successive terms Rj(t) can be determined by substitution of (10) into (11) 7 and comparing like powers of ε. In particular, this gives 8 9 R = A, 10 1 11 1 1 R2 = − R1 £ R1 = − A £ A, 12 2 2 1 1 13 R = − (R £ R + R £ R ) − R £ R £ R 14 3 2 2 1 1 2 6 1 1 1 15 1 1 = (A £ A) £ A + A £ A £ A 16 4 12 17 18 Of course, equation (8) can be inverted, thus resulting in 19 ∞ 20 X Bk Ω0 = adk (εA(t)), Ω(0) = 0 (12) 21 k! Ω 22 k=0 23 where the Bj are the Bernoulli numbers, that is 24 25 x B B B = 1 + B x + 2 x2 + 4 x4 + 6 x6 + ··· 26 ex − 1 1 2! 4! 6! 27 1 1 1 28 = 1 − x + x2 − x4 + ··· 29 2 12 720 30 In terms of R, equation (12) can be written as 31 32 B B ε−1 R = A − B R £ A + 2 R £ R £ A + 4 R £ R £ R £ R £ A + ··· . (13) 33 1 2! 4! 34 35 Substituting (10) in eq. (13) and working out the resulting expression, one arrives to 36 the following recursive procedure allowing to determine the successive terms Rj(t): 37 38 m−j (1) (j) X (j−1) 39 Sm = [Ωm−1,A],Sm = [Ωn,Sm−n ], 2 ≤ j ≤ m − 1 40 n=1 41 m−1 X Bj 42 R (t) = A(t),R (t) = S(j)(t), m ≥ 2. (14) 1 m j! m 43 j=1 44 45 Notice in particular that 46 47 1 S(1) = A £ A, S(1) = − (A £ A) £ A, S(2) = A £ A £ A. 48 2 3 2 3 49 50 At this point it is worth remarking that any of the above procedures can be used to 51 write each Rj in terms of the binary operation £ and the original time-dependent 52 linear operator A, which gives in general one term per binary tree, as in [25, 24], or 53 equivalently, one term per planar rooted tree. However, the binary operator £ satisfies, 54 as a consequence of the Jacobi identity of the Lie bracket of vector fields and the 55 integration by parts formula, the so-called pre-Lie relation 56 57 F £ G £ H − (F £ G) £ H = G £ F £ H − (G £ F ) £ H, (15) 58 59 60 4 Page 5 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 As shown in [22], this relation can be used to rewrite each Rj as a sum of fewer terms, 7 the number of terms being less than or equal to the number of rooted trees with j 8 9 vertices. For instance, the formula for R4 can be written in the simplified form 10 1 1 11 R4 = − ((A £ A) £ A) £ A − A £ (A £ A) £ A 12 6 12 13 upon using the pre-Lie relation (15) for F = G £ G and H = G. 14 If, on the other hand, one is more interested in getting an explicit expression for 15 Ω (t), ithe usual starting point is to express the solution of (1) as the series 16 j 17 ∞ Z 18 X Y (t) = I + A(t1)A(t2) ··· A(tn) dt1 ··· dtn, (16) 19 n=1 ∆n(t) 20 21 where 22 ∆n(t) = {(t1, . . . , tn) : 0 ≤ tn ≤ · · · ≤ t1 ≤ t} (17) 23 24 and then compute formally the logarithm of (16). Then one gets [4, 30, 32, 2] 25 ∞ 26 X Ω(t) = log Y (t) = Ω (t), 27 n 28 n=1 29 with 30 31 1 X 1 Z Ω (t) = (−1)dσ A(t )A(t ) ··· A(t ) dt ··· dt . 32 n n−1 σ(1) σ(2) σ(n) 1 n n ∆n(t) 33 σ∈Sn dσ (18) 34 35 Here σ ∈ Sn denotes a permutation of {1, 2, . . . , n}. An expression in terms only 36 of independent commutators can be obtained by using the class of bases proposed by 37 Dragt & Forest [18] for the generated by the operators A(t1),...A(tn), 38 thus resulting in [3] 39 40 1 X 1 Z t Z t1 Z tn−1 Ω (t) = (−1)dσ dt dt ··· dt 41 n n−1 1 2 n n 0 0 0 (19) 42 σ∈Sn−1 dσ 43 [A(tσ(1)), [A(tσ(2)) ··· [A(tσ(n−1)),A(tn)] ··· ]], 44 45 where now σ is a permutation of {1, 2, . . . , n − 1} and dσ corresponds to the number 46 descents of σ. We recall that σ has a descent in i if σ(i) > σ(i + 1), i = 1, . . . , n − 2. 47 48 49 3 Continuous changes of variables 50 51 Our purpose in the sequel is to generalize the previous expansion to general nonlin- 52 ear differential equations. It turns out that a suitable tool for that purpose is the use 53 of continuous variable transformations generated by operators [17, 9]. We therefore 54 55 summarize next its main features. 56 Given a generic ODE system of the form 57 d 58 x = f(x, t), (20) 59 dt 60 5 AUTHOR SUBMITTED MANUSCRIPT - draft Page 6 of 19

1 2 3 4 5 6 the idea is to apply some near-to-identity change of variables x 7−→ X that transforms 7 the original system (20) into 8 d 9 X = F (X, t), (21) 10 dt 11 where the vector field F (X, t) adopts some desirable form. In order to do that in a 12 convenient way, we apply a one-parameter family of time-dependent transformations 13 of the form 14 z = Ψs(X, t), s ∈ R, 15 16 such that Ψ0(X, t) ≡ X, and x = Ψ1(X, t) is the change of variables that we seek. 17 In this way, one continuously varies s from s = 0 to s = 1 to move from the trivial 18 change of variables x = X to x = Ψ1(X, t), so that for each solution X(t) of (21), 19 the function z(t, s) defined by z(t, s) = Ψs(X(t), t) satisfies a differential equation 20 ∂ 21 z = V (z, t, s). (22) 22 ∂t 23 In particular, we will have that F (X, t) = V (X, t, 0) and f(x, t) = V (x, t, 1). 24 Next, the near-to-identity family of maps X 7−→ z = Ψs(X, t) is defined in terms 25 of a differential equation in the independent variable s, 26 ∂ 27 z(t, s) = W (z(t, s), t, s) (23) 28 ∂s 29 by requiring that z(t, s) = Ψs(z(t, 0), t) for any solution z(t, s) of (23). The map 30 Ψ (·, t) will be near-to-identity if W (z, t, s) is of the form 31 s 2 32 W (z, t, s) = εW1(z, t, s) + ε W2(z, t, s) + ··· , 33 34 for some small parameter ε. 35 2 36 Proposition 1 ([17]) Given F and W = εW1 + ε W2 + ··· , the right-hand side V 37 of the continuously transformed system (22) can be uniquely determined (as a formal 38 series in powers of ε) from V (X, t, 0) = F (X, t) and 39 ∂ ∂ 40 V (x, t, s) − W (x, t, s) = W 0(x, t, s)V (x, t, s) − V 0(x, t, s)W (x, t, s), (24) 41 ∂s ∂t 0 0 42 where W and V refer to the differentials ∂xW and ∂xV , respectively. 43 44 Proof. By partial differentiation of both sides in (23) with respect to t and partial 45 differentiation of both sides in (22) with respect to s, we conclude that (24) holds for 46 all x = z(s, t) = Ψs(x0, t) with arbitrary x0 and all (t, s). One can show that the 47 equality (24) holds for arbitrary (x, t, s) by taking into account that, for given t and s, 48 x0 7→ x = Ψs(x0, t) is one-to-one. 49 Now, since V (x, t, 0) = F (x, t), we have that 50 51 Z s V (x, t, s) = F (x, t) + S(x, t, σ) dσ, (25) 52 0 53 ∂ 0 0 54 where S = ∂t W + W V − V W . Clearly, the successive terms of 55 V = F + εV + ε2V + ··· 56 1 2 57 are uniquely determined by equating like powers of ε in (25). 58 In the sequel we always assume that the generator W of the change of variables 59 60 6 Page 7 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 (i) does not depend on s, and 7 8 (ii) W (x, 0, s) ≡ 0, so that Ψs(x, 0) = x and x(0) = X(0). 9 10 The successive terms in the expansion of V (x, t, s) in Proposition 1 can be conve- d+1 d 11 niently computed with the help of a binary operation £ on maps R −→ R defined 12 as follows. Given two such maps P and Q, then P £Q is a new map whose evaluation 13 at (x, t) ∈ d+1 takes the value 14 R 15 Z t 16 (P £ Q)(x, t) = (P 0(x, τ)Q(x, t) − Q0(x, t)P (x, τ))dτ. (26) 17 0 18 19 Under these conditions, from Proposition 1, we have that 20 ∂ ∂ 21 V (x, t, s) − W (x, t) = W (x, t),V (x, t, s) (27) 22 ∂s ∂t 23 with the notation 24 h i 25 W (x, t),V (x, t, s) := W 0(x, t)V (x, t, s) − V 0(x, t, s)W (x, t) (28) 26 27 for the Lie bracket. 28 29 Equation (27), in terms of 30 ∂ 31 R(x, t) := W (x, t), (29) 32 ∂t 33 reads 34 Z t 35 ∂ 0 0  36 V (x, t, s) = R(x, t) + R (x, τ)V (x, t, s) − V (x, t, s)R(x, τ) dτ ∂s 0 37 38 or equivalently 39 Z s  40 Vs = V0 + sR + R £ Vσdσ , 41 0 42 where we have used the notation Vs(x, t) := V (x, t, s). Since V (X, t, 0) = F (X, t), 43 then 44 s2 s3 45 V (·, ·, s) = s R + R £ R + R £ R £ R + ··· (30) 46 2 3! 47 s2 s3 + F + s R £ F + R £ R £ F + R £ R £ R £ F + ··· 48 2 3! 49 50 with the convention F1 £ F2 £ ··· £ Fm = F1 £ (F2 £ ··· £ Fm). 51 We thus have the following result: 52 53 Proposition 2 A change of variables x = Ψ1(X, t) defined in terms of a continuous 54 change of variables X 7−→ z = Ψs(X, t) with generator 55 2 56 W (x, t) = ε W1(x, t) + ε W2(x, t) + ··· (31) 57 58 59 60 7 AUTHOR SUBMITTED MANUSCRIPT - draft Page 8 of 19

1 2 3 4 5 6 and W (x, 0) ≡ x, transforms the system of equations (20) into (21), where f and F 7 are related by 8 9 1 1 1 10 f = R + R £ R + R £ R £ R + R £ R £ R £ R + ··· (32) 2 3! 4! 11 1 1 12 + F + R £ F + R £ R £ F + R £ R £ R £ F + ··· 13 2 3! 14 and R is given by (29). 15 16 Proposition 2 deals with changes of variables such that X = Ψ1(X, 0) (as a conse- 17 quence of W (X, 0) ≡ X), so that the initial value problem obtained by supplementing 18 (20) with the initial condition x(0) = x is transformed into (21) supplemented with 19 0 X(0) = x 20 0. 21 More generally, one may consider generators W (·, t) within some class C of time- 22 dependent smooth vector fields such that the operator ∂t : C → C is invertible. Next 23 result reduces to Proposition 2, when one considers some class C of generators W (·, t) 24 such that W (x, 0) ≡ 0, so that ∂t : C → C is invertible, with inverse defined as 25 −1 R t ∂t W (x, t) = 0 W (x, τ) dτ. 26 27 Proposition 3 A change of variables x = Ψ1(X, t) defined in terms of a continuous 28 change of variables X 7−→ z = Ψ (X, t) with generator 29 s 30 W (x, t) = ε W (x, t) + ε2 W (x, t) + ··· (33) 31 1 2 32 within some class C of time dependent smooth vector fields with invertible ∂ : C → C 33 t 34 transforms the initial value problem 35 d 36 x = f(x, t), x(0) = x0 (34) 37 dt 38 into 39 d X = F (X, t),X(0) = Ψ−1(x ), (35) 40 dt 1 0 41 where f, F , and R = ∂ W are related by (32), and the binary operator £ : C ×C → C 42 t 43 is defined as −1 0 0 −1 −1 44 P £ Q = (∂t P )Q − Q (∂t P ) = [∂t P,Q]. (36) 45 46 Notice that the operation £ of (36) satisfies the pre-Lie relation (15), and that this 47 proposition applies, in particular, to the class C of smooth (2π)-periodic vector fields d 48 in R with vanishing average. In that case the operator ∂t is invertible, with inverse 49 given by 50 51 X 1 X ∂−1W (x, t) = ei k t Wˆ (x), if W (x, t) = ei k t Wˆ (x). 52 t i k k k k∈Z k∈Z 53 k6=0 k6=0 54 55 56 57 58 59 60 8 Page 9 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 4 Continuous transformations and the Magnus expansion 7 8 Consider now an initial value problem of the form 9 10 d 11 x = ε g(x, t), x(0) = x0, (37) dt 12 13 where the parameter ε has been introduced for convenience. As stated in the intro- 14 duction, the solution x(t) of this problem (20) can be approximated at a given t as the 15 solution y(s) at s = 1 of the autonomous initial value problem 16 17 d Z t 18 y = ε W1(y, t) := ε g(z, τ) dτ, y(0) = x0. 19 ds 0 20 This is nothing but the first term in the Magnus approximation of x(t). As a matter of 21 22 fact, the Magnus expansion is a formal series (31) such that, for each fixed value of t, 23 formally x(t) = y(1), where y(s) is the solution of 24 d 25 y = W (y, t), y(0) = x0. 26 ds 27 The Magnus expansion (31) can then be obtained by applying a change of variables 28 29 x = Ψ1(X, t), defined in terms of a continuous transformation X 7−→ z = Ψs(X, t) 30 with generator W = W (x, t) independent of s, that transforms (37) into 31 d 32 X = 0. 33 dt 34 This can be achieved by applying Proposition 2 with F (X, t) ≡ 0 and f(x, t) = 35 36 εg(x, t), i.e., solving 37 1 1 1 38 ε g = R + R £ R + R £ R £ R + R £ R £ R £ R + ··· (38) 39 2 3! 4! 40 for 41 R(x, t) = ε R (x, t) + ε2 R (x, t) + ε3 R (x, t) + ··· 42 1 2 3 43 and determining the generator W as 44 45 Z t 46 W (x, t) = R(x, τ) dτ. (39) 0 47 48 At this point it is worth analyzing how the usual Magnus expansion for linear 49 systems developed in section 2 is reproduced with this formalism. To do that, we 50 introduce operators Ω(t) and Bs(t) such that 51 52 ∂ W (x, t) := Ω(t)x, V (x, t, s) := B (t)x, W (x, t) := R(t)x. 53 s ∂t 54 55 Now equation (27) reads 56 57  ∂  B x − Rx = ΩB x − B Ωx 58 ∂s s s s 59 60 9 AUTHOR SUBMITTED MANUSCRIPT - draft Page 10 of 19

1 2 3 4 5 6 or equivalently 7 Z s  8 Bs = B0 + sR + R £ Bσdσ , 9 0 10 where the binary operation £ defined in (26) reproduces (9). Since B1(t) = ε A(t) 11 and B0 = 0, then (38) is precisely (11). The continuous change of variables is then 12 given by 13 X 7−→ z = Ψ (X, t) = exp sΩ(t)X 14 s 15 so that 16 Ω(t) Ω(t) Ω(t) x(t) = Ψ1(X, t) = e X(t) = e X(0) = e x(0) 17 18 reproduces the Magnus expansion in the linear case. In consequence, the expression 19 for each term Wj(x, t) in the Magnus series for the ODE (37) can be obtained from the 20 corresponding formula for the linear case with the binary operation (26) and all results 21 collected in section 2 are still valid in the general setting by replacing the commutator 22 by the Lie bracket (28). 23 24 25 5 Continuous transformations and the Floquet–Magnus ex- 26 27 pansion 28 29 The procedure of section 3 can be extended when there is a periodic time dependence 30 in the differential equation. In that case one gets a generalized Floquet–Magnus ex- 31 pansion with agrees with the usual one when the problem is linear. 32 As usual, the starting point is the initial value problem 33 34 d x = ε g(x, t), x(0) = x , (40) 35 dt 0 36 37 where now g(x, t) depends periodically on t, with period T . As before, we apply 38 a change of variables x = Ψ1(X, t), defined in terms of a continuous transformation 39 X 7−→ z = Ψs(X, t) with generator W = W (x, t) that removes the time dependence, 40 i.e., that transforms (40) into 41 42 d 43 X = ε G(X; ε) = ε G (X) + ε2 G (X) + ε3 G (X) + ··· , dt 1 2 3 44 (41) 45 X(0) = x0. 46 47 In addition, the generator W is chosen to be independent of s and periodic in t with 48 the same period T . 49 This can be achieved by considering Proposition 2 with F (X, t) := ε G(X; ε) and 50 f(x, t) := ε g(x, t), solving (32) for the series 51 2 3 52 R(x, t) = ε R1(x, t) + ε R2(x, t) + ε R3(x, t) + ··· 53 54 55 56 57 58 59 60 10 Page 11 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 Thus, for the first terms one gets 7 8 R1 = g − G1 9 10 1 R2 = − R1 £ R1 − R1 £ G1 − G2 11 2 12 1 1 R3 = − (R1 £ R2 + R2 £ R1) + R1 £ R1 £ R1 13 2 3! 14 1 − R £ G − R £ G − R £ R £ G − G 15 1 2 2 1 2 1 1 1 3 16 17 and, in general, 18 Rj = Uj − Gj, j = 1, 2,..., (42) 19 where U only contains terms involving g or the vector fields U and G of a lower 20 j m m 21 order, i.e., with m < j. This allows one to solve (42) recursively by taking the average 22 of Uj over one period T , i.e., 23 Z T 24 1 Gj(X) = hUj(X, ·)i ≡ Uj(X, t)dt, 25 T 0 26 27 thus ensuring that Rj is periodic. Finally, once G and R are determined, W is obtained 28 from (39), which in turn determines the change of variables. 29 If we limit ourselves to the linear case, g(x, t) = A(t)x, with A(t + T ) = A(t), 30 then, by introducing the operators 31 32 W (x, t) := Λ(t)x, V (x, t, s) := Bs(t)x, G(X) := FX, 33 34 the relevant equation is now 35 Z s  36 0 0 37 Bs = F + sΛ + Λ £ Bσdσ , 0 38 39 which, with the additional constraint B1(t) = A(t), leads to 40 0 41 Λ1 = A − F1 42 1 43 Λ0 = − Λ0 £ Λ0 − Λ0 £ F − F 2 2 1 1 1 1 2 44 45 and so on, i.e., exactly the same expressions obtained in [11]. The transformation is 46 now 47 Λ(t) Λ(t) tF x(t) = Ψ1(X, t) = e X(t) = e e x(0) 48 49 thus reproducing the Floquet–Magnus expansion in the periodic case [11]. 50 Several remarks are in order at this point: 51 52 1. This procedure has close similarities with several averaging techniques. As a 53 matter of fact, in the quasi-periodic case, it is equivalent to the high order quasi- 54 stroboscopic averaging treatment carried out in [15]. 55 56 2. A different style of high order averaging (that can be more convenient in some 57 practical applications) can be performed by dropping the condition that W (x, 0) ≡ 58 x, and requiring instead, for instance, that W (x, t) has vanishing average in t. 59 60 11 AUTHOR SUBMITTED MANUSCRIPT - draft Page 12 of 19

1 2 3 4 5 6 −1 In that case, the initial condition in (41) must be replaced by X(0) = Ψ (x0). 7 1 The generator W (x, t) of the change of variables and the averaged vector fields 8 9 ε G(x, t) can be similarly computed by considering Proposition 3 with the class d 10 C of smooth quasi-periodic vector fields (on R or on some smooth manifold) 11 with vanishing average. 12 13 14 6 Examples of application 15 16 The nonlinear Magnus expansion has been applied in the context of control theory, 17 namely in non-holonomic motion planning. The considered systems can be described 18 by equations 19 m 0 X 20 q (t) = A(t)(q) = gi(q)ui, 21 i=1 22 where dim q > dim u, gi are vector fields and the ui are the controls. The (nonlinear) 23 Magnus expansion allows one to express, locally around a given point in the state 24 space, admissible directions of motions in terms of control parameters, so that the 25 26 motion in a desired direction can be reformulated as the optimization of those control 27 parameters that steer the non-holonomic system into the desired direction [32, 19, 21]. 28 In this sense, expression (19) and the corresponding one for the generic, nonlinear 29 case, could be very useful in applications, since it only contains independent terms 30 [20, 21]. 31 As mentioned previously, the general Floquet–Magnus can also be applied in aver- 32 aging. A large class of problems where averaging techniques are successfully applied 33 is made of autonomous systems of the form 34 35 u˙ = Au + εh(u), u(0) = x0, (43) 36 n 37 where h is a smooth function from R to itself (or more generally from a functional n 38 Banach space E space to itself) and A is a skew-symmetric matrix M(R ) (or more 39 2iπ generally a linear operator on E) whose spectrum is included in T Z. Denoting x = 40 e−tAu and differentiating leads to 41 42 x˙ = −Ae−tAu + e−tAu˙ = εe−tAh etAx 43 44 so that x now satisfies an equation of the very form (40) with 45 −tA tA  46 g(x, t) = e h e x . 47 2iπ The T -periodicity of g with respect to time stems from the fact that Sp(A) ⊂ Z. 48 T For this specific case, relation (42) leads to the following expressions 49 50 G1(X) = hg(X, ·)i , (44) 51 Z t  52 1   G2(X) = − g(X, τ), g(X, t) dτ , (45) 53 2 0 54 1 Z t  Z t   55 G3(X) = g(X, τ), [g(X, σ), g(X, t)] dσ dτ 12 56 0 0 1 Z t Z τ   57 + [g(X, σ), g(X, τ))] dσ, g(X, t) dτ . (46) 58 4 0 0 59 60 12 Page 13 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 If g(x, t) is a Hamiltonian vector field with Hamiltonian H(x, t), then all Gi’s are 7 Hamiltonian with Hamiltonian H ’s. These Hamiltonians can be computed through 8 i 9 the same formulas with Poisson brackets in lieu of Lie brackets (see e.g. [5]). 10 11 6.1 Dynamics of the Van der Pol system 12 13 As a first and elementary application of previous results, we consider the Van der Pol 14 oscillator, which may be looked at as a perturbation of the simple harmonic oscillator: 15 16  q˙ = p . (47) 17 p˙ = −q + ε(1 − q2)p 18 19 Clearly, the system is of the form (43) with u = (q, p)T , 20 21  0 1   0  22 A = and h(u) = 2 , −1 0 (1 − u )u2 23 1 24 and is thus amenable to the rewriting (40), where 25 26  cos(t) sin(t)  g(x, t) := e−tAh(etAx) and etA = . 27 − sin(t) cos(t) 28 29 In short, we have 30 x˙ = ε ξ (x)V , 31 t t 32 where 33 34  − sin(t)   V = and ξ (x) = 1−(cos(t)x +sin(t)x )2 (− sin(t)x +cos(t)x ). 35 t cos(t) t 1 2 1 2 36 37 38 Van Der Pol oscillator Van Der Pol oscillator 2.5 2.5 39 40 2 2 41 1.5 1.5

42 1 1 43 44 0.5 0.5

45 p 0 p 0

46 −0.5 −0.5 47 48 −1 −1 49 −1.5 −1.5

50 −2 −2 51 −2.5 −2.5 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 52 q q 53 54 Figure 1: Trajectories of the original Van Der Pol system (in red) and of its averaged 55 version up to second order (in blue) 56 57 58 59 60 13 AUTHOR SUBMITTED MANUSCRIPT - draft Page 14 of 19

1 2 3 4 5 6 Previous formulas give for the first term in the procedure 7 2π 8 1 Z  − 1 (kXk2 − 4)X  (kXk2 − 4) G (X) = ξ (X)V dτ = 8 2 1 = − 2 X 9 1 τ τ 1 2 2π 0 − 8 (kXk2 − 4)X2 8 10 11 and it is then easy to determine an approximate equation of the limit cycle, i.e. kXk2 = 12 2. As for the dynamics of the first-order averaged system, it is essentially governed by 2 13 the scalar differential equation on N(X) := kXk2 14 d N(N − 4) 15 N(X) = 2(X X˙ + X X˙ ) = −ε , dt 1 1 2 2 4 16 17 which has two equilibria, namely kXk2 = 0 and kXk2 = 2. The first one is unstable 18 while the second one is stable. However, the graphical representation (see Figure 1) of 19 the solution of (47) soon convinces us that the true limit cycle is not a perfect circle. 20 In order to determine a better approximation of this limit cycle, we thus compute the 21 next term of the average equation from formula (45): 22 Z 2π Z t 23 −1 G2(X) = (ξt(∇X ξτ ,Vt) Vτ − ξτ (∇X ξt,Vτ ) Vt) dτ 24 4π 0 0 25 " 1 2 4 2 4 2 2 # − X2 32 − 24 X2 + 5 X2 − 88 X1 + 21 X1 + 10 X1 X2 26 = 256 1 4 2 2 2 2 4 27 256 X1 21 X1 + 32 − 88 X1 + 40 X2 + 10 X1 X2 + 5 X2 28 ε2 29 = − D(X)JX, 30 256 31 where  2 4 2 4 2 2  32 32 − 24 X2 + 5 X2 − 88 X1 + 21 X1 + 10 X1 X2 0 33 D(X) = 2 0 D1,1(X) + 64X1 34 35 and  0 1  36 J = . (48) 37 −1 0 38 Now, considering the new quantity L(X) = N(X) + εQ(X) with 39 3 40 Q(X) = νX1X2 , 41 we see from the second-order averaged equation 42 (kXk2 − 4) ε2 43 X˙ = −ε 2 X − D(X)JX, 44 8 256 45 that 46 dL dN 47 = + ε(∇ Q, X˙ ) dt dt X 48 2 N(N − 4) ε 2 N − 4 49 = −ε − (X,D(X)JX) − ε (∇X Q, X) 50 4 128 8 51 L(L − 4) ε2 1 1 = −ε − ε2Q + QL + ε2 Q − ε2 (L − 4)Q + O(ε3) 52 4 2 2ν 2 53 L(L − 4) = −ε + O(ε3) 54 4 55 1 56 for ν = − 2 . A more accurate description of the limit cycle is thus given by the 57 equation ε 58 2 3 kXk2 = 4 + X1X2 . 59 2 60 14 Page 15 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 6.2 The first two terms of the averaged nonlinear Schrodinger¨ equation 7 d 8 (NLS) on the -dimensional torus 9 Next, we apply the results of Section 5 to the nonlinear Schrodinger¨ equation (for a 10 introduction to the NLS see for instance [8, 14, 13]) 11 12  d i∂tψ = −∆ψ + εk ψ · ψ¯ ψ, t ≥ 0, z ∈ , 13 Ta 14 ψ(0, z) = ψ0(z) ∈ E, 15 d d s d 16 where Ta = [0, a] and E = H (Ta) is our working space. We hereafter conform to 17 the hypotheses of [12] and assume that h is a real-analytic function and that s > d/2, 18 ensuring that E is an algebra1. The operator −∆ is self-adjoint non-negative and its 19 spectrum is 20   21 2 d 2 2π  X  2π  22 σ(A) = l2 ; l ∈ d ⊂ , (49) a j Z a N 23  j=1  24 25 so that by Stone’s theorem, the group-operator exp(it∆) is periodic with period T = 2 26 a . We may thus rewrite Schrdinger equation as we did with equation (43). However, 27 2π we shall instead decompose ψ(t, z) = q(t, z) + ip(t, z) in its real and imaginary parts 28 29 and derive the corresponding canonical system in the new unknown 30   31 p(t, ·) s d s d u(t, ·) = ∈ H (Ta) × H (Ta), 32 q(t, ·) 33 34 that is to say 35   −1 2  −1 p0 36 u˙ = J Diag(−∆, −∆)u + εk kuk 2 J u, u(0) = , (50) R 37 q0 38 2 1 2 2 2 1 2 where we have denoted u˙ = ∂tu, kuk 2 = (u ) + (u ) = (u, u) 2 (u and u are 39 R R 40 the two components of u), J is given by (48) and 41  −∆ 0  42 D = . 43 0 −∆ 44 2 d 2 d 45 The operator D if self-adjoint on L (Ta)×L (Ta) and an obvious computation shows 46   47 tJ−1D cos(t∆) sin(t∆) e = := Rt, 48 − sin(t∆) cos(t∆) 49 tJ−1AD 2 d 2 d s d 50 so that e is a group of isometries on L (Ta) × L (Ta) as well as on H (Ta) × 51 s d H (Ta). Owing to (49) it is furthermore periodic (for all t, Rt+T = Rt), with period 2 52 T = a . The very same manipulation as for the prototypical system (43) then leads to 53 2π 54  p  55 x˙ = εg (x, t) , x = 0 , 56 q0

57 1 Under all these assumptions, for all initial value ψ0 ∈ E and all ε > 0, there exits a unique solution 58 ψ ∈ C([0, b/ε[,E) for some b > 0 independent of ε [12]. 59 60 15 AUTHOR SUBMITTED MANUSCRIPT - draft Page 16 of 19

1 2 3 4 5 6 with 7 −1  −1  −1 8 g(x, t) := J −1e−tJ Dk ketJ Dxk2 etJ Dx = R k kR xk2  R x. 9 R2 t+T/4 t R2 t 10 11 Now, it can be verified that 12 −1 13 g(x, t) = J ∇xH(x, t), 14 15 where 16 Z Z r 1 2  17 H(x, t) := K k(Rt x)(t, z)k 2 dz with K(r) = k(σ)dσ. (51) 2 d R 18 Ta 0 19 2 d 20 Remark 1 Recall that the gradient is defined w.r.t. the scalar product (·, ·) on L (Ta)× 2 d 21 L (Ta) that we redefine for the convenience of the reader: for all pair of functions x1 2 d 2 d 22 and x2 in L (Ta) × L (Ta), 23 Z Z 24 1 1 2 2  (x1, x2) = x1(z)x2(z) + x1(z)x2(z) dz = (x1(z), x2(x))R2 dz. 25 d d Ta Ta 26 27 1 2 where x1 and x1 are the two components of x1 and similarly for x2. Hence, by defini- 28 tion of the gradient, we have that 29 30 3 ∀(t, x1, x2) ∈ × E , (∇xH(x1, t), x2) = ∂xH(x1, t) x2. 31 T 32 Furthermore, 33 34 ∀(t, x , x ) ∈ × E3, (R x , x ) = (x ,R x ) 35 1 2 T t 1 2 1 −t 2 36 and 37 3 38 ∀(x1, x2, x2) ∈ E (J∂xg(x1, t)x2, x3) = (x2, J∂xg(x1, t)x3). 39 Finally, if φ1 and φ2 are hamiltonian vector fields, with hamiltonians Φ1 and Φ2, then 40 41 −1 [φ1, φ2] = ∂X φ1 φ2 − ∂X φ2 φ1 = J ∇X {Φ1, Φ2} 42 43 where the Poisson bracket is defined by 44 45 {Φ , Φ } = (Jφ , φ ) . 46 1 2 1 2 47 Now, the first term of the averaged vector field G(X, ε) is simply 48 49 D E G (X) = R k kR Xk2  R X . 50 1 ·+T/4 · R2 · 51 52 s d In order to obtain the second term, we use the simple fact that for any δ ∈ H (Ta) the 53 derivatives w.r.t. x in the direction δ may be computed as 54 55 2  0 2  2  ∂x k kRt xk 2 · δ = k kRt xk 2 ∂xkRt xk 2 · δ 56 R R R 0 2  = 2k kR xk (R x, R δ) 2 57 t R2 t t R 58 59 60 16 Page 17 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 so that 7 8 ∂ (g(x, t)) · δ =R k kR xk2  R δ 9 x t+T/4 t R2 t 0 2  + 2R k kR xk (R x, R δ) 2 R x. 10 t+T/4 t R2 t t R t 11 2 12 Inserted in the expression of G2 we thus obtain the following expression for the ε - 13 term of the averaged equation 14 15 1 Z t  16 G2(X) = − [g(X, τ), g(X, t)] dτ = I1(X) + I2(X) 2 0 17 18 with 19 20 1 Z t  I (X) = − R k kR xk2  R k kR xk2  R xdτ 1 τ+T/4 τ R2 τ+t+T/4 t R2 t 21 2 0 22 1 Z t  23 + R k kR xk2  R k kR xk2  R xdτ t+T/4 t R2 τ+t+T/4 τ R2 τ 24 2 0 25 26 and 27 Z t  0 2  2  28 I (X) = − R k kR xk 2 (R x, R k kR xk 2 R x) 2 R xdτ 2 τ+T/4 τ R τ τ+t+T/4 t R t R τ 29 0 Z t  30 0 2  2  + R k kR xk (R x, R k kR xk R x) 2 R xdτ . 31 t+T/4 t R2 t τ+t+T/4 τ R2 τ R t 0 32 33 As already mentioned, both G1 and G2 are Hamiltonian with Hamiltonian H1 and H2 34 which could have been equivalently computed from H(x, t) in (51) (see Remark 1). 35 36 37 Acknowledgements 38 39 The work of FC and AM has been supported by Ministerio de Econom´ıa y Compe- 40 titividad (Spain) through project MTM2016-77660-P (AEI/FEDER, UE). AM is also 41 supported by the consolidated group IT1294-19 of the Basque Government. PC ac- 42 knowledges funding by INRIA through its Sabbatical program and thanks the Univer- 43 44 sity of the Basque Country for its hospitality. 45 46 47 References 48 49 [1] A. AGRACHEVAND R.GAMKRELIDZE, The exponential representation of flows 50 and the chronological calculus, Math. USSR-Sb., 35 (1979), pp. 727–785. 51 52 [2] A. AGRACHEVAND R.GAMKRELIDZE, The shuffle product and symmetric 53 groups, in Differential Equations, Dynamical Systems, and Control Science, 54 K. Elworthy, W. Everitt, and E. Lee, eds., Marcel Dekker, 1994, pp. 365–382. 55 56 [3] A. ARNAL, F. CASAS, AND C.CHIRALT, A general formula for the Magnus 57 expansion in terms of iterated integrals of right-nested commutators, J. Phys. 58 Commun., 2 (2018), p. 035024. 59 60 17 AUTHOR SUBMITTED MANUSCRIPT - draft Page 18 of 19

1 2 3 4 5 6 [4] I. BIALYNICKI-BIRULA,B.MIELNIK, AND J.PLEBANSKI´ , Explicit solution 7 of the continuous Baker–Campbell–Hausdorff problem and a new expression for 8 9 the phase operator, Ann. Phys., 51 (1969), pp. 187–200. 10 [5] S. BLANESAND F. CASAS, A Concise Introduction to Geometric Numerical 11 12 Integration, CRC Press, 2016. 13 [6] S. BLANES, F. CASAS,J.OTEO, AND J.ROS, Magnus and Fer expansions for 14 15 matrix differential equations: the convergence problem, J. Phys. A: Math. Gen., 16 22 (1998), pp. 259–268. 17 18 [7] S. BLANES, F. CASAS,J.OTEO, AND J.ROS, The Magnus expansion and some 19 of its applications, Phys. Rep., 470 (2009), pp. 151–238. 20 21 [8] R. CARLES, Semi-classical analysis for nonlinear Schrodinger¨ equations, World 22 Scientific, 2008. 23 24 [9] J. CARY, Lie transform perturbation theory for Hamiltonian systems, Phys. Rep., 25 79 (1981), pp. 129–159. 26 27 [10] F. CASAS, Sufficient conditions for the convergence of the Magnus expansion, J. 28 Phys. A: Math. Theor., 40 (2007), pp. 15001–15017. 29 30 [11] F. CASAS,J.A.OTEO, AND J.ROS, Floquet theory: exponential perturbative 31 treatment, J. Phys. A: Math. Gen., 34 (2001), pp. 3379–3388. 32 33 [12] F. CASTELLA, P. CHARTIER, F. MEHATS´ , AND A.MURUA, Stroboscopic aver- 34 aging for the nonlinear Schrodinger¨ equation, Found. Comput. Math., 15 (2015), 35 pp. 519–559. 36 37 [13] T. CAZENAVE, Semilinear Schrodinger¨ Equations, American Mathematical So- 38 ciety, 2003. 39 40 [14] T. CAZENAVE AND A.HARAUX, An Introduction to Semilinear Evolution Equa- 41 tions, Oxford: Clarendon Press, 1998. 42 43 [15] P. CHARTIER,A.MURUA, AND J.SANZ-SERNA, A formal series approach 44 to averaging: exponentially small error estimates, Disc. Cont. Dyn. Syst., 32 45 (2012), pp. 3009–3027. 46 47 [16] E. CODDINGTONAND N.LEVINSON, Theory of Ordinary Differential Equa- 48 tions, McGraw Hill, 1955. 49 50 [17] R. DEWAR, Renormalized canonical perturbation theory for stochastic propaga- 51 tors, J. Phys. A: Math. Gen., 9 (1976), pp. 2043–2057. 52 53 [18] A. DRAGTAND E.FOREST, Computation of nonlinear behavior of Hamiltonian 54 systems using Lie algebraic methods, J. Math. Phys., 24 (1983), pp. 2734–2744. 55 56 [19] I. DULEBA, Locally optimal motion planning of nonholonomic systems, Int. J. 57 Robotic Systems, 14 (1997), pp. 767–788. 58 59 60 18 Page 19 of 19 AUTHOR SUBMITTED MANUSCRIPT - draft

1 2 3 4 5 6 [20] I. DULEBA, On a computationally simple form of the generalized Campbell– 7 Baker–Hausdorff–Dynkin formula, Systems Control Letters, 34 (1998), pp. 191– 8 9 202. 10 [21] I. DULEBAAND W. KHEIFI, Pre-control form of the generalized Campbell– 11 12 Baker–Hausdorff–Dynkin formula for affine nonholonomic systems, Syst. Con- 13 trol Lett., 55 (2006), pp. 146–157. 14 15 [22] K. EBRAHIMI-FARDAND D.MANCHON, A Magnus- and Fer-type formula in 16 dendriform algebras, Found. Comp. Math., 9 (2009), pp. 295–316. 17 18 [23] E. HAIRER,C.LUBICH, AND G.WANNER, Geometric Numerical Integration. 19 Structure-Preserving Algorithms for Ordinary Differential Equations, Springer- 20 Verlag, Second ed., 2006. 21 22 [24] A. ISERLES,H.MUNTHE-KAAS,S.NØRSETT, AND A.ZANNA, Lie-group 23 methods, Acta Numerica, 9 (2000), pp. 215–365. 24 25 [25] A. ISERLESAND S.NØRSETT, On the solution of linear differential equations 26 in Lie groups, Phil. Trans. Royal Soc. A, 357 (1999), pp. 983–1019. 27 28 [26] T. KUWAHARA, T. MORI, AND K.SAITO, Floquet–Magnus theory and generic 29 transient dynamics in periodically driven many-body quantum systems, Ann. 30 Phys., 367 (2016), pp. 96–124. 31 32 [27] G. LAKOS, Convergence estimates for the Magnus expansion, Tech. Rep. 33 arXiv:1709.01791, 2017. 34 35 [28] W. MAGNUS, On the exponential solution of differential equations for a linear 36 operator, Comm. Pure and Appl. Math., VII (1954), pp. 649–673. 37 38 [29] E. MANANGAAND T. CHARPENTIER, On the Floquet–Magnus expansion: Ap- 39 plications in solid-state nuclear magnetic resonance and physics, Phys. Rep., 40 609 (2016), pp. 1–50. 41 42 [30] B. MIELNIKAND J.PLEBANSKI´ , Combinatorial approach to Baker–Campbell– 43 Hausdorff exponents, Ann. Inst. Henri Poincare,´ XII (1970), pp. 215–254. 44 45 [31] P. MOANAND J.NIESEN, Convergence of the Magnus series, Found. Comput. 46 Math., 8 (2008), pp. 291–301. 47 48 [32] R. S. STRICHARTZ, The Campbell–Baker–Hausdorff–Dynkin formula and solu- 49 tions of differential equations, J. Funct. Anal., 72 (1987), pp. 320–345. 50 51 52 53 54 55 56 57 58 59 60 19