Content uploaded by Ibrahim Saidu

Author content

All content in this area was uploaded by Ibrahim Saidu on Sep 05, 2016

Content may be subject to copyright.

International Journal of Computer Applications (0975 – 8887)

Volume 9– No.8, November 2010

51

A Simplified Derivation and Analysis of Fourth Order

Runge Kutta Method

Musa H.

Department of Mathematics and

Computer Science

UMYU

Ibrahim Saidu

Faculty of Computer Science and

Information Technology

University Putra,Malaysia.

M. Y. Waziri

Faculty of Science, Department of

Mathematics

University Putra,Malaysia

ABSTRACT

The derivation of fourth order Runge-Kutta method involves

tedious computation of many unknowns and the detailed step by

step derivation and analysis can hardly be found in many

literatures. Due to the vital role played by the method in the

field of computation and applied science/engineering, we

simplify and further reduce the complexity of its derivation and

analysis by exploring some possibly well-known works and

propose a step by step derivation of the method. We have also

shown the stability region graphically

Keywords: Fourth order Runge Kutta Method, Derivation,

Stability Analysis

1. INTRODUCTION

Runge-Kutta formulas are among the oldest and best understood

schemes in numerical analysis. However, despite the evolution of

a vast and comprehensive body of knowledge, it continues to be a

source of active research [7]. Runge-Kutta methods provide a

popular way to solve the initial value problem for a system of

ordinary differential equations [11]:

with a given step length h through the interval ,

successively producing approximations to . We deal

exclusively with the step by step derivation and the stability

analysis of the fourth order Runge-Kutta Method. For a thorough

coverage of the derivation and analysis the reader is referred to

[1,2,3,4,5].

The paper has the following structure: section 2 presents

mathematical formulation and derivation, Section 3 presents the

analysis and section 4 presents the conclusion.

2. MATHEMATICAL FORMULATION

AND DERIVATION

We begin by defining the function as in [1,2,3,4,5 and 6]

1( , , )

nn

y y h x y h

Where

1

1

1

1

1

1

( , , )

( , )

( , ), 2,3,..., 1

s

ii

i

i

i i n ij j

j

i

i ij

j

x y h b k

k f x y

k f x c h y h a k i i

ca

1 1 1 2 2 3 3 4 4

1

2 2 21 1

3 3 31 1 32 2

4 4 41 1 42 2 43 3

()

( , )

( , )

( , ( ))

( , ( ))

nn

n

n

n

y y h b k b k b k b k

k f x y

k f x c h y ha k

k f x c h y h a k a k

k f x c h y h a k a k a k

The functions are expanded using a Taylor series expansion for

function of two variables. To get the unknowns, we use the

fourth order coefficients of order 4

(1)

1

(2)

1

(3) 2

1

(3)

2

(4) 3

1

(2)

2

(4) 2

3

(4)

4

1

1

2

11

26

1

6

11

6 24

1

8

11

2 24

1

24

i

i

ii

i

ii

i

i ij j

ij

ii

i

i i ij j

ij

i ij j

ij

i ij jk k

ij

b

bc

bc

ba c

bc

b c a c

ba c

ba a c

Setting the coefficients to zero, we have

1 2 3 4 1b b b b

(1)

International Journal of Computer Applications (0975 – 8887)

Volume 9– No.8, November 2010

52

2 2 3 3 4 4 1

2

b c b c b c

(2)

2 2 2

2 2 3 3 4 4 1

3

b c b c b c

(3)

3 32 2 4 42 2 4 43 3 1

6

b a c b a c b a c

(4)

3 3 3

2 2 3 3 4 4 1

4

b c b c b c

(5)

3 3 32 2 4 4 42 2 4 4 43 3 1

8

b c a c b c a c b c a c

(6)

2 2 2

3 32 2 4 42 2 4 43 3 1

12

b a c b a c b a c

(7)

4 43 32 2 1

24

b a a c

(8)

We use the simplifying assumptions by Butcher:

1(1 ), 2,3,4

s

i ij i j

iba b c j

(9)

Which affect the expression for

