P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN...

28
DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe Técnico / Technical Report Ref. No: DSIC-II/04/07 Pages: 27 Title: Solving Initial Value Problems for Ordinary Differential Equations by a Piecewise-linearized Method Based on Diagonal Padé Approximations Author (s): Enrique Arias, Vicente Hernández, Javier Ibáñez, Pedro Ruiz Date: 9-2-2007 Key Words: Ordinary Differential Equation, Initial Value Problem, Backward Differentiation Formula Method, Piecewise-linearized Method, Diagonal Padé Approximation VºBº Author (s): Leader of Research Group Vicente Hernández García

Transcript of P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN...

Page 1: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN

UNIVERSIDAD POLITÉCNICA DE VALENCIA

P.O. Box: 22012 E-46071 Valencia (SPAIN)

Informe Técnico / Technical Report

Ref. No: DSIC-II/04/07 Pages: 27 Title: Solving Initial Value Problems for Ordinary

Differential Equations by a Piecewise-linearized Method Based on Diagonal Padé Approximations

Author (s): Enrique Arias, Vicente Hernández, Javier Ibáñez, Pedro Ruiz

Date: 9-2-2007 Key Words: Ordinary Differential Equation,

Initial Value Problem, Backward Differentiation Formula Method, Piecewise-linearized Method, Diagonal Padé Approximation

VºBº Author (s): Leader of Research Group Vicente Hernández García

Page 2: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

Solving Initial Value Problems for Ordinary Differential Equations by a Piecewise-linearized Method Based on Diagonal Padé

Approximations

[email protected], [email protected],*, [email protected], [email protected]

1 Departamento de Sistemas Informáticos, Universidad de Castilla-La Mancha, Avda. España s/n, 02071-Albacete (Spain), e-mail: [email protected]

2 Departamento de Sistemas Informáticos y Computación, Universidad Politécnica de Valencia, Camino de Vera s/n, 46022-Valencia (Spain)

* Corresponding author. Phone: 34-967-599200, ext.: 2497. Fax: 34-967-599224 Abstract

