{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

solprogram5

# solprogram5 - Program 5 Foundations of Computational Math 2...

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

Program 5 Foundations of Computational Math 2 Spring 2011 Problem 5.1 Consider the following explicit Runge Kutta methods: Forward Euler: y n = y n 1 + hf ( t n 1 , y n 1 ) Explicit Midpoint: ˆ y 1 = y n 1 , f 1 = f ( t n 1 , ˆ y 1 ) ˆ y 2 = y n 1 + h 2 f 1 , f 2 = f ( t n 1 + h 2 , ˆ y 2 ) y n = y n 1 + hf 2 Classical Explicit Runge Kutta 4-stage 4th order: ˆ y 1 = y n 1 , f 1 = f ( t n 1 , ˆ y 1 ) ˆ y 2 = y n 1 + h 2 f 1 , f 2 = f ( t n 1 / 2 , ˆ y 2 ) ˆ y 3 = y n 1 + h 2 f 2 , f 3 = f ( t n 1 / 2 , ˆ y 3 ) ˆ y 4 = y n 1 + hf 3 , f 4 = f ( t n , ˆ y 4 ) y n = y n 1 + h parenleftbigg 1 6 f 1 + 1 3 f 2 + 1 3 f 3 + 1 6 f 4 parenrightbigg (5.1.a) Apply the methods to the initial value problem f ( t, y ) = 5 t - 1 t 2 - 5 ty 2 , y (1) = 1 The true solution is y ( t ) = 1 t Use each of the stepsizes h = 0 . 2 , h = 0 . 1 , h = 0 . 05 , h = 0 . 02 , h = 0 . 01 , h = 0 . 005 , h = 0 . 002 to integrate from t = 1 to t = 25 and determine the error e h = | y n - y (25) | . 1

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

View Full Document
(5.1.b) Consider the Jacobian of f ( t, y ) and determine the inteval, 1 t t stab for which each method/stepsize combination is absolutely stable. (For this problem λ is a function of t .) Use the figures from the notes and textbook (p. 491) to estimate the extent of the region of absolute stability. (5.1.c) Repeat the experiments with Backward Euler and analyze the results. Solution: The table includes the observed rate of convergence of e h via the formula p = log 2 ( e h e h/ 2 ) The observed p will often match the order of the method as long as the error is not dominated by roundoff and stability is not a problem for the method, stepsize, and problem combination.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}