(3) (4)

23

,

and

(4)

4

. i.e.

(3) (2) (3)

2 1 1

2

(4) (3) (4)

3 1 1

3

(4) (2) (3) (4)

4 1 1 2

2

Now using equation (9) for

2,3 and 4j

we have:

3 32 4 42 2 2

(1 )b a b a b c

(i)

4 43 3 3

(1 )b a b c

(ii)

44

0 (1 )bc

respectively. (iii)

Now when

4j

in (iii),

41c

and

40b

for a four stage

method.

We substitute

41c

in equations 2, 3 and 5 and solve for

2

b

,

3

b

and

4

b

simultaneously. Therefore equations 2, 3 and 5

becomes

2 2 3 3 4 1

2

b c b c b

22

2 2 3 3 4 1

3

b c b c b

33

2 2 3 3 4 1

4

b c b c b

Using crammer’s rule, we first find the determinant of the

coefficient matrix

23

22

2 3 2 3 2 2 3 3

33

23

1

1 ( 1)( )( 1)

1

cc

D c c c c c c c c

cc

To solve for

2

b

2

3

23 3 3

3

3

3

11

2( 1)(2 1)

11

3 12

11

4

b

c

c c c

Dc

c

23 3 3 3

2 2 3 2 2 3 3 2 2 3 2

( 1)(2 1) 1 2

( 1)( )( 1)

12 12 (1 )( )

b

Dc c c c

b c c c c c c

D c c c c

To solve for

3

b

3

2

22 2 2

2

3

2

11

2( 1)(2 1)

11

3 12

11

4

b

c

c c c

Dc

c

32 2 2 2

3 2 3 2 2 3 3 3 3 2 3

( 1)(2 1) 1 2

( 1)( )( 1)

12 12 ( )(1 )

b

Dc c c c

b c c c c c c

D c c c c

To solve for

4

b

4

23

22 2 3 2 3 2 3 2 3

23

33

23

1

2( )(3 4 4 6 )

1

3 12

1

4

b

cc

c c c c c c c c

D c c

cc

42 3 2 3 2 3 2 3 2 3 2 3

4 2 3 2 2 3 3 23

( )(3 4 4 6 ) 6 4( ) 3

( 1)( )( 1)

12 12(1 )(1 )

b

Dc c c c c c c c c c c c

b c c c c c c

D c c

Now to solve for

43

a

, we use equation (ii) i.e. when j=3

Hence, we have

3 3 2 3

2

43 3

4 3 3 2 3 2 3 2 3

(1 ) 12(1 )(1 )

12 (1 )

12 ( )(1 ) 6 4( ) 3

b c c c

c

ac

b c c c c c c c c

International Journal of Computer Applications (0975 – 8887)

Volume 9– No.8, November 2010

53

2 2 3

3 2 3 2 3 3 2

(1 )(2 1)(1 )

( )(6 4( )) 3

c c c

c c c c c c c

To solve for

32

a

and

42

a

, we use equations (i) (when j=2) and

(8) i.e.

3 32 4 42 2 2

(1 )b a b a b c

(i)

4 43 32 2 1

24

b a a c

(8)

From equation (8) above,

2 3 3 2 3 2 3 3 2

32 2 4 43 2 2 3 3 2 2 2 3

12(1 )(1 ) ( )(6 4( ) 3)

1 1 1 1

24 24 6 4( ) 3 (1 )(2 1(1 )

c c c c c c c c c

ac b a c c c c c c c c

3 2 3

22

()

2 (2 1)

c c c

cc

Substituting this value into (i), we have

2 2 3 32

42 4

3 3 2 3 2 3

2

2

2 2 3 2 3 3 3 2 2 2 2 3 2 3

2 3 3 2 3

2 2 3 2 3 2 3

(1 )

1 2 ( ) 12(1 )(1 )

12

(1 )

12 (1 )( ) 12 (1 )( ) 2 (2 1) 6 4( ) 3

(1 ){2(1 )(1 2 ) ( )}

2 ( ){6 4( ) 3)}

b c b a

