solprogram5

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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 (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.by roundoff and stability is not a problem for the method, stepsize, and problem combination....
View Full Document

This note was uploaded on 11/10/2011 for the course MAD 5404 taught by Professor Gallivan during the Spring '11 term at FSU.

Page1 / 5

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

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