Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 2. Predictor-Corrector Methods

Similar documents
MA2264 -NUMERICAL METHODS UNIT V : INITIAL VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL. By Dr.T.Kulandaivel Department of Applied Mathematics SVCE

Numerical Analysis MTH603. dy dt = = (0) , y n+1. We obtain yn. Therefore. and. Copyright Virtual University of Pakistan 1

Fourth Order RK-Method

(5.5) Multistep Methods

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

SKP Engineering College

LECTURE 14 NUMERICAL INTEGRATION. Find

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

NUMERICAL DIFFERENTIATION

Numerical Differentiation

Fall 2014 MAT 375 Numerical Methods. Numerical Differentiation (Chapter 9)

Unit I (Testing of Hypothesis)

Consider a function f we ll specify which assumptions we need to make about it in a minute. Let us reformulate the integral. 1 f(x) dx.

Chapter 4: Numerical Methods for Common Mathematical Problems

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

Differential Equations

Two Step Hybrid Block Method with Two Generalized Off-step Points for Solving Second Ordinary Order Differential Equations Directly

232 Calculus and Structures

Differential equations. Differential equations

COSC 3361 Numerical Analysis I Ordinary Differential Equations (II) - Multistep methods

The Verlet Algorithm for Molecular Dynamics Simulations

Lecture 21. Numerical differentiation. f ( x+h) f ( x) h h

multistep methods Last modified: November 28, 2017 Recall that we are interested in the numerical solution of the initial value problem (IVP):

Chapter XI. Solution of Ordinary Differential Equations

MTH 452/552 Homework 3

USHA RAMA COLLEGE OF ENGINEERING & TECHNOLOGY

Polynomial Interpolation

How to Find the Derivative of a Function: Calculus 1

158 Calculus and Structures

Differential Equations

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems)

AMS 147 Computational Methods and Applications Lecture 09 Copyright by Hongyun Wang, UCSC. Exact value. Effect of round-off error.

HIGHER ORDER METHODS. There are two principal means to derive higher order methods. b j f(x n j,y n j )

Order of Accuracy. ũ h u Ch p, (1)

Parameter Fitted Scheme for Singularly Perturbed Delay Differential Equations

Lecture 15. Interpolation II. 2 Piecewise polynomial interpolation Hermite splines

Math 128A Spring 2003 Week 11 Solutions Burden & Faires 5.6: 1b, 3b, 7, 9, 12 Burden & Faires 5.7: 1b, 3b, 5 Burden & Faires 5.

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes

Numerical Methods - Initial Value Problems for ODEs

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science

Virtual University of Pakistan

Physically Based Modeling: Principles and Practice Implicit Methods for Differential Equations

SOLUTION OF EQUATION AND EIGENVALUE PROBLEMS PART A( 2 MARKS)

lecture 35: Linear Multistep Mehods: Truncation Error

Taylor Series and the Mean Value Theorem of Derivatives

Polynomial Interpolation

Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations

The Derivative as a Function

Section 3.1: Derivatives of Polynomials and Exponential Functions

NUMERICAL ANALYSIS SYLLABUS MATHEMATICS PAPER IV (A)

Numerical Differential Equations: IVP

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

5 Ordinary Differential Equations: Finite Difference Methods for Boundary Problems

Numerical Methods. Scientists. Engineers

The total error in numerical differentiation

Previous Year Questions & Detailed Solutions

1 The concept of limits (p.217 p.229, p.242 p.249, p.255 p.256) 1.1 Limits Consider the function determined by the formula 3. x since at this point

Lecture XVII. Abstract We introduce the concept of directional derivative of a scalar function and discuss its relation with the gradient operator.

5.6 Multistep Methods

Chapter 5 FINITE DIFFERENCE METHOD (FDM)

LIMITATIONS OF EULER S METHOD FOR NUMERICAL INTEGRATION

(4.2) -Richardson Extrapolation

Initial value problems for ordinary differential equations

Continuity. Example 1