ab

c c c c c c

c

c

c c c c c c c c c c c c c c

c c c c c

c c c c c c c

This solution assumes that

2 3 2 3 2 1

0,1, 0,1, , 2

c c c c c

We choose two free parameters

21

3

c

and

32

3

c

Substituting these values into

4

b

,

3

b

and

2

b

we have:

4

1 2 2 1 4

6 4 3 11

3 3 3 3 38

12 8

12 1 1 3

33

b

3

11

12 3

33

8

2 2 2 1 8

12 1 9

3 3 3 3

b

2

21

12 3

33

8

1 1 1 2 8

12 1 9

3 3 3 3

b

Using equation (1)

1 2 3 4

1 2 3 4

1

1

3 3 1 1

1 8 8 8 8

b b b b

b b b b

Also

2 21 1

3

ca

Using equation (ii) (when j=3),

4 43 3 3

(1 )b a b c

33

43 4

(1 ) 3 2 8

11

8 3 1

bc

ab

Also

2 3 3 2 3

42 2 2 3 2 3 2 3

(1 ){2(1 )(1 2 ) ( )}

2 ( ){6 4( ) 3)}

1 2 2 1 2

1 {2(1 )(1 2 ) ( )}

3 3 3 3 3

1

1 1 2 1 2 1 2

2 ( ){6 4( ) 3)}

3 3 3 3 3 3 3

c c c c c

ac c c c c c c

Using equation (2) we can obtain

4

c

as

4 4 2 2 3 3

4

1

21 3 1 3 2

2 8 3 8 3 1

1

8

b c b c b c

c

Hence,

4 41 42 43

41 4 42 43 1 ( 1) 1 1

c a a a

a c a a

Also

3 2 3

32 22

2 1 2 2

()

()3 3 3 9 1

1 1 2

2 (2 1) 2 (2 1)

3 3 9

c c c

acc

From

3 31 32

c a a

31 3 32 21

1

33

a c a

Finally, we know that

1 11 0ca

.

We have therefore determined all the unknowns in the method

and the method can be written in Butcher’s Tableu [3] as

0 0 0 0 0

1/3 1/3 0 0 0

2/3 -1/3 1 0 0

1/8 3/8 3/8 1/8

Which has the form

1 1 2 3 4

( 3 3 )

8

nn

h

y y k k k k

International Journal of Computer Applications (0975 – 8887)

Volume 9– No.8, November 2010

54

1

1

2 2 21 1

3 3 31 1 32 2 1 2

4 4 41 1 42 2 43 3 1 2 3

( , )

( , ) ( , )

33

21

