Variable step-size techniques in continuous Runge-Kutta methods for isospectral dynamical systems

18
ELSEVIER Journal of Computational and Applied Mathematics 82 (1997) 261-278 JOURNAL OF COMPUTATIONAL AND APPLIED MATHEMATICS Variable step-size techniques in continuous Runge-Kutta methods for isospectral dynamical systems I L. Lopez a, C. Mastroserio a, T. Politi b'* a Dipartimento di Matematica, Universitd di Bari, Via E. Orabona 4, 1-70125 Bari, Italy b Dipartimento di Matematica, Politecnico di Bari, Via E. Orabona 4, 1-70125 Bari, Italy Received 8 August 1996; received in revised form 20 January 1997 Abstract In this paper we consider numerical methods for the dynamical system L'=[B(L),L], L(O) =Lo, (*) where L0 is a n x n symmetric matrix, [B(L),L] is the commutator of B(L) and L, and B(L) is a skew-symmetric matrix for each symmetric matrix L. The differential system is isospectral, i.e., L(t) preserves the eigenvalues of L0, for t~>0. The matrix B(L) characterizes the flow, and for special B(.), the solution matrix L(t) tends, as t increases, to a diagonal matrix with the same eigenvalues of L0. In [11] a modification of the MGLRK methods, introduced in [2], has been proposed. These procedures are based on a numerical approximation of the Flaschka formulation of (.) by Runge-Kutta (RK) methods. Our numerical schemes (denoted by EdGLRKs) consist in solving the system (.) by a continuous explicit Runge-Kutta method (CERK) and then performing a single step of a Gauss-Legendre RK method, for the Flaschka formulation of (*), in order to convert the approximation of L(t) to an isospectral solution. The problems of choosing a constant time step or a variable time step strategy are both of great importance in the application of these methods. In this paper, we introduce a definition of stability for the isospectral numerical methods. This definition involves a potential function associated to the isospectral flow. For the class EdGLRKs we propose a variable step-size strategy, based on this potential function, and an optimal constant time step h in the stability interval. The variable time step strategy will be compared with a known variable step-size strategy for RK methods applied to these dynamical systems. Numerical tests will be given and a comparison with the QR algorithm will be shown. Keywords." Isospectral flows; Variable step-size; Continuous Runge-Kutta methods A M S classification." 65L06; 65L15 * Corresponding author. E-mail: [email protected]. Work supported, in part, by the Italian C.N.R. contract no. 96.00240.CT01. 0377-0427/97/$17.00 © 1997 Elsevier Science B.V. All rights reserved PH S 03 77-0427(97)00048-4

Transcript of Variable step-size techniques in continuous Runge-Kutta methods for isospectral dynamical systems

ELSEVIER Journal of Computational and Applied Mathematics 82 (1997) 261-278

JOURNAL OF COMPUTATIONAL AND APPLIED MATHEMATICS

Variable step-size techniques in continuous Runge-Kutta methods for isospectral dynamical systems I

L. Lopez a, C. Mastroserio a, T. Politi b'* a Dipartimento di Matematica, Universitd di Bari, Via E. Orabona 4, 1-70125 Bari, Italy b Dipartimento di Matematica, Politecnico di Bari, Via E. Orabona 4, 1-70125 Bari, Italy

Received 8 August 1996; received in revised form 20 January 1997

A b s t r a c t

In this paper we consider numerical methods for the dynamical system

L'=[B(L),L], L(O) =Lo, (*)

where L0 is a n x n symmetric matrix, [B(L),L] is the commutator of B(L) and L, and B(L) is a skew-symmetric matrix for each symmetric matrix L. The differential system is isospectral, i.e., L(t) preserves the eigenvalues of L0, for t~>0. The matrix B(L) characterizes the flow, and for special B(.), the solution matrix L(t) tends, as t increases, to a diagonal matrix with the same eigenvalues of L0. In [11] a modification of the MGLRK methods, introduced in [2], has been proposed. These procedures are based on a numerical approximation of the Flaschka formulation of ( . ) by Runge-Kutta (RK) methods. Our numerical schemes (denoted by EdGLRKs) consist in solving the system ( . ) by a continuous explicit Runge-Kutta method (CERK) and then performing a single step of a Gauss-Legendre RK method, for the Flaschka formulation of (*), in order to convert the approximation of L(t) to an isospectral solution. The problems of choosing a constant time step or a variable time step strategy are both of great importance in the application of these methods. In this paper, we introduce a definition of stability for the isospectral numerical methods. This definition involves a potential function associated to the isospectral flow. For the class EdGLRKs we propose a variable step-size strategy, based on this potential function, and an optimal constant time step h in the stability interval. The variable time step strategy will be compared with a known variable step-size strategy for RK methods applied to these dynamical systems. Numerical tests will be given and a comparison with the QR algorithm will be shown.