2.1 NUMERICAL SOLUTION OF SIMULTANEOUS FIRST ORDER ORDINARY DIFFERENTIAL EQUATIONS. differential equations with the initial values y(x 0. ; l.

Runge-Kutta methods. With orders of Taylor methods yet without derivatives of f (t, y(t))

Applied Math for Engineers

Multistep Methods for IVPs. t 0 < t < T

Analytic Functions. Differentiable Functions of a Complex Variable

Key Concepts. Important Techniques. 1. Average rate of change slope of a secant line. You will need two points ( a, the formula: to find value

Quaternion Dynamics, Part 1 Functions, Derivatives, and Integrals. Gary D. Simpson. rev 01 Aug 08, 2016.

Practice Problem Solutions: Exam 1

Math 212-Lecture 9. For a single-variable function z = f(x), the derivative is f (x) = lim h 0

M.SC. PHYSICS - II YEAR

DEFINITION OF A DERIVATIVE

Mathematics 5 Worksheet 11 Geometry, Tangency, and the Derivative

Solution of First Order Initial Value Problem by Sixth Order Predictor Corrector Method

LIMITS AND DERIVATIVES CONDITIONS FOR THE EXISTENCE OF A LIMIT

ETNA Kent State University

4. The slope of the line 2x 7y = 8 is (a) 2/7 (b) 7/2 (c) 2 (d) 2/7 (e) None of these.

Module 4 Linear Boundary value problems

University Mathematics 2

1.72, Groundwater Hydrology Prof. Charles Harvey Lecture Packet #9: Numerical Modeling of Groundwater Flow

4.2 - Richardson Extrapolation

Chapter 1D - Rational Expressions

Simpson s 1/3 Rule Simpson s 1/3 rule assumes 3 equispaced data/interpolation/integration points

MATH1131/1141 Calculus Test S1 v8a

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.

9.6 Predictor-Corrector Methods

NUMERICAL DIFFERENTIATION. James T. Smith San Francisco State University. In calculus classes, you compute derivatives algebraically: for example,

Logarithmic functions

Implicit-explicit variational integration of highly oscillatory problems

Copyright c 2008 Kevin Long

MA6452 STATISTICS AND NUMERICAL METHODS UNIT IV NUMERICAL DIFFERENTIATION AND INTEGRATION

Combining functions: algebraic methods

1 Error Analysis for Solving IVP

Math Spring 2013 Solutions to Assignment # 3 Completion Date: Wednesday May 15, (1/z) 2 (1/z 1) 2 = lim

SECTION 3.2: DERIVATIVE FUNCTIONS and DIFFERENTIABILITY

Department of Mathematics, K.T.H.M. College, Nashik F.Y.B.Sc. Calculus Practical (Academic Year )

Math 242: Principles of Analysis Fall 2016 Homework 7 Part B Solutions

Transcription:

Numerical Analysis by Dr. Anita Pal Assistant Professor Department of Matematics National Institute of Tecnology Durgapur Durgapur-7109 email: anita.buie@gmail.com 1

. Capter 8 Numerical Solution of Ordinary Differential Equations Module No. Predictor-Corrector Metods

...................................................................................... A metod is called single step, if only one value of te dependent variable, say y i, is required to compute te next value, i.e. y i+1. Taylor s series, Picard, Euler s, Runge- Kutta are te examples of te single-step metod. On te oter and, a metod is called multistep if it needs more tan one values of te dependent variable to compute te next value. In k-step metod, te values of y i k 1, y i k,..., y i 1 and y i are needed to compute y i+1. To solve an ordinary differential equation, a special type of metod is used known as predictor-corrector metod. Tis metod as two formulae. Te first formula determines an approximate value of y and it is known as predictor formula. Te second formula, known as corrector formula, improves te value of y obtained by predictor formula. Te commonly used predictor-corrector metods are Adams-Basfort-Moulton, Milne-Simpson, etc. Tese two metods are discussed in tis module..1 Adams-Basfort-Moulton metods Let us consider a differential equation dy dx = f(x, y) wit initial conditions x = x 0, y(x 0 ) = y 0. (.1) Tis problem is to be solved by Adams-Basfort-Moulton metod. It is a fourtstep predictor-corrector metod. So, to compute te value of y i+1, four values y i, y i, y i 1 and y i are required. Tese values are called starting values. To find tese values, generally, any single step metod suc as Euler, Runge-Kutta, etc., are used. Now, we integrate te differential equation (.1) between x i and x i+1 and obtain te following equation xi+1 y i+1 = y i + f(x, y) dx. (.) x i Te second term of te above equation can not be determined as y is an unknown dependent variable. To find tis integration, te function f(x, y) is approximated by Newton s backward interpolation formula, i.e. by te following expression f = f i + v f i + v(v + 1) f i +! v(v + 1)(v + ) f i! 1

................................................. Predictor-Corrector Metods were v = x x i and f i = f(x i, y i ). After simplification, it becomes Terefore, y i+1 = y i + f = f i + v f i + v + v 1 0 f i + v f i + v + v = y i + f i + 1 f i + 5 1 f i + 8 f i f i + v + v + v f i. f i + v + v ] + v f i dv = y i + 4 ( 9f i + 7f i 59f i 1 + 55f i ). (.) Tis formula is known as Adams-Basfort predictor formula and it is denoted by y p i+1. Tus, y p i+1 = y i + 4 9f(x i, y i ) + 7f(x i, y i ) 59f(x i 1, y i 1 ) + 55f(x i, y i )].(.4) Te same tecnique is used to find corrector formula. To find te corrector formula, te function f(x, y) is approximated by te following Newton s backward interpolation polynomial. f(x, y)=f i+1 +v f i+1 + v(v+1)! f i+1 + v(v+1)(v+)! f i+1, were v = x x i+1. Using tis approximation, te equation (.) becomes 0 y i+1 = y i + f i+1 + v f i+1 + v + v f i+1 + v + v ] + v f i+1 dv 1 since, x = x n + v, dx = dv] = y i + f i+1 1 f i+1 11 f i+1 14 ] f i+1 = y i + 4 f i 5f i 1 + 19f i + 9f i+1 ]. (.5) Tis is known as Adams-Moulton corrector formula. Te corrector value is denoted by y c i+1. Tus yi+1 c = y i + 4 f(x i, y i ) 5f(x i 1, y i 1 ) + 19f(x i, y i ) + 9f(x i+1, y p i+1 )]. (.)