( , ( )) ( , ( )

33

( , ( ) ( , ( )

nn

n n n n

n n n n

n n n n

k f x y

hk

h

k f x c h y ha k f x y

k f x c h y h a k a k f x h y h k k

k x c h y h a k a k a k f x h y h k k k

3. ANALYSIS OF THE METHOD

The stability polynomial is given by

1

( ) 1 ( )

T

R h hb I hA e

and it is required that

( ) 1Rh

for absolute stability see [6]. Now for the Runge Kutta forth

order method,

1 1 2 3 4

( 3 3 )

8

nn

h

y y k k k k

The Butcher’s Tableu is

0 0 0 0 0

1/3 1/3 0 0 0

2/3 -1/3 1 0 0

1/8 3/8 3/8 1/8

0 0 0 0

10 0 0

311 0 0

3

1 1 1 0

A

,

1 0 0 0

1 0 0

3

10

3

1

h

I hA hh

h h h

,

1 3 3 1 3 3

8 8 8 8 8 8 8 8

Th h h h

hb h

1

( ) 1 ( )

T

R h hb I hA e

1

1 0 0 0

1

1 0 0 1

33 3

11

8 8 8 8 10 1

3

1

h

h h h h

hh

h h h

2

23 2

1 0 0 0

1

1 0 0

31

33

11

8 8 8 8 10

33 1

21

33

h

h h h h hh h

hh

h h h h

2 2 2 3

22

2

32

8 8 8 3 3 8 3 3

1

33 1

8 8 8

11

31

88

8

h h h h h h h h

h

h h h hh

hh

h

2 2 3 2 3 4

2 2 3

2

3 3 2

8 8 24 24 8 24 24 1

33 1

8 8 8 8

11

31

88

8

h h h h h h h

h h h h

hh

h

2 3 4 2 3 2

33

18 8 24 24 8 4 8 8 8 8

h h h h h h h h h h

2 3 4

12 6 24

h h h

h

For absolute stability

2 3 4

1 1 1

1 1 1

2 6 24

h h h h

Taking the RHS

2 3 4

1 1 1

11

2 6 24

h h h h

2 3 4

1 1 1 0

2 6 24

h h h h

Using Mathematica we get the roots as

NSolve[h+h*h/2+h*h*h/6+h*h*h*h/24==0,h]

{{h-2.78529},{h-0.607353-2.8719 },{h-

0.607353+2.8719 },{h0.}}

We consider 3 cases as it can be found in [1]

Case 1

When

is real and

0

,

The roots are -2.785 and 0

International Journal of Computer Applications (0975 – 8887)

Volume 9– No.8, November 2010

55

Hence the stability interval is

( 2.785,0)h

.

Case 2

2 3 4

23

2

8 8 24 24 1

31

8 4 8

11

31

88

8

h h h h

h h h

hh

h

When

h

is pure and

imaginary,

We set

iy

in the stability polynomial to get

3

24

( ) ( ) ( )

1 ( ) 1

2 6 24

yh yh yh

i yh i

3

24

( ) ( ) ( )

1 ( ) 1

2 24 6

yh yh yh

iyh i

Let

t yh

and take the magnitude

2

2 4 3

11

2 24 6

t t t

t

2 4 2 4 6 4 6 8 4 4 6

2

11

2 24 2 4 48 24 48 578 6 6 36

t t t t t t t t t t t

t

Simplifying, we get

68

11

72 576

tt

68

0

72 576

tt

Using Mathematica to find the roots we have

NSolve[(-(t^6)/72)+((t^8)/576)0,t]

{{t-

.82843},{t0.},{t0.},{t0.},{t0.},{t0.},{

t0.},{t2.82843}}

The equation is satisfied for

2.82843t

i.e.

22t

Hence the stability interval is

0 2 2h

. i.e.

(0,2 2)h

Case 3 When

is complex with

Re( ) 0

, we set

x iy

in

24

3

( ) ( ) ( )

11

2 6 24

h h h

h

and plot the boundary of the region by plotting the real and

imaginary parts.

The stability region is plotted using Maple as follows

Re( )h

4. CONCLUSION

In this paper, we have simplified the existing derivation and

analysis of the fourth order Runge-Kutta Method for easy

reference to students and plot the stability region. We also

reduced the complexity of the method by proposing a step by

step derivation approach for better understanding to students.

5. REFERENCES

[1] M.K. Jain, S.R.K. Iyengar, R.K. Jain, (2007), Numerical

Methods for Scientific and Engineering Computing.

[2] J. D. Lambert, (1991), Numerical Methods for Ordinary

Differential Systems, the initial value Problem, John Wiley &

Sons Ltd.

[3] J.C. Butcher, (2003), Numerical Methods for Ordinary

Differential Equations, John Wiley & Sons Ltd.

[4] John R. Dorman, (1996), Numerical Methods for

Differential Equations, a Computational Approach, CRC Press,

Inc.

[5] J. D. Lambert, (1973), Computational Methods in

Ordinary Differential Equations, John Wiley & Sons Ltd

[6] Fudzia Ismail, (2010), Lecture Notes on Numerical

Methods (unpublished), University Putra Malaysia

[7] G. Byrne and Hindmarsh, (1990), RK Methods prove

popular at IMA Conference on Numerical ODE’s,SIAM

News,23/2 pp.14-15.

[8] Lawrence F. Shampine, (1985),Interpolation for Runge-

Kutta Methods.SIAM Journal of numerical

analysis,22/5,pp.1014-1027.