Keywords." Isospectral flows; Variable step-size; Continuous Runge-Kutta methods

A M S classification." 65L06; 65L15

* Corresponding author. E-mail: [email protected]. Work supported, in part, by the Italian C.N.R. contract no. 96.00240.CT01.

0377-0427/97/$17.00 © 1997 Elsevier Science B.V. All rights reserved PH S 03 7 7 - 0 4 2 7 ( 9 7 ) 0 0 0 4 8 - 4

262 L. Lopez et al./ Journal of Computational and Applied Mathematics 82 (1997) 261-278

1. Introduction to the problem

In the last few years a certain effort has been devoted to the numerical solution of isospectral flows (see [2, 3, 5, 9, 11, 12]). The usual form of these dynamical systems is given by

L'(t) = [B(L(t)),L(t)], L(O) =Lo, t>~O, (1)

where L0 is a given n x n symmetric real matrix, B(.) is Lipschitz matrix function mapping symmetric matrices into skew-symmetric matrices and [., .] is the standard Lie-bracket operator

[B(L ), L] = B(L )L - LB(L ). (2)

The theoretical solution L(t) of (1) and (2) is a symmetric real matrix preserving the eigenvalues, that is a(L( t ) )= a(L0) for t~>0, where a(.) is the spectrum (see [3, 7, 10, 14]). The flow (1), (2) is said to be isospectral. Special cases are the Toda flow and the double-bracket flow. In the former case, L(t) is tridiagonal and

B(L) = L+ - (L+)T, (3)

where L+ is the strictly upper triangular part of the matrix L(t). When t --+ + cxz, the flow L(t) tends to a diagonal matrix L(oo), consisting of the eigenvalues of L0 and the dynamics of (1) is strictly related to the QR algorithm.

The double-bracket flow, introduced by Brockett in [1], may be derived by (1) assuming

B(L) = [N,L], (4)

where N is a fixed n x n target symmetric matrix. When N is a diagonal matrix with distinct eigenvalues, then L(t) tends, as t increases, to a diagonal matrix L(oo). If we set

N = d i a g ( n , n - 1, . . . , 1), (5)

the double-bracket flow becomes equivalent to the Toda flow (see [2]). Then, in the following, we will only consider double-bracket flows, since Toda flows may be included in this class using (5). Recently, numerical isospectral methods, based on the Flaschka formulation of (1), have been proposed, see, e.g., the MGLRK methods [2] and the EdGLRKs methods [11].

In the application of these methods both the problems of choosing a constant time step and a variable time-step strategy are of great importance. For instance, an unsuitable constant time step could provide numerical instability, while a step-size variable version of these methods will be effective either to compare these methods to the existing numerical methods for finding eigenvalues or to follow the numerical solution, on the whole integration interval, accurately. In this paper, we introduce a definition of numerical stability for isospectral methods based on a potential function associated to the isospectral double-bracket flows. For the class EdGLRKs, we propose a variable step-size strategy, derived by this potential function, and an optimal constant time-step h for which the numerical stability is satisfied. The variable time-step strategy will be compared with a known variable step-size strategy for RK methods. Finally, numerical tests will be given and a comparison with the QR algorithm will be shown.

L. Lopez et al./ Journal of Computational and Applied Mathematics 82 (1997) 261-278 263

2. Introduction to the numerical methods

In the Flaschka formulation of (1), the solution L(t) is written as

L(t) = U(t)LoUT(t), t~>O, (6)

with U(t) solution of the differential system

U'=B(L)U, U(0) = I, t~>O (7)

where, since B(L) is skew-symmetric, U(t) is an unitary matrix for t~>0 (see [3, 4, 7, 14]). In particular, if the sequence tk+l = tk +hk, for k = 0, . . . ,K, discretizes the time interval, then

a computational form of the Flaschka formulation of (1) consists of a numerical approximation of (6) by

T Lk+l = Vk+lLk Vk+ 1, (8)

where Lk+l ~--L(tk+~) and Vk+~ are unitary matrices, providing an approximation of U(t) at tk+l, obtained by Gauss-Legendre RK methods applied to the unitary differential system

U'(t)=B(L(t))U(t) , U(tk)=L tE[tk,tk+~], k>~O

(see [6]). In [11], Lopez and Politi have proposed a modification of the isospectral MGLRK methods derived in [2]. It consists in solving

L'(t) = [B(L(t)),L(t)], L(tk) =L~, tE[tk, tk+,], (9)

by a continuous v-stage explicit RK method (CERK) defined by

