12. Runge-Kutta_Formulas

12. Runge-Kutta_Formulas - 3.1.4 Runge-Kutta Formulas dy =...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1/5 3.1.4 Runge-Kutta Formulas To solve a first-order O.D.E. () y x F dx dy , = (Explicit) Euler method: i i i xF y y Δ + = + 1 where ( ) i i i y x F F , = is the slope of x y at i x - uses i y and the slope of x y at i x (both known) to calculate 1 + i y - this is a first-order method; i.e. truncation error ( ) x O Δ Second-order Runge-Kutta: + Δ + = + + 2 2 1 1 i i i i F F x y y - uses the slope of x y at i x : ( ) i i i y x F F , = - plus a slope estimate at 1 + i x (which requires an estimate of y at 1 + i x ): ( ) + + + = 1 1 1 , i i i y x F F ; where x x x i i Δ + = + 1 , i i i xF y y Δ + = + 1 The Taylor series derivation in the handout shows that using an average slope found in this way gives a formula for 1 + i y with a truncation error of ( ) 2 x O Δ Fourth-order Runge-Kutta: + + + Δ + = + + 6 3 3 6 1 1 i c c i i i F F F F x y y - uses the slope of x y at i x : ( ) i i i y x F F , = - plus slope estimates at the interval centre c x and at 1 + i x (which requires estimates of y at these locations): ( ) = c c c y x F F , ; 2 x x x i c Δ + = ; i i c F x y y 2 Δ + = ( ) = c c c y x F F , ; 2 x x x i c Δ + = ; Δ + = c i c F x y y 2 ( ) + + + = 1 1 1 , i i i y x F F ; x x x i i Δ + = + 1 ; + Δ + = c i i xF y y 1 Note how i F leads to c F ; c F leads to c F ; c F leads to + 1 i F A Taylor series derivation similar to the handout (but much longer) shows that an average slope found in this way gives a formula for 1 + i y with a truncation error of ( ) 4 x O Δ .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2/5 Example: Solution using 2 nd order Runge-Kutta with delta x = 0.5 AB C D E F G H 1 x i y i F i y* i+1 F* i+1 y exact error = y i y exact 2 0 2 0.50000 2.25000 0.50000 2.00000 0.00000 3 0.5 2.25000 0.50000 2.50000 0.80000 2.24304 0.00696 4 1 2.57500 0.77670 2.96335 1.47637 2.54951 0.02549 5 1.5 3.13827 1.39408 3.83531 2.34662 3.08727 0.05099 6 2 4.07344 2.20943 5.17816 3.21060 4.00000 0.07344 7 2.5 5.42845 3.06257 6.95973 4.02314 5.34147 0.08699 8 3 7.19988 3.88895 9.14436 4.79804 7.10634 0.09354 9 3.5 9.37163 4.68168 11.71247 5.54964 9.27530 0.09632 10 4 11.92946 5.44870 14.65381 6.28676 11.83216 0.09730 11 4.5 14.86332 6.19814 17.96239 7.01465 14.76588
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

12. Runge-Kutta_Formulas - 3.1.4 Runge-Kutta Formulas dy =...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online