...................................................................................... Te predicted value y p i+1 is computed from te equation (.4). Te formula (.) can be used repeatedly to get te value of y i+1 to te desired accuracy. Note tat te predictor formula is an explicit formula, wereas corrector formula is an implicit formula. Note.1 Te modified Euler s metod is a single step predictor-corrector metod. Example.1 Find te value of y(0.0) and y(0.5) from te differential equation y = xy + y sin x 1 wit y(0) = 1 taking step size = 0.05 using Adams-Basfort- Moulton predictor-corrector metod. Solution. Te Runge-Kutta metod is used to find te starting values at x = 0.05, 0.10, 0.15. Here f(x, y) = y y, = 0.05. Te values are sown below: i x i y i k 1 k k k 4 y i+1 0 0.00 1.000000-0.050000-0.0475-0.04750-0.0459 0.95419 1 0.05 0.95419-0.0459-0.0400-0.0401-0.040914 0.90977 0.10 0.90977-0.040914-0.0890-0.08890-0.097 0.8704 Tus te starting values are y 0 = y(0) = 1, y 1 = y(0.05) = 0.95419, y = y(0.10) = 0.90977, y = y(0.15) = 0.8704. Now, y p (0.0) = y p 4 = y + 4 9f(x 0, y 0 ) + 7f(x 1, y 1 ) 59f(x, y ) + 55f(x, y )] = 0.8704 + 0.05 4 9 1 + 7 ( 0.904778) 59 ( 0.8187) +55 ( 0.7949)] = 0.85. y c (0.0) = y c 4 = y + 4 f(x 1, y 1 ) 5f(x, y ) + 19f(x, y ) + 9f(x 4, y p 4 )] = 0.8704 + 0.05 4 ( 0.904778) 5 ( 0.8187) + 19 ( 0.7949)] +9 ( 0.978)] = 0.85. Tus, y 4 = y(0.0) = 0.85. Note tat te predicted and corrected values are equal up to five decimal places.

................................................. Predictor-Corrector Metods y p (0.5) = y p 5 = y 4 + 4 9f(x 1, y 1 ) + 7f(x, y ) 59f(x, y )+55f(x 4, y 4 )] = 0.85 + 0.05 4 9 ( 0.904778) + 7 ( 0.8187) 59 ( 0.7949) +55 ( 0.978)] = 0.80541. y c (0.5) = y c 5 = y 4 + 4 f(x, y ) 5f(x, y )+19f(x 4, y 4 )+9f(x 5, y p 5 )] = 0.85 + 0.05 4 ( 0.8187) 5 ( 0.7949)+19 ( 0.978) +9 ( 0.5991)] = 0.809. y c (0.5) = y c 5 = y 4 + 4 f(x, y ) 5f(x, y )+19f(x 4, y 4 )+9f(x 5, y c 5 )] = 0.85 + 0.05 4 ( 0.8187) 5 ( 0.7949)+19 ( 0.978) +9 ( 0.0041)] = 0.807. Hence, y(0.5) = 0.807 correct upto four decimal places. Error in Adams-Basfort-Moulton metod Te local truncation error for predictor formula is 1 and for te corrector formula it is is 0 1 0 v(v + 1)(v + )(v + ) 4 f i dv 51 4! 70 yv (ξ 1 ) 5 v(v + 1)(v + )(v + ) 4 f i+1 dv 19 4! 70 yv (ξ ) 5. Wen is small ten te local truncation error for Adams-Basfort-Moulton metod 19 70 (yc i+1 y p i+1 ). (.7) Anoter useful predictor-corrector metod is due to Milne-Simpson, describe below.. Milne-Simpson metod Tis metod is also known as Milne s metod. Te Minle s metod is used to solve te following problem: 4 dy dx = f(x, y) wit initial condition y(x 0) = y 0. (.8)