Many scientific and engineering problems are described using Ordinary Differential Equations (ODEs), where the analytic solution is unknown. Much research has been done by the scientific community on developing numerical methods which can provide an approximate solution of the original ODE. In recent years many papers, review articles and books have appeared on numerical methods for solving ODE problems. Most of the available numerical methods are based on the approximation of a continuous model by a discrete model and the computation of an approximate solution in a finite set of points. In this work, an approach based on the piecewise-linearized method and diagonal Padé approximations is proposed for solving the Initial Value Problem (IVP) (1) , . )),(()( ttxftx =& 00 =)( xtx

This approach, which can be applied to both singular and non-singular Jacobian matrices, is compared with the Backward Differentiation Formula (BDF) method.

1 Introduction Numerical methods for solving ODEs can be classified into two groups: One step

methods (Euler, Runge-Kutta, etc.) and multistep methods (Adams-Basforth, Adams-Moulton, BDF, etc) [AsPe98]. A family of one step methods for solving ODEs are piecewise-linearized [RaGa97], exponentially fitted [HoLS98] and matricial exponentially fitted [Carr93] methods. These methods solve an IVP by approximating the right hand side of the ODE by means of a Taylor polynomial of degree one. The resulting approximation can be integrated analytically to obtain the solution in each subinterval and yields the exact solution for linear problems. In [RaGa97, Garc03] an exhaustive study of this method is introduced. The proposed method requires a non-singular Jacobian matrix on each subinterval. One of the most popular multistep methods is the implicit BDF method [CuHi52]. This method is very efficient in dealing with stiff problems.

In this work an approach for solving IVPs for ODEs, based on the piecewise-linearized method, is introduced. One of its main advantages is that it can be used for both singular and non-singular Jacobian matrices. This approach is based on Theorem 2, introduced in Section 3, and the computing of the approximated solution at each subinterval by means of a block-oriented algorithm based on diagonal Padé approximations.

The paper is structured as follows. Section 2 introduces the piecewise-linearized approach for solving IVPs. The new approach for solving IVPs by linearization method

Page 3: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

2

based on diagonal Padé approximations is presented in Section 3. The experimental results are shown in Section 4. Finally, some conclusions and future work are outlined in Section 5.

2 Piecewise-linearized approach of IVPs for ODEs Let IVP (1), where , , satisfies the necessary conditions under

which the problem has unique solution. ))(,( txtf ],[ 0 fttt ∈

Given a partition of the interval , IVP fll ttttt =<<<< 110 −L ],[ 0 ftt (1) can be approximated by means of a set of IVPs obtained as a result of the linear approximation of at each subinterval [Garc98, Garc03]; ))(,( txtf

(2) 1,,0,1,= ,=)( ],,[ ),())((=)( 1 −∈−+−+′ + liytytttttgytyJfty iiiiiiiii L

where n

iii Rytff ∈),(= ,

nniii Ryt

xfJ ×∈

∂∂ ),(= (Jacobian matrix),

niii Ryt

tfg ∈

∂∂ ),(= (gradient vector).

The IVP associated to the first subinterval,

],,[ ),())((=)( 1000000 tttttgytyJfty ∈−+−+′

is solved considering the initial value 000 =)( xyty = . The solution of this first IVP is given by

].,[ ,)]([)(=)( 100000

00 tttdtgftetyty J

t∈−+−+ ∫ τττ

Thus, it is possible to compute . )(= 11 tyyBy proceeding in the same way, the solution of the IVP associated to the subinterval i ,

, is 1,1,= −li L

(3) ].,[ ,)]([)(=)( 1+∈−+−+ ∫ iiiiiiJ

iti tttdtgftetyty τττ

If the Jacobian matrix is invertible, then iJ

(4) ].[)()]([=)( 2121iiii

iiJiiiiiii gJfJttegJttgfJyty −−−− +−+−−+−

The following theorem gives sufficient conditions for the convergence of this piecewise-linearized method.

Theorem 1 [Garc98]. If the second order partial derivatives of are bounded in , then the above piecewise-linearized method converges verifying that

),( xtfn

f Rtt ×],[ 0

1),(||||2

−Δ

≤− ΔtKlll e

KtCyx

Page 4: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

3

where , is the approximated solution obtained by means of the piecewise-linearized method at instant ,

)(= ll txx ly

lt iiii tttlitmaxt −Δ−ΔΔ +1= 1,,0,= ),(= L , and K and are problem dependent constants.

C

3 A New Piecewise-linearized Method for Solving IVPs for ODEs According to expression (4), to obtain the approximated solution in the

subinterval , the Jacobian matrix must be invertible and well conditioned. Next theorem allows computation of solution in a subinterval, even though the Jacobian matrix is not invertible. From this theorem, a new piecewise-linearized method for solving ODEs IVPs is deduced.

)(ty],[ 1+ii tt iJ

)(ty

iJ

Theorem 2. The solution of IVP (2) is given by , ii

iii

ii gttFfttFyty )()(=)( )(

13)(

12 −+−+ ],[ 1+∈ ii ttt ,

where and are, respectively, the blocks (1,2) and of

exponential matrix , where

)()(12 i

i ttF − )()(13 i

i ttF − (1,3))( iiC tte −

(5) .000

000

=⎥⎥⎥

⎢⎢⎢

nnn

nnn

nni

i IIJ

C

Proof. Defining its −τ= and itt −=θ , the integral which appears in (3) can be expressed as

(6) .)()(=)]([)(00 i

iJi

iJiii

iJ

itgsdssefdssedtgftet ⎥⎦

⎤⎢⎣⎡ −+⎥⎦

⎤⎢⎣⎡ −−+−

∫∫∫θθθθ

τττ

Because is an upper-triangular block matrix, the exponential of iC θiC has the same structure,

,)(00)()(0)()()(

=)(

33

)(23

)(22

)(13

)(12

)(11

⎥⎥⎥

⎢⎢⎢

θθθθθθ

θ

inn

iin

iii

iC

FFFFFF

e

where , )()( θijkF 31 ≤≤≤ kj , are square matrices of order . n

Since

θθ

θiC

i

iC

eCd

de = , , niC Ie 30= =|θθ

then

,000

)(00)()()()()(

=

)(00

)()(0

)()()(

)(33

)(23

)(13

)(22

)(12

)(11

)(33

)(23

)(22

)(13

)(12

)(11

⎥⎥⎥

⎢⎢⎢

⎡ ++

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

nnn

inn

iii

iii

ii

i

nn

ii

n

iii

FFFJFFJFJ

ddF

ddF

ddF

ddF

ddF

ddF

θθθθθθ

θθ

θθ

θθ

θθ

θθ

θθ

and the following Linear Matrix Differential Equations (LMDEs) IVPs are obtained

Page 5: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

4

(7) )()( )(11

)(11 θ

θθ i

i

i

FJd

dF= , , n

i IF =)0()(11

(8) 0)()(22 =

θθ

ddF i

, , ni IF =)0()(

22

(9) 0)()(33 =

θθ

ddF i

, , ni IF =)0()(

33

(10) )()( )(33

)(23 θ

θθ i

i

Fd

dF= , , n

iF 0)0()(23 =

(11) )()()( )(22

)(12

)(12 θθ

θθ ii

i

i

FFJd

dF+= , , n

iF 0)0()(12 =

(12) )()()( )(23

)(13

)(13 θθ

θθ ii

i

i

FFJd

dF+= , . n

iF 0)0()(13 =

The solutions of (7), (8) and (9), are given by θθ iJi eF =)()(

11 ,

ni IF =)()(

22 θ ,

ni IF =)()(

33 θ .

Therefore, the solutions of (10), (11) and (12) are

ni IF θθ =)()(

23 ,

(13) , ∫ −=θ

θθ0

)()(12 )( dseF sJi i

(14) . ∫ −=θ

θθ0

)()(13 )( sdseF sJi i

Note that the integrals involved in (6) can be computed by means of (13) and (14). In conclusion, once the Jacobian matrix and the vectors and have been computed, the solution of IVP

iJ ig if(2) is given by

(15) . ii

ii

i gFfFyty )()(=)( )(13

)(12 θθ ++

As itt −=θ , then

(16) , iii

iii

i gttFfttFyty )()(=)( )(13

)(12 −+−+

so the theorem is proved. According to the previous theorem, the approximate solution of IVP (1) at instant

is obtained from the approximate solution at instant by the following expression 1+it it

(17) , iii

iii

ii gtFftFyy )()(= )(13

)(121 Δ+Δ++

where and are, respectively, blocks (1,2) and of

exponential matrix , where is the matrix given by

iii ttt −Δ +1= , )()(12 i

i tF Δ )()(13 i

i tF Δ (1,3))( iiC te Δ

iC (5).

The following algorithm computes the approximate solution of the IVP for non-autonomous ODE (1) by means of the piecewise-linearized method based on the exponential of matrix ii tC Δ .

Page 6: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

5

),,( 0xdatatnolexiy = .

Inputs: Time vector ; function that computes ; and (

1+ℜ∈ lt data nxnxJ ℜ∈),(τnxf ℜ∈),(τ nxg ℜ∈),(τ ℜ∈τ , ); vector . nx ℜ∈ nx ℜ∈0

Outputs: Matrix , , )1(10 ],,,[ +ℜ∈= lnx

lyyyY L niy ℜ∈ li ,,1,0 L= .

1 00 xy =

2 For 1:0 −= li

2.1 ),(],,[ iiiii ytdatagfJ =

2.2 iii ttt −=Δ +1

2.3 ⎥⎥⎥

⎢⎢⎢

⎡=

nnn

nnn

nni

i IIJ

C000

000

2.4 ii tCi eF Δ=

2.5 iiii gFfFyy 13121 ++=+

Algorithm 1: Algorithm to solve IVP (1) by means of the piecewise-linearized method based on computation of the exponential of matrix ii tC Δ .

In order to reduce the high computational and storage costs of the previous algorithm, vector in 1+iy (17) can be computed without the explicit computation of the exponential of matrix ii tC Δ (step 2.4 of Algorithm 1). This can be done by a block oriented version of the following algorithm, exmdpa, which computes the exponential of a matrix by means of a diagonal Padé approximation method [Mole03, High04].

Page 7: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

6

),,( 21 ccAexmdpaF = . Inputs: Matrix ; vectors with the coefficients of terms of

degree greater than 0 in diagonal Padé approximation of the exponential function.

nxnA ℜ∈ qcc ℜ∈21,

Output: Matrix . nxnAeF ℜ∈=

1 ∞= |||| Anor

2 )))(int(log1,0max( 2 norjA +=

3 Aj

s21

=

4 sAA =

5 AX =

6 AcIN n )1(1+=

7 AcID n )1(2+=

8 For qk :2=

8.1 XAX =

8.2 XkcNN )(1+=

8.3 XkcDD )(2+=

9 Solve for using Gaussian elimination NDF = F

10 For Ajk :1=

10.1 2FF =

Algorithm 2: Algorithm which computes the exponential of a matrix by nxnA ℜ∈means of a diagonal Padé approximation method.

The approximated computational cost of Algorithm 2 is 3)3/1(2 njq A ++ flops,

where . )))||(||int(log1,0max( 2 ∞+= AjA

The next algorithm, coedpa, computes the coefficients of the polynomials of degree greater than zero in the diagonal Padé approximation of the exponential function.

Page 8: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

7

)(],[ 21 qcoedpacc = . Inputs: Degree of the diagonal Padé approximation of the exponential

function.

+∈ Zq

Outputs: Vectors with the coefficients of terms of degree greater than 0 in diagonal Padé approximation of the exponential function.

qcc ℜ∈21,

1 5.0)1(1 =c

2 5.0)1(2 −=c

3 For qk :2=

3.1 )1()12(

1)( 11 −+−+−

= kckkq

kqkc

3.2 )()1()( 12 kckc k−=

Algorithm 3: Algorithm which computes the coefficients of the polynomials of degree greater than zero in the diagonal Padé approximation of the exponential function.

An adaptation of Algorithm 2 is presented which only computes blocks (1,2) and (1,3) of the exponential of matrix

(18) ⎥⎥⎥

⎢⎢⎢

⎡=

nnn

nnn

nni

IIJ

A000

000

With this goal, some steps of Algorithm 2 are adapted to the matrices

⎥⎥⎥

⎢⎢⎢

⎡=

33

2322

131211

000

XXXXXX

X

nn

n ,

⎥⎥⎥

⎢⎢⎢

⎡=

33

2322

131211

000

NNNNNN

N

nn

n ,

⎥⎥⎥

⎢⎢⎢

⎡=

33

2322

131211

000

DDDDDD

D

nn

n

and

⎥⎥⎥

⎢⎢⎢

⎡=

33

2322

131211

000

FFFFFF

F

nn

n .

Page 9: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

8

Step 4 . ⎥⎥⎥

⎢⎢⎢

⎡==

nnn

nnn

nni

sIsIsJ

sAA000

000

Let ii sJJ = , then A can be expressed as

⎥⎥⎥

⎢⎢⎢

⎡=

nnn

nnn

nni

sIsIJ

A000

000

.

Step 5 AX =

⎥⎥⎥

⎢⎢⎢

⎡=

nnn

nnn

nni

sIsIJ

X000

000

.

Step 6 .AcIN n )1(1+=

⎥⎥⎥

⎢⎢⎢

⎡ +=

⎥⎥⎥

⎢⎢⎢

nnn

nnn

nnin

nn

n

IsIcI

sIcJcI

NNNNNN

00)1(0

0)1()1(

000 1

11

33

2322

131211

,

therefore

in JcIN )1(111 += ,

nsIcN )1(112 = ,

nN 013 = ,

nIN =22 ,

nsIcN )1(123 = ,

nIN =33 .

Step 7 . AcID n )1(2+=

⎥⎥⎥

⎢⎢⎢

⎡ +=

⎥⎥⎥

⎢⎢⎢

nnn

nnn

nnin

nn

n

IsIcI

sIcJcI

DDDDDD

00)1(0

0)1()1(

000 2

22

33

2322

131211

,

therefore

in JcID )1(211 += ,

nsIcD )1(212 = ,

nD 013 = ,

nID =22 ,

nsIcD )1(223 = ,

Page 10: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

9

nID =33 .

Substep 8.1 XAX = .

.000000

00000

0

000

000

121111

33

2322

131211

33

2322

131211

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

nnn

nnn

i

nnn

nnn

nni

nn

n

nn

n

sXsXJXsI

sIJ

XXXXXX

XXXXXX

Bearing in mind data dependences, ,ijX 31 ≤≤≤ ji , can be computed as

1213 sXX = ,

1112 sXX = ,

iJXX 1111 = ,

nX 022 = ,

nX 023 = ,

nX 033 = .

Substep 8.2. . XkcNN )(1+=

.00

0)()()(

000

33

2322

131131211211111

33

2322

131211

⎥⎥⎥

⎢⎢⎢

⎡ +++=

⎥⎥⎥

⎢⎢⎢

NNN

XkcNXkcNXkcN

NNNNNN

nn

n

nn

n

As matrices 22N , 23N and 33N do not vary inside loop 8, then

nIN =22 ,

nsIcN )1(123 = ,

nIN =33 .

Substep 8.3. XkcDD )(2+= .

. 00

0)()()(

000

33

2322

132131221211211

33

2322

131211

⎥⎥⎥

⎢⎢⎢

⎡ +++=

⎥⎥⎥

⎢⎢⎢

DDD

XkcDXkcDXkcD

DDDDDD

nn

n

nn

n

As matrices 22D , 23D y 33D do not vary inside loop 8, then

nID =22 ,

nsIcD )1(223 = ,

nID =33 .

Step 9 To compute by solving F NDF = .

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

nnn

nnn

nn

n

nnn

nnn

IsIcI

NNN

FFFFFF

IsIcI

DDD

00)1(0

000

00)1(0 1

131211

33

2322

131211

2

131211

,

Page 11: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

10

therefore

111111 NFD = ,

1222121211 NFDFD =+ ,

13331323121311 NFDFDFD =++ ,

nIF =22 ,

nsIcsFcF )1()1( 133223 =+ ,

nIF =33 .

Since and , then 5.0)1(1 =c 5.0)1(2 −=c nsIF =23 and matrices , and can be computed solving the equations

11F 12F 13F

111111 NFD = ,

12121211 DNFD −= ,

1312131311 DsDNFD −−= .

Then it is only necessary to know , , , , and to compute , y in step 9.

11N 12N 13N 11D 12D 13D

11F 12F 13F

Substep 10.1. 2FF = .

Making the product

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

33

2322

131211

33

2322

131211

33

2322

131211

000

000

000

FFFFFF

FFFFFF

FFFFFF

nn

n

nn

n

nn

n ,

and equalling the corresponding blocks, then 2

1111 FF = ,

2212121112 FFFFF += ,

33132312131113 FFFFFFF ++= , 2

2222 FF = ,

3323232223 FFFFF += , 2

3333 FF = .

Bearing in mind that before entering in loop 10 nIF =22 and , then inside the above loop

nIF =33

nIF =22 and nIF =33 .

Therefore,

23232323 2FFFF =+= .

Bearing in mind that before entering loop 10 nsIF =23 , then

nk sIF 223 =

Page 12: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

11

in the iteration . k

According to data dependence, , and can be computed as 11F 12F 13F

132312131113 FFFFFF ++= ,

12121112 FFFF += , 2

1111 FF = .

The following Algorithm, inlbop, computes the approximated solution in the interval of ],[ 1+ii tt IVP (1) for non-autonomous ODEs, obtained after the piecewise-linearized process, by a block-oriented implementation of the diagonal Padé approximants method.

Page 13: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

12

),,,,,,(1 qptygfJinlbopy iiiiii Δ=+ .

Inputs: Matrix ; vector ; vector , vector , stepsize ; vectors with the coefficients of terms of degree

greater than 0 in diagonal Padé approximation of the exponential function.

nxniJ ℜ∈ n

if ℜ∈ nig ℜ∈ n

iy ℜ∈

ℜ∈Δ itqcc ℜ∈21 ,

Outputs: Vector (expression niy ℜ∈+1 (17)).

1 ii tJnor Δ= ∞||||

2 ; )))(int(log1,0max( 2 norjitJ i

+=ΔitiJj

itsΔ

Δ=

2; ii sJJ =

3 ; ; iJX =11 nsIX =12 nX 013 =

4 ; ; in JcIN )1(111 += nsIcN )1(112 = nN 013 =

5 ; ; in JcID )1(211 += nsIcD )1(212 = nD 013 =

6 For qk :2=

6.1 ; ; 1213 sXX = 1112 sXX = iJXX 1111 =

6.2 1111111 )( XkcNN += ; 1211212 )( XkcNN += ; 1311313 )( XkcNN +=

6.3 1121111 )( XkcDD += ; 1221212 )( XkcDD += ; 1321313 )( XkcDD +=

7 Solve for , and in: 11F 12F 13F

7.1 111111 NFD =

7.2 12121211 DNFD −=

7.3 1312131311 DsDNFD −−=

8 For itJ i

jk Δ= :1

8.1 ; 1312131113 FsFFFF ++= 12121112 FFFF += ; 21111 FF =

8.2 ss 2=

9 iiii gFfFyy 13121 ++=+

Algorithm 4: Computes the approximate solution at instant of IVP (1) by means of 1+ita block-oriented version of Algorithm 2.

The approximate computational cost of Algorithm 4 is

3

3732 njq

ii tJ ⎟⎠⎞

⎜⎝⎛ ++ Δ flops,

where . )))||(||int(log1,0max( 2 ∞Δ Δ+= iiitJ tJji

The following algorithm, inolbp, solves IVPs for non-autonomous ODEs by means of the above piecewise-linearized approach and a block-oriented implementation of the diagonal Padé approximation method.

Page 14: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

13

),( qxdata,t,nolbpiy 0= .

Inputs: Time vector ; function that computes , and (

1+ℜ∈ lt data nxf ℜ∈),(τnxnxJ ℜ∈),(τ nxg ℜ∈),(τ ℜ∈τ , ); vector ; degree

of polynomials in diagonal Padé approximation of the exponential function.

nx ℜ∈ nx ℜ∈0+∈ Zq

Outputs: Matrix , , )1(10 ],,,[ +ℜ∈= lnx

lyyyY L niy ℜ∈ li ,,1,0 L= .

1 ()(],[ 21 qcoedpacc = Algorithm 3)

2 00 xy =

3 For 1:0 −= li

3.1 ),(],,[ iiiii ytdatagfJ =

3.2 iii ttt −=Δ +1

3.3 ),,,,,,( 211 cctygfJinlbopy iiiiii Δ=+ (Algorithm 4)

Algorithm 5: Solves IVP (1) by means of the piecewise-linearized approach and the block diagonal Padé approximation method.

In the particular case of IVPs for autonomous ODEs it is possible to reduce the computational and storage costs of the previous algorithms. Let (19) , ))(()(' txftx = ],[ 0 fttt ∈ ,

nxtx ℜ∈= 00 )( ,

where verifies the hypotheses of )(xf Theorem 1, that is, the second partial derivatives of are bounded in . )(xf nℜ

Let partition fll ttttt =<<<< −110 L of interval , then IVP (19) can be approximate by means of a set of IVPs resulting from the linearization of in each subinterval,

],[ 0 ftt))(( txf

(20) , , ))(()(' iii ytyJfty −+= ],[ 1+∈ ii ttt ii yty =)( , 1,,1,0 −= li L ,

where n

ii yff ℜ∈= )( ,

nxnii y

xfJ ℜ∈

∂∂

= )( .

The solution of (20) is given by

(21) ∫ −+=t

ti

tJi

i

i dfeyty ττ )()( , ],[ 1+∈ ii ttt .

Therefore, the approximate solutions can be obtained solving, successively, IVP

lyyy ,,, 10 L

(20) in each one of the subintervals , ],[ 1+ii tt 1,,1,0 −= li L .

Corollary 1 (Theorem 2): The solution of the IVP (22) , ))(()(' iii ytyJfty −+= ],[ 1+∈ ii ttt , ii yty =)( ,

is

Page 15: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

14

(23) , iii

i fttFyty )()( )(12 −+=

where is block (1,2) of matrix , and )()(12 i

i ttF − )( ii ttCe −

(24) . ⎥⎦

⎤⎢⎣

⎡=

nn

nii

IJC

00

Proof. It is enough to apply Theorem 2 for the particular case . nnxig ℜ∈= 10

According to Corollary 1, the approximate solution at instant of IVP 1+it (19) can be obtained from the expression (25) , ii

iii ftFyy )()(

121 Δ+=+

where and is block (1,2) of matrix . iii ttt −=Δ +1 )()(12 i

i tF Δ ii tCe Δ

Reasoning in the same way as in Algorithm 4, the following Algorithm, ialbop, computes the approximate solution in interval of the ],[ 1+ii tt IVP (20) by means of a block-oriented version of the diagonal Padé approximation method.

Page 16: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

15

),,,,,( 211 cctyfJialbopy iiiii Δ=+ .

Inputs: Matrix ; vector ; vector ; stepsize nxnJ ℜ∈ nf ℜ∈ niy ℜ∈ ℜ∈Δ it ;vectors

with the coefficients of terms of degree greater than 0 in diagonal Padé approximation of the exponential function.

qcc ℜ∈21,

Outputs: Vector (expression mxniy ℜ∈+1 (25)).

1 ii tJnor Δ= ∞||||

2 ; )))(int(log1,0max( 2 norjitJ i

+=ΔitiJj

itsΔ

Δ=

2; ii sJJ =

3 ; iJX =11 nsIX =12

4 ; in JcIN )1(111 += nsIcN )1(112 =

5 ; JcID n )1(211 += nsIcD )1(212 =

6 For qk :2=

6.1 ; 1112 sXX = JXX 1111 =

6.2 1111111 )( XkcNN += ; 1211212 )( XkcNN +=

6.3 1121111 )( XkcDD += ; 1221212 )( XkcDD +=

7 Solve for y in: 11F 12F

7.1 111111 NFD =

7.2 12121211 DNFD −=

8 For jk :1=

8.1 ; 12121112 FFFF += 21111 FF =

8.2 ss 2=

9 iii fFyy 121 +=+

Algorithm 6: Computes the approximate solution at instant of IVP (20) by means 1+itof a block oriented version of the diagonal Padé approximation method.

The approximated computational cost of algorithm 7 is

3

3422 njq

ii tJ ⎟⎠⎞

⎜⎝⎛ ++ Δ flops,

where . )))||(||int(log1,0max( 2 ∞Δ Δ+= iiitJ tJji

Finally, the following algorithm, iaolbp, solves IVPs for autonomous ODEs by means of the piecewise-linearized approach and a block-oriented version of the diagonal Padé approximation method.

Page 17: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

16

),,,( 0 qxdatataolbpiy = .

Inputs: Time vector ; function that computes and ( ); degree of polynomials in the diagonal Padé

approximation of the exponential function.

1+ℜ∈ lt data nxf ℜ∈)(nxnxJ ℜ∈)( nx ℜ∈ +∈ Zq

Outputs: Matrix , , )1(10 ],,,[ +ℜ∈= lnx

lyyyY L niy ℜ∈ li ,,1,0 L= .

1 ()(],[ 21 qcoedpacc = Algorithm 3)

2 00 xy =

3 For 1:0 −= li

3.1 )(],[ iii ydatafJ =

3.2 iii ttt −=Δ +1

3.3 (),,,,,( 211 cctyfJialbopy iii Δ=+ Algorithm )

Algorithm 7: Algorithm which solves IVP (19) by means of the piecewise-linearized approach and the diagonal Padé approximation method.

4 Numerical experiments The main objective of this section is to compare the new algorithms,

developed in section 3, with an algorithm based on BDF method. This is done by implementing an efficient algorithm, iodbdf, which solves IVPs for ODEs by means of the BDF method.

),,,,,( 0 axitermtolrxtdataiodbdfY = .

Inputs: Function data that computes and ; time vector ; vector ; BDF method order

nxtf ℜ∈),( nxnxtJ ℜ∈),(1+ℜ∈ lt nx ℜ∈0

+∈ Zr ; tolerance of BDF method; maximum number of BDF method iterations .

+ℜ∈tol+∈ Zaxiterm

Outputs: Matrix , , )1(10 ],,,[ +ℜ∈= lnx

lyyyY L niy ℜ∈ li ,,1,0 L= .

1 To initialize α and β according to the values given in Table 1

2 00 xy =

3 0=j

4 For 1:0 −= li

4.1 iii ttt −=Δ +1

4.2 1+= jj

4.3 ),min(1 jrr =

4.4 For 2:1:1 −= rk

4.4.1 )1,:1(),:1( −= knXknX

Page 18: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

17

4.5 iynX =)1,:1(

4.6 )1,:1()1,( 10 nXrf α=

4.7 For 1:2 rk =

4.7.1 ),:1(),( 100 knXkrff α+=

4.8 1=k

4.9 While (Newton’s method) axitermk ≤

4.9.1 ),(],[ iiii ytdatafJ =

4.9.2 iii frtyfy )( 10 βΔ+−=

4.9.3 iini JrtIJ )( 1βΔ−=

4.9.4 Compute solving the equation iyΔ yyJ ii =Δ

4.9.5 If tolyi <Δ )(norm

4.9.5.1 Exit while loop

4.9.6 iii yyy Δ+=+1

4.9.7 1+= kk

4.10 If axitermk ==

4.10.1 Error (the method does not converge)

Algorithm 8: Solves IVPs for ODEs by means of the BDF method.

BDF method coefficients are given in the following table.

β 1α 2α 3α 4α 5α

1=r 1 1

2=r 2/3 4/3 -1/3

3=r 6/11 18/11 -9/11 2/11

4=r 12/25 48/25 -36/25 16/25 -3/25

5=r 60/137 300/137 -300/137 200/137 -75/137 12/137

Table 1: BDF method coefficients.

The algorithms were implemented in Matlab 5.3 and tested on an Intel Core 2 Duo processor at 1.83 GHz with 2 Gb main memory. Several tests have been developed in order to determine the accuracy and efficiency of the algorithms.

What follows is a short description of the characteristics parameters for the implemented algorithms: • idobdf: Solves IVPs for ODEs by BDF method.

- r: Order of BDF method. - tol: Tolerance used by Newton’s method. - maxiter: Maximum number of iterations considered by Newton’s method.

Page 19: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

18

• iaolbp and inolbp: Solve IVPs for autonomous and non autonomous ODEs, by means of the piecewise-linearized approach and the block diagonal Padé approximant method. - q: Polynomials degree in the diagonal Padé approximation of exponential

function. As test battery, four cases studies have been considered, two IVPs for autonomous

ODEs and another two IVPs for non-autonomous ODEs, all of them with well-known analytic solutions. For each case study, the characteristic parameters which offer better accuracy and lower computational cost have been determined. In each case study, two kinds of tests have been carried out:

• Final time constant and stepsize variable.

• Stepsize constant and final time variable.

For each test, the following results are shown:

• Tables which contain the relative errors.

• Tables with the computational cost in flops.

• Graphics that show the relationship between the computational cost of the new algorithms (iaolbp, inolbp) and the BDF algorithm (idobdf).

Case study 1. The autonomous ODE

2'

3xx −= , , 0≥t

with the initial value

1)0( =x .

The solution of this IVP is

ttx

+=

11)( .

The optimal values of the characteristic parameters in this case study are:

• idobdf: r=2, tol=1e-6, maxiter=100.

• iaolbp: q=1.

Below are the results when t=5 and Δt is variable. Table 1 and 2 show the relative errors and computational costs of the two algorithms. Figure 1 shows the relationship between the computational costs of the two algorithms.

Er Δt=0.1 Δt=0.05 Δt=0.01 Δt=0.005 Δt=0.001 Δt=0.0005

idobdf 3.883e-05 1.306e-05 6.563e-07 1.688e-07 6.905e-09 1.731e-09

iaolbp 4.467e-05 1.101e-05 4.353e-07 1.087e-07 4.342e-09 1.085e-09

Table 1: Relative errors considering t=5 and varying Δt.

Page 20: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

19

Flops Δt=0.1 Δt=0.05 Δt=0.01 Δt=0.005 Δt=0.001 Δt=0.0005

idobdf 2958 5058 21998 43998 219998 439998

iaolbp 1351 2701 13501 27001 135001 270001

Table 2: Number of flops considering t=5 and varying Δt.

0.1 0.05 0.01 0.005 0.001 0.00051

1.2

1.4

1.6

1.8

2

2.2

Δt

F b / F

p

Figure 1: Relationship between the number of flops (Fb) with the BDF method (idobdf) and the number of flops (Fp) with the new approach (iaolbp ), considering t=5 and varying Δt.

In the second test Δt=0.1 and t is variable. As before, Table 3 and Table 4 show the relative error and computational cost in flops of the two algorithms. Figure 2 shows the relationship between the number of flops of the two algorithms.

Er t=5 t=10 t=15 t=20 t=25 t=30

idobdf 2.343e-05 2.540e-05 2.034e-05 1.659e-05 1.392e-05 1.197e-05

iaolbp 2.653e-05 1.454e-05 1.001e-05 7.626e-06 6.160e-06 5.167e-06

Table 3: Relative errors considering Δt=0.1 and varying t.

Flops t=5 t=10 t=15 t=20 t=25 t=30

idobdf 5158 9558 13958 18358 22758 27158

iaolbp 2701 5401 8101 10801 13501 16201

Table 4: Number of flops considering Δt=0.1 and varying t.

Page 21: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

20

5 10 15 20 25 300

0.5

1

1.5

2

2.5

3

t

F b / F

p

Figure 2: Relationship between the number of flops (Fb) with the BDF method (idobdf) and the number of flops (Fp) with the new approach (iaolbp), considering Δt=0.1 and varying t.

Case study 2. The autonomous ODE (logistic equation)

)1(' xxx −= λ , , 0≥t

with the initial value

0)0( xx = .

The solution of this IVP is

00

0

)1()(

xexx

tx t +−= −λ .

The tests considered 2=λ and . With respect to the characteristic parameters, the optimal values are:

20 =x

• idobdf: r=2, tol=1e-6, maxiter=100.

• iaolbp: q=1.

In the first test t=5 and Δt was varied. Table 5 and 6, and Figure 3 show the results obtained.

Er Δt=0.1 Δt=0.05 Δt=0.01 Δt=0.005 Δt=0.001 Δt=0.0005

idobdf 3.397e-06 7.848e-07 2.876e-08 7.096e-09 2.807e-10 7.013e-11

iaolbp 7.486e-07 1.887e-07 7.566e-09 1.892e-09 7.567e-11 1.892e-11

Table 5: Relative errors considering t=5 and varying Δt.

Page 22: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

21

Flops Δt=0.1 Δt=0.05 Δt=0.01 Δt=0.005 Δt=0.001 Δt=0.0005

idobdf 2598 4918 21898 41398 189078 364338

iaolbp 1351 2701 13501 27001 135001 270001

Table 6: Number of flops considering t=5 and varying Δt.

0.1 0.05 0.01 0.005 0.001 0.00051

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

2

Δt

F b / F

p

Figure 3: Relationship between the number of flops (Fb) with the BDF method (idobdf) and the number of flops (Fp) with the new algorithm (iaolbp), considering t=5 and varying Δt.

In the second test, Δt=0.1 and t was varied. The corresponding results are shown In Tables 7 and 8, and Figure 4.

Er t=3 t=6 t=9 t=12 t=15 t=18

idobdf 1.142e-04 5.437e-07 1.933e-09 6.109e-12 1.887e-14 2.220e-16

iaolbp 2.472e-05 1.212e-07 4.461e-10 1.460e-12 4.441e-15 2.220e-16

Table 7: Relative errors considering Δt =0.1 and varying t.

Flops t=3 t=6 t=9 t=12 t=15 t=18

idobdf 1718 2978 3698 4418 5138 5858

iaolbp 811 1621 2431 3241 4051 4861

Table 8: Number of flops considering Δt=0.1 and varying t.

Page 23: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

22

5 10 15 20 25 300

0.5

1

1.5

2

2.5

3

t

F b / F

p

Figure 4: Relationship between the number of flops (Fb) with the BDF method (idobdf) and the number of flops (Fp) with the new algorithm (iaolbp), considering Δt=0.1 and varying t.

Case study 3. The non-autonomous ODE

1)(' 2 +−= xtx , , 3≥t

with the initial value

2)3( =x .

The solution of this IVP is

tttx

−+=

21)( .

The optimal values in this case study are:

• idobdf: r=2, tol=1e-6, maxiter=100.

• inolbp: q=1.

In the first test t=4 and Δt was varied. The results are shown in Table 9, Table 10 and Table 11.

Er Δt=0.1 Δt=0.05 Δt=0.01 Δt=0.005 Δt=0.001 Δt=0.0005

idobdf 3.694e-04 8.889e-05 3.557e-06 8.908e-07 3.570e-08 8.926e-09

inolbp 1.269e-16 1.269e-16 1.269e-16 2.538e-16 1.269e-16 6.344e-16

Table 9 Relative errors considering t=4 and varying Δt.

Because the relative errors obtained by the piecewise-linearized algorithm (inolbp) are very small when Δt=0.1, the costs in number of flops are uniquely related to this value, as shown in Tables 10 and 11.

Page 24: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

23

Flops Δt=0.1

idobdf 2958

inolbp 1351

Table 10: Number of flops considering t=4 and Δt=0.1.

Fb / Fp Δt=0.1

inolbp 2.189

Table 11: Relationship between the number of flops (Fb) with the BDF method (idobdf) and the number of flops (Fp) with the new algorithm (inolbp), considering t=4 and Δt=0.1.

In the second test Δt=0.1 and t was varied. The results are summarized on Table 12 and Table 13, and Figure 5.

Er t=3.5 t=4 t=4.5 t=5 t=5.5 t=6

idobdf 1.463e-03 3.694e-04 1.081e-04 2.951e-05 2.748e-06 6.608e-06

inolbp 0 1.269e-16 0 0 0 1.545e-16 Table 12: Relative errors considering Δt=0.1 and varying t.

Flops t=3.5 t=4 t=4.5 t=5 t=5.5 t=6

idobdf 318 638 958 1278 1598 1918

inolbp 166 330 495 660 824 989

Table 13: Number of flops considering Δt=0.1 and varying t.

Page 25: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

24

3.5 4 4.5 5 5.5 60

0.5

1

1.5

2

2.5

3

t

F b / F

p

Figure 5: Relationship between the number of flops (Fb) of the BDF method (idobdf) and the number of flops (Fp) of the new approach (iaolbp), considering Δt=0.1 and varying t.

Case study 4. The non-autonomous ODE [AsPe98, page 153]

ttxx cos)sen(' +−= λ , , 0≥t

with the initial value

1)0( =x .

The solution of this IVP is

tetx t sen)( += λ .

The tests where carried out considering 2=λ . The optimal values of the characteristic parameters are:

• idobdf: r=3, tol=1e-6, maxiter=100.

• inolbp: q=1.

The first test considers t=5 and Δt was varied. The results are shown in Tables 14, and 15, and Figure 6.

Er Δt=0.1 Δt=0.05 Δt=0.01 Δt=0.005 Δt=0.001 Δt=0.0005

idobdf 4.705e-2 9.254e-3 2.803e-4 6.702e-5 1.996e-6 6.421e-7

inolbp 3.380e-2 8.302e-3 3.301e-4 8.251e-5 1.995e-6 8.250e-7

Table 14: Relative errors considering t=5 and varying Δt.

Page 26: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

25

Flops Δt=0.1 Δt=0.05 Δt=0.01 Δt=0.005 Δt=0.001 Δt=0.0005

idobdf 2543 5093 25493 50993 254942 509993

inolbp 1851 3701 18501 37001 184964 370001

Table 15: Number of flops for t=5 and Δt variable.

0.1 0.05 0.01 0.005 0.001 0.00051

1.05

1.1

1.15

1.2

1.25

1.3

1.35

1.4

1.45

Δt

F b / F

p

Figure 6: Relationship between the number of flops (Fb) with the BDF method (idobdf) and the number of flops (Fp) with the new algorithm (inolbp), considering t=5 and varying Δt.

In the second test Δt=0.1 and t was varied between 5 and 30. Due to convergence problems in the BDF method, the maximum number of iterations (maxiter) has been fixed at 10000. In any case, it has been verified that BDF method does not converge for values of t greater than 15, although the value of Δt decreases. Table 16 and 17, and Figure 7 summarize the results.

Er t=5 t=10 t=15 t=20 t=25 t=30

idobdf 4.705e-2 6.383e-2 8.542e-1 Error Error Error

inolbp 3.380e-2 6.906e-2 1.055e-1 6.464e-2 3.274e-2 2.452e-4

Table 16: Relative errors considering Δt=0.1 and varying t.

Flops t=3 t=6 t=9 t=12 t=15

idobdf 1472 3053 4583 26998 26998

inolbp 1074 2221 3331 4441 5551

Table 17: Number of flops considering Δt=0.1 and varying t.

Page 27: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

26

4 6 8 10 12 140

1

2

3

4

5

6

7

t

F b / F

p

Figure 7: Relationship between the number of flops (Fb) with the BDF method (idobdf) and the number of flops (Fp) with the new algorithm (inolbp), considering Δt=0.1 and varying t.

5 Conclusions and future work In this work a new approach for solving IVPs for ODEs, based on the piecewise-

linearized approach and the block diagonal Padé approximation method has been developed. This approach is based on Theorem 2, which makes it possible to solve IVPs for ODEs whether the Jacobian matrix is singular or non-singular. In addition, two special adaptations of the new approach, one for non-autonomous ODEs, inolbp, and another one for autonomous ODEs, iaolbp, have permitted a reduction in the computational and storage costs. The algorithms based on the new approach (iaolbp and inolbp) have been compared to a BDF algorithm (idobdf). According to the experimental results, the new algorithms behave better, both in terms of precision and computational costs, that the algorithm BDF. Below is a summary of the four tests:

1. For autonomous IVPs and considering the same Δt, the accuracy of both BDF (idobdf)and the new approach (iaolbp) are close similar, and sometimes iaolbp is more accurate.

2. For non-autonomous IVPs and considering the same Δt, inolbp is much more accurate than idobdf.

3. In all the case studies, autonomous and non-autonomous, the new approach (iaolbp and inolbp) has lower computational cost than the BDF (idobdf).

As future work, new improvements will be developed, such as: • To use the piecewise-linearized method described in this paper to deal with

ODEs involving high dimension problems, using an approximation based on Krylov subspaces. The basic idea is to use block-oriented versions of Krylov subspaces approximation [Saad92, Roge98] for computing vectors which appear in

1+iy(17) and (25).

Page 28: P.O. Box: 22012 E-46071 Valencia (SPAIN)DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN UNIVERSIDAD POLITÉCNICA DE VALENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Informe

27

• To consider adapting the methodology described here in order to obtain efficient resolution of ODEs with sparse Jacobian matrices [Saad94].

• To implement algorithms based on the piecewise-linearized approach with error control in order to vary stepsize dynamically. that allows varying the stepsize dynamically. The tests reported here considered constant stepsize. It is possible to improve the developed algorithms, using a stepsize variable which can be used to estimate, in each iteration, the error committed [RaGa03].

References [AsPe98] U. M. Ascher, L. R. Petzold, “Computer Methods for Ordinary Differential

Equations and Differential-Algebraic Equations”. SIAM, 1998. [Carr93] J. Carroll, “A Matricial Exponentially Fitted Scheme for the Numerical

Solution of Stiff Initial-Value Problems”, Computers Math. Applic., 26 (1993), pp. 57-64.

[CuHi52] C. F. Curtiss and J. O. Hirschfelder, “Integration of Stiff Equations”, Proc. Nat. Acad. Sci., 38(1952), pp. 235-243.

[Garc03] C. M. Garcia-Lopez, “Piecewise-Linearized and Linearized θ-Methods for Ordinary and Partial Differential Equation Problems”, Computer & Mathematics with Applications, 45(2003), pp. 351-381.

[High04] N. J. Higham, “The Scaling and Squaring Method for the Matrix Exponential Revisited”, Numerical Analysis Report No. 452, Manchester Centre for Computational Mathematics, 2004.

[HoLS98] M. Hochbruck, C. Lubich and H. Selhofer, “Exponential Integrators for Large Systems of Differential Equations”, SIAM J. Sci. Comput. 19(1998), pp. 1552-1574.

[Mole03] C. B. Moler and C. Van Loan, “Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later*”, SIAM Review, 45(2003), pp. 3-49.

[RaGa97] J. I. Ramos, C. M. Garcia-Lopez, “Piecewise-Linearized Methods for Initial-Value Problems”, Applied Mathematics and Computation, 82(1997), pp. 273-302.

[Roge98] R. B. Sidje, “Expokit: A Software Package for Computing Matrix Exponentials”, ACM Trans. Math. Softw., 24(1998), pp. 130-156.

[Saad92] Y. Saad, “Analysis of Some Krylov Subspace Approximations to the Matrix Exponential Operator”. SIAM Journal on Numerical Analysis, 29(1992), pp. 209-228.

[Saad94] Y. Saad, “SPARSKIT: A Basic Toolkit for Sparse Matrix Computation”, version 2, 1994.