chapter5.page07

chapter5.page07 - ) k 2 = hf ( t i + 1 2 h,x i + 1 2 k 1 )...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
3. RUNGE-KUTTA METHOD 7 the local truncation error, then e i +1 (1 + hK ) | e i | + 1 2 h 2 M, i = 1 ,...n. , where | ∂f ( t,x ) ∂x | ≤ K , and | x 00 ( t ) | ≤ M. Theorem 2.2 indicates that, without roundoff error, the smaller h gives better approximate solution. However, due the roundoff error introduced in each step of computation, (such as compute can only give approximate value for 2) we can’t choose h arbitrarily small. The following result gives the optimal step size h, Theorem 2.2 . With the same assumption of Theorem 2.2,and sup- pose at each step the roundoff error is bounded by ² then the optimal value for the step length is h opt = r 2 ² M 3. Runge-Kutta Method 3.1. Runge-Kutta Method. There are several Runge-Kutta meth- ods, but the fourth order Runge-Kutta method is most popular. Sup- pose x 0 ( t ) = f ( t,x ) , x ( a ) = x 0 . and h = b - a n is the step length, the fourth order Runge-Kutta method is given below, k 1 = hf ( t i ,x i
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ) k 2 = hf ( t i + 1 2 h,x i + 1 2 k 1 ) k 3 = hf ( t i + 1 2 h,x i + 1 2 k 2 ) k 4 = hf ( t i + h,x i + k 3 ) x i +1 = x i + 1 6 ( k 1 + 2 k 2 + 2 k 3 + k 4 ) In general Runge-Kutta method gives more accurate result than Eu-ler’s method at the same step length. However, Runge-Kutta method is more expensive to implement, that is, at each step, Runge-Kutta method requires more computation than Euler’s method( four func-tion evaluations compare one in Euler’s method). Example 3.1 . Example 3.2 . Find approximate to x (1) if x ( t ) = t 2-e x sin( t ) ,x (0) = 1 with h = 0 . 25 . Solution Here the interval is [0, 1], so a = 0 ,b = 1 . Since h = b-a n = 0 . 25 we have n = 4 and we need to compute x 1 ,x 2 ,x 3 ,x 4 starting with x = x (0) = 1 , t = 0...
View Full Document

This note was uploaded on 10/04/2011 for the course MAP 4231 taught by Professor Dr.han during the Spring '11 term at UNF.

Ask a homework question - tutors are online