...................................................................................... Now, we integrate te above differential equation between x i and x i+1 and find y i+1 = y i + xi+1 x i f(x, y) dx. (.9) To find te value of te above integral, te function f(x, y) is approximated by Newton s forward difference interpolation polynomial as f(x, y) = f i + u f i + u(u 1) f i +! u(u 1)(u ) f i, (.10)! were u = x x i. Using tis approximation, te equation (.9) reduces to 4 y i+1 = y i + f i + u f i + u u f i + u u ] + u f i du 0 = y i + 4f i + 8 f i + 0 f i + 8 ] f i = y i + 4 f i f i 1 + f i ]. Tus te predictor formula due to Milne is y p i+1 = y i + 4 f(x i, y i ) f(x i 1, y i 1 ) + f(x i, y i )]. (.11) Te corrector formula is derived in te same way. Again, we integrate te given differential equation between x i 1 and x i+1 and te function f(x, y) is approximated by te Newton s forward interpolation polynomial Ten, f(x, y) = f i 1 + u f i 1 + xi+1 y i+1 = y i 1 + x i 1 f i 1 + u f i 1 + = y i 1 + f i 1 + u f i 1 + u u 0 = y i 1 + f i 1 + f i 1 + 1 ] f i 1 u(u 1) f i 1. (.1) ] u(u 1) f i 1 dx ] f i 1 du = y i 1 + f(x i 1, y i 1 ) + 4f(x i, y i ) + f(x i+1, y i+1 )]. 5

................................................. Predictor-Corrector Metods Tis formula is known as corrector formula and it is denoted by y c i+1. Terefore, yi+1 c = y i 1 + f(x i 1, y i 1 ) + 4f(x i, y i ) + f(x i+1, y p i+1 )]. (.1) Te predicted value y p i+1 is computed from te equation (.11) and tis value is corrected by te formula (.1). If te value of y p i+1 yc i+1 is not sufficiently small, ten use te corrector formula again to update te value of yi+1 c. In tis case, yp i+1 is to be replaced by yi+1 c in te corrector formula. Example. Find te value of y(0.0) for te initial value problem dy = xy + y wit y(0) = 1 dx using Milne s predictor-corrector metod, taking = 0.05. Solution. Let f(x, y) = xy + y, x 0 = 0, y 0 = 1, = 0.05. y. Fourt-order Runge-Kutta metod is used to compute te starting values y 1, y and i x i y i k 1 k k k 4 y i+1 0 0.00 1.000000 0.100000 0.101 0.10 0.1140 1.1055 1 0.05 1.1055 0.114 0.1089 0.110 0.18900 1.755 0.10 1.755 0.18890 0.177 0.17717 0.1474 1.510 Terefore, y 1 = y(0.05) = 1.1055, y = y(0.10) = 1.755, y = y(0.15) = 1.510. Te predictor value y p 4 = y 0 + 4 f(x 1, y 1 ) f(x, y ) + f(x, y )] = 1 + 4 0.05 f(0.05, 1.1055) f(0.10, 1.755) + f(0.15, 1.510)] = 1 + 4 0.05.844.57780 +.9500] = 1.5194.

...................................................................................... Te corrector value is y4 c = y + f(x, y ) + 4f(x, y ) + f(x 4, y p 4 )] = 1.755 + 0.05.57780 + 4.9500 +.487] = 1.519. Again, te corrector value y c 4 is calculated by using te formula y4 c = y + f(x, y ) + 4f(x, y ) + f(x 4, y4)] c = 1.755 + 0.05.57780 + 4.9500 +.481] = 1.519. Since tese two values are same, te required solution is y 4 = y(0.0) = 1.519 correct up to five decimal places. Error in Milne-Simpson metod Te local truncation error for predictor and corrector formulae are respectively. 8 90 yv (c i+1 ) 5 = O( 5 ) and 1 90 yv (d i+1 ) 5 = O( 5 ) Note. Te predictor-corrector metods are widely used to solve te differential equation of te form (.8). Tese metods give more accurate result tan te metods discussed earlier. In tese metods, te value of y can be corrected by using corrector formula repeatedly. But, tese metods need starting values y 1, y, y to obtain y 4. Tese values may be obtained from any single-step metod, suc as Taylor s series, Euler s, Runge-Kutta or any similar metod. So, tese metods need lot of function calculations. 7