+ All Categories
Home > Documents > R-K method

R-K method

Date post: 06-Apr-2018
Category:
Upload: abhinav-prabhu
View: 225 times
Download: 0 times
Share this document with a friend
16
 
Transcript
Page 1: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 1/16

 

Page 2: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 2/16

 

Page 3: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 3/16

 

Page 4: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 4/16

 

Page 5: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 5/16

 

Page 6: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 6/16

 

Page 7: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 7/16

 

Page 8: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 8/16

 

Page 9: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 9/16

 

Page 10: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 10/16

 

Next: Algorithm: Runge-Kutta Method of  Up: Numerical Methods Previous: Error

Estimates and Convergence  Contents 

Runge-Kutta MethodRunge-Kutta Method is a more general and improvised method as compared to that of 

the Euler's method. It uses, as we shall see, Taylor's expansion of a ``smooth function"

(thereby, we mean that the derivatives exist and are continuous up to certain desired

order). Before we proceed further, the following questions may arise in our mind,

which has not found place in our discussion so far.

1.  How does one choose the starting values, sometimes called starters that are

required for implementing an algorithm?

2.  Is it desirable to change the step size (or the length of the interval) during

the computation if the error estimates demands a change as a function of ?

For the present, the discussion about Question is not taken up. We try to look more

on Question in the ensuing discussion. There are many self-starter methods, like the

Euler method which uses the initial condition. But these methods are normally not

very efficient since the error bounds may not be ``good enough". We have seen in

Theorem that the local error (neglecting the rounding-off error) is in the

Euler's algorithm. This shows that as the values of become smaller, the

approximations improve. Moreover, the error of order , may not be sufficiently

accurate for many problems. So, we look into a few methods where the error is of 

higher order. They are Runge-Kutta (in short R-K) methods. Let us analyze how the

algorithm is reacher before we actually state it. To do so, we consider the IVP  

Define with and . We now

assume that and are smooth. Using Taylor's series, we now have 

(14.3.10)

Page 11: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 11/16

For consider the expression 

(14.3.11)

and are constants. When , ( ) reduces to the Euler's algorithm. We

choose and so that the local truncation error is . From the definition

of , we have 

where denote the partial derivatives of with respect to

respectively. Substituting these values in ( ), we have 

(14.3.12

)

A comparision of ( ) and ( ), leads to the choice of  

(14.3.13)

in order that the powers of up to match (in some sense) in the approximate

values of . Here we note that . So, we choose and so that

( ) is satisfied. One of the simplest solution is 

Thus we are lead to define 

(14.3.14)

Evaluation of by ( ) is called the Runge-Kutta method of order (R-K method

of order ). 

Page 12: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 12/16

A few things are worthwhile to be noted in the above discussion. Firstly, we need the

existence of partial derivatives of up to order for R-K method of order . For

higher order methods, we need to be more smooth. Secondly, we note that the local

truncation error (in R-K method of order ) is of order . Again, we remind the

readers that the round-off error in the case of implementation has not been considered.

Also, in ( ), the partial derivatives of do not appear. In short, we are likely to get a

better accuracy in Runge-Kutta method of order in comparision with the Euler's

method. Formally, we state the Runge-Kutta method of order .

 Algorithm: Runge-Kutta Method of Order

For the IVP ( ) or ( ), let where is a given prescribed

step size. For , define by

Then the flow chart associated with the R-K method of order is 

Figure: Flow-

Chart of Runge-Kutta method of order

Page 13: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 13/16

EXAMPLE 14.3.1 Use the Ringe-Kutta method to find the approximate value

of where is the solution of the IVP  

with step sizes and Also, calculate the error and tabulate the

results. 

Solution: Comparing the given IVP with ( ), we note that

and . We now calculate the values of and from the R-K method of 

order and use the formula to calculate the approximate values.

The results are shown in Tables and . 

Table

InitialInitial

Step sizeApprox Exact

Error 

1.00000  0.10000  1.00000  1.00000  0.00000  0.1  0.121 

1.00000  0.10000  1.11050  1.11111  0.1  0.146531 

0.20000  1.11050  0.10000  1.23377  1.25000  0.01623  0.12332  0.18417 

0.30000  1.23377  0.10000  1.338751  1.42857  0.04106  0.15222  0.23708 

0.40000  1.38751  0.10000  1.58216  1.66667  0.08451  0.19252  0.31495 

0.50000  1.58216  0.10000  1.83589  2.00000  0.16411  0.25032  0.00627 

Page 14: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 14/16

 

Table

InitialInitial

Step sizeApprox Exact

Error 

1.00000  0.05000  1.00000  1.00000  0.00000  0.05000  0.05513 

1.00000  0.05000  1.05256  1.05263  0.05539  0.06138 

0.10000  1.05256  0.05000  1.11095  1.11111 0.00016 

0.06171  0.06876 

0.15000  1.11095  0.05000  1.17618  1.17647  0.00029  0.06917  0.07755 

0.20000  1.17618  0.05000  1.24954  1.25000  0.00046  0.0781  0.08813 

0.25000  1.24954  0.05000  1.33264  1.33333  0.00070  0.08880  0.10102 

0.30000  1.33264  0.05000  1.42755  1.42857 0.00102 

0.10190  0.11696 

0.35000  1.42755  0.05000  1.53697  1.53846 0.00149 

0.11812  0.13697 

0.40000  1.53697  0.05000  1.66451  1.66667 0.00215 

0.13853  0.16255 

0.45000  1.66451  0.05000  1.81505  1.81818 0.00313 

0.16472  0.19598 

0.50000  1.81505  0.05000  1.99540  2.00000 0.00460 

0.199082  0.24079 

Runge-Kutta Method of Order

We are now ready to state the algorithm for using the Runge-Kutta method of 

order . This is a generalization of the R-K method of order to higher order

methods. Without getting into analytical details, we state the R-K method of order

Page 15: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 15/16

. It is widely used algorithm. For the IVPs ( ), set for

where . Also, we set . The for , we define 

where 

Remark 14.3.2  The local error in the R-K method of order is . To achieve

this error, we are forced to do more computation or in other words, spend more time

to compute and . It all depends on the nature of the function to estimate

the time consumed for the computation. The cost we pay for higher accuracy is more

computation. Also, to reduce the local error, we need smaller values of the step

size , which again results in large number of computation. Each computation leads

to more of rounding errors. In other words, reduction in discretisation error may lead 

to increase in rounding off error. T HE MORAL IS THAT THE INDISCRIMINATE REDUCTION OF STEP-SIZE NEED NOT MEAN MORE ACCURACY . 

Page 16: R-K method

8/3/2019 R-K method

http://slidepdf.com/reader/full/r-k-method 16/16

 

Figure: Flow-Chart of Runge-Kutta method of order

EXERCISE 14.3.3 Use the Runge-Kutta method of order to find an approximatesolution of the IVP  

with step size . Also, calculate the error and tabulate the results. 


Recommended