C* A* (10)

b'T(0)

with c* =(c*, . . . ,cv)* *, b*(O)=(b*(O),.. . ,by* (0))V, for 0~<0~< 1, A* = (a*), which provides a con- tinuous approximation L(t) of L(t) (see [16]).

Then a single step of the s-stage GLRK method

c A

b y (11)

with e = (c l , . . . ,cs) T, b = (bl , . . . ,bs) T, A = (aq), is performed on

V'(t)=B(T,(t))V(t), V(t~)=I, tC[tk, t~+,], k>~O. (12)

Finally, the numerical solution Vk+l of (12) is used to convert Lk+~ to an isospectral solution by (8). These isospectral schemes have been denoted by EdGLRKs, where d and 2s are, respectively, the continuous order of accuracy of CERK and the order of GLRK employed. The EdGLRKs methods have order of accuracy given by q = min{ff,2s} where ff = max{d + 1, p} and p is the order of CERK at the mesh points (see [11]). The continuous extension of the Euler method in tandem with the implicit midpoint rule furnishes a second-order numerical procedure denoted by E1GLRK1. We

264 L. Lopez et al./Journal of Computational and Applied Mathematics 82 (1997) 261-278

recall that all ERK methods have a continuous extension of minimal order d = [½(p + 1 )] (see [16]). Then for s~>2, the EdGLRKs method will be the procedure in which CERK is the continuous extension of minimal degree of the ERK method of order p =-2s, in tandem with the s-stage GLRK method (see [11]).

3. The application of a classical step-size control

In this section we will adapt a classical step-size control, used in several common Runge-Kutta routines (see, e.g., the Matlab ODE45 routine) to our EdGLRKs methods. Such a strategy uses the local discretization error estimate to control the time step employed. Here we only consider the application of such a technique to the E1GLRK1 method of order 2, because, for higher-order methods, the procedure may be applied in a similar way.

As method of lower order, we consider the Euler method that applied to (1 ) - (4 ) becomes

Lk+l = Lk + h[B(Lk),Lk].

Under the local hypothesis L~ = L(tk), the local truncation error Mk(h) may be derived by the following relation:

L(tk+l ) -- Lk+l = h~k(h),

where h'~k(h)= 0@2). Now, using the numerical solution Lk+~ given by the E1GLRK1 method, we obtain that

h~k(h) = L(tk+l ) -- Lk+l = [L(tk+l ) -- Lk+l] + [Lk+l -- Lk+l]

= hzk(h) + [Lk+l - Lk+l]

where h z k ( h ) = O(h 3) is the local error of E1GLRK1. Then, the norm IlLk+l-Lk+l]l is a good approximation of hll~k(h)ll. Thus, if we have

IIL +, II ~<TOL, (13)

the time step h is accepted, while if IILk+~-Lk+~ll exceeds TOL, then h is rejected and the step from tk to tk+~ is attempted again with a smaller step size.

By imposing that the new step-size hncw = qh is such that hnew~(hncw)~<TOL, we find an estimate for q given by

( TOE ) '/2

q~< IlZk+ -L+,I I We observe that the described step-size strategy implies that, at each step, the local truncation error is less than TOL. This technique gives an accurate numerical solution on the whole time interval, but could furnish a large number of steps to reach the limit diagonal matrix L(c¢). A different variable time-step strategy, based on the numerical stability control, will be now described. Such a strategy will provide a less number of steps to reach the limit matrix L(c¢).

L. Lopez et al./ Journal of Computational and Applied Mathematics 82 (1997) 261-278 265

4. Potential function, stability and step-size strategy

The choice of a constant time step h may be of great importance, because too large time steps could provide unstable numerical results. On the other hand, a step-size variable version of the EdGLRKs methods will be convenient either in the comparison with the existing numerical methods for finding eigenvalues or to follow accurately the solution on the whole time interval. In this section we try to solve these problems.

In order to introduce our technique, we consider double-bracket flows (which include Toda flows) and associate the least-squares potential function, proposed in [12] to study the stability properties of a particular numerical method, so defined:

4 (Z) = IlL - NIl 2 = [[LII 2 -k- [[NI] 2 - 2tr(UL), (14)

where the norm is the Frobenius norm on matrices ]]X]]2 = tr(XTX), and tr(A) is the trace of the matrix A. Note that q~(L) measures the least-squares differences between the elements of L and the elements of N.

The gradient ~Tq~(L), with respect to the normal Riemannian metric on the set of matrices {UTLoUI U real orthogonal matrix}, is shown to be yTq~(L) = -[[N,L],L] (see [12]). Hence, the isospectral flow (1) - (4) is equivalent to the gradient flow

