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 RungeKutta method gives more accurate result than Euler’s method at the same step length. However, RungeKutta method is more expensive to implement, that is, at each step, RungeKutta method requires more computation than Euler’s method( four function evaluations compare one in Euler’s method). Example 3.1 . Example 3.2 . Find approximate to x (1) if x ( t ) = t 2e x sin( t ) ,x (0) = 1 with h = 0 . 25 . Solution Here the interval is [0, 1], so a = 0 ,b = 1 . Since h = ba 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
 Spring '11
 Dr.Han
 Numerical Analysis, m. Theorem

Click to edit the document details