L' = -~dp(L) = [[N,L],L], L(O) = L0,

and the double-bracket flow is a gradient flow that acts to minimize the least-squares potential function ~b(L).

Then, an effective numerical method for solving (1) - (4) must reproduce at least the stability property that, as the time increases, the numerical potential function is minimized. Thus we can give the following definition:

Definition 1. Let {Lk} be the sequence of similar matrices obtained by an isospectral numerical method applied with constant time step to the double-bracket flow (1)-(4) . The stability interval (0 ,H) of the isospectral method is given by the set of constant time steps h for which

O(Lk+:)~O(Lk), k~O, (15)

where 0( ' ) is the potential function (14) associated to (1)-(4) .

When the isospectral EdGLRKs method is applied, with a constant time step h in the stability interval, then the stability requirement (15) is satisfied. However, if we wish to approximate the limit matrix L(:xD) by a small number of steps, a variable time-step sequence must be employed. In order to derive a step-size selection scheme, we will employ the potential function ~b(.) as a measure of the stability of the EdGLRKs method. We aim to find the time step hk for which the change in potential, given by

AO(Lk)=O(Lk+I)-- O(Lk),

is negative, and such that hk maximizes the absolute value of Aq~(Lk).

266 L. Lopez et al./Journal of Computational and Applied Mathematics 82 (1997) 261-278

For each method in the class EdGLRKs, using an expression of Lk+~ in terms of a function of h and for sufficiently small h, we may approximate A~b(L~, h) by a polynomial of degree 2 in h, with negative coefficient for the linear term. Thus, for each step, the optimal time step hk may be chosen as the value minimizing Adp(Lk, h), i.e., hk will be such that A49(Lk, hk)<A~p(Lk, h ) for all h ¢ h k .

The variable step-size strategy proposed requires the explicit calculation of the numerical solution Vk+~ of (12) in terms of the matrices B(-£(tk +cjh) ) , for l = 1 . . . . . s. Thus, for the sake of simplicity, we will only derive the variable step-size strategy for E1GLRK1 and E2GLRK2 together with an approximation of its stability intervals. However, we have to note that, once Vk+l has been derived, similar techinques may be used for higher-order methods in the class EdGLRKs.

4.1. Step-size strategy for E1 G L R K 1

We begin this section by showing the following:

Theorem 2. Let us consider the E 1 G L R K 1 method applied to (1)-(4) . For sufficiently small h, it fo l lows that

A q~(Zk, h) - - - 2 h l l [N, G] I I 2 _ 2h 2 t r (N [[N, Lk ], [B(L~ ), Lk]] ).

Proof. Now, we set

Bkl = B(-L(tk + ½h)) = [N,-L(tk + ½h)],

where

f~(tk + O h ) = L k +OhZk, 0~<0~<1,

and Zk = [B(Lk),Lk]. The application of the first-stage GLRK method to (12) leads to

Vk+l = I + ½hBkl(I + Vk+l),

from which it follows that

V~+I = (I - 1 -1 ~hBkl ) ~hBkl) ( I + 1

and, because Bk~ is skew-symmetric, we get

vkT+1 : (I + ½hBkl ) - l ( I _ 1 ~ h B k l ) . ~hBkl )(I + 1 -1 ghBkl ) = (I - 1

If we replace the last expression of V~+I and Vk~_ 1 in (8), after some calculations, we obtain

Lk+l(h) = Lk + h[Bkl, i (Lk + Lk+l (h))]

l 2 + ~h Bkl(Lk+l(h)--Lk)Bkl.

Thus, using (8) and because Vk+~ is unitary, the change in the potential function becomes

ix 4J(Lk, h ) = ck(Lk+~ ) - 4J(Lk )

(~6)

= - 2 tr(N(L~+l - Lk))

L. Lopez et al./Journal of Computational and Applied Mathematics 82 (1997) 261-278 267

= --2 tr(N(h[Bkl, ½(Lk + Lk+l )] + O(h 3)))

- 2 h tr(N[Bkl, l (Lk + Lk+l )])

= - 2 h tr(N[[N,L~ + ½hZk], ~ ~(Lk +Lk+~ )]),

where, for sufficiently small h, we have truncated the terms O(h 3). In order to have a computable form of Aq~(Lk, h), we approximate Lk+l(h) by L(tk + h ) , thus it

follows that

AO(Lk, h ) ~- -2h tr(N[[N, Lk + ½hZk],Lk + ½hZk]),

from which it follows

AO(L~, h) TM -2htr(N[[N, Lk], Lk] ) -- h e tr(N([[N, Sk], Lk]

+ [[N, Lk],S~])),

where we have truncated the O(h 3) terms. By setting

Rkl = [[N, Sk],Lk], R~2 = [[N, Lk],Sk] (17)

it is possible to show that

tr(R~l ) = tr(Rkz).

Furthermore, by some standard calculations, we can see that

tr(N[[N, Lk], Lk]) = I[ [N, Lk] II =

Then we get

AO(Lk, h) TM p(Lk, h) = -2hll [N,L~] II 2 - 2h 2 tr(NRk2),

thus, for sufficiently small h, it follows that AO(Lk,h ) is approximated by a polynomial p(Lk,h) of degree 2 in h, which is strictly negative for h--+ 0. []

The typical behaviours of p(Lk, h), depending on the sign of tr(NRk2), are plotted in Figs. 1 and 2. In the case tr(NR/c2)<0 (see Fig. 1) we may minimize the function p(L~,h) obtaining the new

time step hk as the value at which the minimum occurs, i.e.,

II[N, Lk]II 2 h k - [2tr(NRk2)l" (18)

On the other hand, if the term tr(NRk2) is positive, then any positive value h ~< hmax gives a negative value of p(Lk, h) (see Fig. 2). However, in order to avoid the control on the sign of tr(NRk2) we can reconsider the value of hk given by (18).

The previous discussion gives also an approximation of the stability interval of E1GLRK1. In fact, it is sufficient to find a lower bound for the time step sequence {hk}. At this end, because IlZkll = ILL011, it follows that

]IRk2 [[ ~<4HL0]I H [N,L~] [[ 2,

268 L. Lopez et aL /Journal of Computational and Applied Mathematics 82 (1997) 261-278

-1

_21

h k

---..._.__ J

/

- 3 i 1 o oi~ 1 ,is 2

Fig. 1.

I

21

-1

- 2

hk

i i J - ~ • i

\

p(Lk,h) \ i \

\

\ \

x

\ N

i I

/ /

/ /

f i /

/ /

/

1 1.5 2

/

1 /

/

/

I

Fig. 2.

L. Lopez et al./ Journal of Computational and Applied Mathematics 82 (1997) 261-278 269

from which, using the property Itr(XY)l ~ Ilxll llYll, we obtain that the value

1 - (19)

811NIl[[Loll'

is a lower bound for the sequence {hk}. The value 2h defines a time-step interval (0,2h) which is surely contained in the stability interval of the E1GLRKI method. In practice, values greater than 2h could provide stability, because of the large upper bound of the term [IRk211 used in deriving (19) (see also the numerical tests).

4.2. Step-size strategy for E2GLRK2

In this subsection we will show that a similar technique may be applied to the E2GLRK2 method. We recall that E2GLRK2 is the procedure in which CERK is the continuous extension of the classical four-stage ERK method and GLRK is the two-stage Gauss-Legendre Runge-Kutta method. We note that in order to find a variable time-step sequence for this method, it is essential to find an expression for Lk+l(h) like (16). In fact we show the following:

Theorem 3. The numerical solution o f (1)-(4), given by the E2GLRK2 method may be stated in a form similar to (16). In particular we have

Lk+l(h) = Lk + ½h{[D, Lk+l + Lk] + CLk+, - LkC}

+¼h2{D(Lk+, - Lk)D + CLk+,D - DLkC},

where A,D, C are suitable matrices.

Proof. We observe that the two-stage GLRK method (1 1 ) applied to (12) gives

Vk+l = I + h[blB(-£( tk + clh ) )Vkl + b2B(L(tk + c2h))Vk2].

By setting

Bk, =B(£(tk + c,h)),

Kl -----Bkl Vkl,

Bk2 =B(L(tk + c2h)),

K2 = Bk2 Vk2,

we obtain that

Vk+l = I + h(blKl + b2K2) (20)

and

K1 =Bkl[1 + h(allKl + a12K2)],

1£2 =Bk2[1 + h(a21Ki + a22K2)].

2 7 0 L. Lopez et al./Journal of Computational and Applied Mathematics 82 (1997) 261-278

Then, from (20), it follows that

Kl=Bkl I +hallK! + bE V k + l - I - h b l K l ) ,

I, ] K2=Bk2 + -'~l ~,Vk+l -- I - hb2K2) + ha22K2 ,

and, since b l=b2=½, we have

al2D [ I - h(all - al2)Bkl]K1 = 1 - a,2 ) Bkl + --~2 ,.,~1Vk+l,

b2 J

- az2)Bk2]K2= (1 azl~ a21o rl [I + h(a21 - bl J Bk2 + ~T,~k2 yk+l.

From

x/3 al2 1 v ~ al2 1 v'~ a l l - - a 1 2 = 6 ' 1 bE 2 + T =m, 3 2 2 3

it follows that

K1 = - h--~-B~i Bkl[mI + nVk+l]

while from

a21 - - a 2 2 ~--- V/3 a21 a21

6 ' bl - n , bl - m ,

we obtain

x/3 -1 K 2 = [ I + h ~ - B k 2 1 Bk2[nI+mVk+l].

Thus, (20) yields

[ 1' Vk+l = I + ½h I - h-~B~l Bkl[mI + nV~+ll

+lh [I + h--~3Bk2]-lB,~E[nI + mVk+,]

from which

I - ~n - h~-Bk l Bkl ~m + h--~Bk2 Bk2 Vk+l

=I + ~m - h--ff-Bkl

If we set

Bkl = I -- h--6-Bkl B k l ,

Bkl + ~n - h-~-Blc2 Bk2.

[ , Bk2 = + h---~-Bkz Bk2,

= n

L. Lopez et al./Journal of Computational and Applied Mathematics 82 (1997) 261-278 271

then

Vk+ 1 = [I - lh(n-Bkl + mBk2)]-l[I A- ½h(m-Bkl + nBk2)]

and, because Bkl, Bk2 are skew-symmetric matrices, we get

VJ+ l = [1 + ½h(m-Bk, + nBk2)]-l[I -- ½h(n-Bk~ + mBk2)]

= [I - ½h(nBkl + mBk2)][I + ½h(mBkl + nBk2)] -1.

Replacing the last expression of Vk+l and vkT+l in (8) we obtain

Lk+~ = [I -- ½hA]-'[I + ½hDlLk[ I - ½hA][I + ½hD] -1

with

A =n-Bkl + mBk2, D = m B k l -q- nBk2.

Then, it follows that

[I - ½hA]Lk+l[I + ½hD] = [I + ½hD]Lk[I - ½hA],

from which

Lk+l(h) = Lk + ½h[ALk+1 - L~+lD + DLk - LkA]

-4- ¼h 2 [AL~+ID - DLkA]

We observe that A = D + C, where

C =2--f-(Bk2 -- Bkl );

thus 1 Lk+l(h) = Lk + ih{[D, Lk+l] + [D, Lk] + CLk+I - L~C}

+¼h2 {D(Lk+, - Lk )D + CLk+1D - DLkC}

and the thesis is proved. []

(21)

(22)

Theorem 4. Let us consider the E 2 G L R K 2 m e t h o d For sufficiently small h, it fo l lows that

A¢(Z ,h ) -2hll[N, Zk]ll 2 - h2 tr(NRk ),

where Rk is a suitable matrix.

Proof. By (22), the change in the potential function becomes

A0(Lk, h) = - 2 tr(N(Lk+l - Lk))

-~ - h tr(N(ALk+l - Lk+1D + DLk - LkA)),

where we have truncated the last term of (22) which is O(h3).

(23)

272 L. Lopez et al./ Journal of Computational and Applied Mathematics 82 (1997) 261-278

Since E2GLRK2 is a method of order p ~> 1, it is trivial to show that

L(tk + h)=Lk + h[B(Lk),Lk] + O(h2). (24)

Thus, in order to have a computational form for Adp(Lk, h), we replace, in (23), Lk+l by L(tk + h) given in (24). Moreover, for sufficiently small h, the matrices A and D in (21) may be approximated up to order 1 as follows:

A = n - h--~Bkl Bkl + m + h~-Bk2 Bk2

= - Bkl + n + Bk2

~--m[l+h--~-Bk ,]Bkl+n[I -h- -~-Bk2]Bk2 , (26)

in which, by observing that

4

L(tk + cih)=Lk + h ~ b*(ci)[B(-£kt),-£kl], i = 1,2, 1=1

with /--1

-£kl=Lk + h ~_a~[B(Lkj),Lkj], l = 1 , 2 , 3 , 4 , j = l

the matrices Bk~ and Bk2, for sufficiently small h, may be approximated up to order 1 as follows:

Bki '~ [N, Zk] + hb(ci)[g,[[N, Lk],Lk]], i = 1,2,

where b(ci)= 4 ~i=1 b*(ci), for i=1 ,2 . Thus, (24)-(26) yield

ALk+~ - Lk+lD -4- DLk - LkA ~- 2[B(Lk ),Lk] + h([B(Lk ), [B(Lk ),Lk]]

+(b(cl ) + b(c2 ))[[N, [B(Lk ), Lk]], Lk]), (27)

and, replacing (27) in (23), we finally obtain

A 4~(Zk, h) ~ -2hll [g, Zk ] II 2 - h 2 tr(NRk ),

where

Rk = [[N, Lk], [[N, Lk],Lk]] + (b(cl) + b(c2))[[N, [[N,L~],Lk]],Lk]

= R~2 + (b(cl) + b(cz))Rkl

with Rkl and Rk2 defined by (17). []

L. Lopez et al./Journal of Computational and Applied Mathematics 82 (1997) 261-278 273

Thus, as for the E1GLRK1 method, we can assume at each iterate the time step given by

2

hk-- [tr(NRk)l' (28)

which assures the maximum decreasing of the potential function. As in the previous method, by means of a bound of Itr(NRk)l we can find a constant time step

and an approximation of the stability interval for E2GLRK2. In fact, we obtain

Itr(NRk)l ~< ]tr(NRk2)[ + Ib(cl ) + b(c2)l Itr(NRk, )1,

and since

tr( NRk l ) : tr( NRk2 ),

it follows that

Itr(NRk)[ ~<(1 + [b(c~) + b(c2)l)[lNl[ IlRk2[I

+ [b(c,) + b(c2)l)4llNll IlL01l II[N, Lk]II 2

Thus, using in (28) the previous upper bound for ]tr(NRk)l, it follows that the constant value

1

4IINII IIL0ll(1 + [b(c, ) + b(c2)[)'

minimizing all the optimal time steps h~, may be considered as the optimal constant time step which guarantees the stability of the E2GLRK2 method. The value 2h defines a time-step interval (0, 2h) contained in the stability interval of the E2GLRK2 method.

5. Numerical tests

The numerical tests have been performed in Matlab and in Fortran on a scalar computer Alpha 200 4/233, with 128 Mb Ram, and regard constant and variable step-size versions of the E1GLRK1 method. We have considered the double-bracket flow of size n

L'=[[N,L],L], L(0)=L0, (29)

where N = diag(1,2, . . . , n) and initial matrix L0 = UNU T, with U unitary matrix. As a first example, we consider the case n = 7. Fig. 3 plots the diagonal elements of Lk, against

the time, obtained by the E1GLRK1 method applied with h=0.09. The oscillations disappear when we use h=0.05 (see Fig. 4).

In Figs. 5 and 6 we plot the potential functions ~b(Lk), against time, for h=0 .09 and h=0.05. For the value h=0.05 the potential function provides (o(Lk+l)<~dp(Lk) for each k. We note that this constant time step is greater than the constant time step h=0.002 given by (19).

In the second numerical test we have compared the classical variable step strategy with the proposed strategy. We have assumed hmax=0.9 in both procedures. Moreover, in the local error

274 L. Lopez et al./ Journal of Computational and Applied Mathematics 82 (1997) 261-278

6

UJ

~4

8, 7

1

0

vvv vvv~'vV V vv~v V/

~ AA~AA A AAAA I [

I I I I I I I I

1 2 3 4 5 6 7 8 Time

Fig. 3.

:I 6

e - l i d

E 5

L U

g4 a

I I I I I

0 1 2 3 4 5 6 7 8 Time

Fig. 4.

L. Lopez et al./ Journal of Computational and Applied Mathematics 82 (1997) 261-278 275

80 ,

70

60

," 5o .o_ "5 t--

-~ 40 c

a. 30

0 0

20

10

80

I I I I I I t

2 3 4 5 6 7 8 Time

Fig. 5.

70

60

,-" 50 0

o ! e -

~- 30

20

10

0 0 1 2 3 5

Time

Fig. 6.

276 L. Lopez et aL /Journal of Computational and Applied Mathematics 82 (1997) 261-278

Table 1

Strategy M DIF E R R

Classical 66 4 .56 . 10 -7 2 .40 . 10 -3

Proposed 40 3.91 • 10 -14 2 . 7 3 . 1 0 - l

2.5

u )

1.5 LLI

t - O

e -

2 1 I---

0.5

10 -3 i i i i J

I I I I I

1 2 3 4 5 Time

Fig. 7.

control mechanism of the classical procedure, we have assumed a criterion similar to that used in ODE45, in which TOL= max{JlLk]], 1}e, with e = l . 10 -3. In the proposed strategy the new time step has been computed by (18), in order to have ~b(Lk+l)~<q~(Lk), for any k~>0. We have solved the Lax system (29) with n = 3 on a finite-time interval [0, 15]. We summarize the numerical results of this comparison in Table 1, where ERR is the maximum local error on the time interval [0, 15], M is the total number of iterates required to reach the end of the time interval and DIF is the error at the end of the time interval with respect to the eigenvalues of L0.

From these results it follows that our strategy gives better results at the end of the interval, i.e., it is suitable to find eigenvalues of L0. On the other hand, as our strategy controls only stability, it gives inaccurate results at the beginning of the time interval because of the larger local truncation errors (see Figs. 7 and 8).

L. Lopez et al./Journal of Computational and Applied Mathematics 82 (1997) 261-278

0 . 3 . . . . .

277

0.25

0 .2 ¸

p

t.u t -

O 0.15

o

"-I

I-.-

0.1

0.05

0 0 1 2 3 4

Time

Fig. 8.

Table 2

E 1GLRK1 RATQR

T (in s) 4.4895.10 -2 6.8079- 10 -z maxi I2i- ~i I 2.811' 10 -7 1.955' 10 -6

Finally, we have compared the E1GLRK1 method with the QR algorithm to compute the eigen- values 1,2, 3, 4, 5, 6, 7 of the following 7 x 7 matrix:

Z 0 =

( 2.726 -0.286 0.357 -0.326 -0.286 4.075 -0.654 -0.331

0.357 -0.654 2.767 -0.159 -0.326 -0.331 -0.159 3.684 -0.512 0.246 -0.663 -1.036

1.092 0.297 -0.633 -0.574 -0.628 0.469 -0.532 -0.848

-0.512 1.092 -0.628 0.246 0.297 0.469

-0.663 -0.633 -0.532 - 1.036 -0.574 -0.848

3.337 -0.756 - 1.233 -0.756 5.515 -0.883 -1.233 -0.883 5.897

Table 2 reports the execution times for the two methods applied and the errors with respect to the eigenvalues of L0. To apply the routine RATQR the matrix L0 has been previously tridiagonalized. The stop criterion choosen for E1GLRK1 has been the maximum modulus of the extradiagonal elements of Lk less than 1 • 10 -5, while for RATQR we have posed EPS1 = 1 • 10 -5.

278 L. Lopez et al./Journal of Computational and Applied Mathematics 82 (1997) 261-278

Acknowledgements

The authors are sincerely grateful to one of the anonymous referees for his comments and sug- gestions.

References

[1] R.W. Brockett, Dynamical systems that sort lists, diagonalize matrices and solve linear programming problems, Linear Algebra Appl. 146 (1991) 79-91.

[2] M. Calvo, A. Iserles, A. Zanna, Numerical solution of isospectral flows, Num. Anal. Report, Univ. Cambridge, DAMTP 95/NA03, 1995.

[3] M. Calvo, A. Iserles, A. Zanna, Runge-Kutta methods for orthogonal and isospectral flows, Appl. Num. Anal. 22 (1996) 153-164.

[4] E. Deift, F. Lund, E. Trubowitz, Nonlinear wave equations and constrained armonic motion, Comm. Math. Phys. 74 (1980) 141-188.

[5] E. Deift, T. Nanda, T. Tomei, Ordinary differential equations and the symmetric eigenvalue problem, SIAM J. Numer. Anal. 20 (1983) 1-22.

[6] L. Dieci, D. Russell, E. Van Vleck, Unitary integration and applications to continuous orthonormalization techniques, SIAM J. Numer. Anal. 31 (1994) 261-281.

[7] H. Flaschka, The Toda lattice, I. Phys. Rev. B 9 (1974) 1924-1925. [8] D. Higham, Time-stepping and preserving orthonormality, B17 37 (1997) 24-36. [9] A. Iserles, A. Zanna, Qualitative numerical analysis of ordinary differential equations, Num. Anal. Report, Univ.

Cambridge, DAMTP 95/NA05, 1995. [10] P.D. Lax, Integrals of nonlinear equations of evolution and solitary waves, Comm. Pure Appl. Math. 21 (1968)

467-490. [11] L. Lopez, T. Politi, Numerical methods based on Runge-Kutta schemes for isospectral systems, Report Dip. Matem.

Univ. Bari, 37/96, 1996. [12] J.B. Moore, R.E. Mahony, U. Helmke, Numerical gradient algorithms for eigenvalue and singular value calculations,

SIAM J. Matrix Anal. Appl. 15 (1994) 881-903. [13] T. Nanda, Differential equations and the QR algorithm, SIAM J. Numer. Anal. 22 (1985) 310-321. [14] M. Toda, Theory of Nonlinear Lattice, Springer, Berlin, 1981. [15] B. Owren, M. Zennaro, Order barriers for continuous explicit Runge-Kutta methods, Math. Comput. 56 (1991)

645-661. [16] M. Zennaro, Natural continuous extensions of Runge-Kutta methods, Math. Comput. 46 (1986) 119-133. [17] M. Zennaro, One-step collocation: Uniform superconvergence, predictor-corrector method, local error estimate, SIAM

J. Numer. Anal. 22 (1986) 1135-1152.