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

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

Numerical Differentiation

The Verlet Algorithm for Molecular Dynamics Simulations

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

The Derivative as a Function

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

232 Calculus and Structures

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

Practice Problem Solutions: Exam 1

Section 2.1 The Definition of the Derivative. We are interested in finding the slope of the tangent line at a specific point.

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

Section 15.6 Directional Derivatives and the Gradient Vector

158 Calculus and Structures

NUMERICAL DIFFERENTIATION

The total error in numerical differentiation

2.8 The Derivative as a Function

Section 3.1: Derivatives of Polynomials and Exponential Functions

Chapter 1 Functions and Graphs. Section 1.5 = = = 4. Check Point Exercises The slope of the line y = 3x+ 1 is 3.

LECTURE 14 NUMERICAL INTEGRATION. Find

Investigating Euler s Method and Differential Equations to Approximate π. Lindsay Crowl August 2, 2001

Higher Derivatives. Differentiable Functions

MATH1151 Calculus Test S1 v2a

Lab 6 Derivatives and Mutant Bacteria

(4.2) -Richardson Extrapolation

Poisson Equation in Sobolev Spaces

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

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.

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

THE IDEA OF DIFFERENTIABILITY FOR FUNCTIONS OF SEVERAL VARIABLES Math 225

Test 2 Review. 1. Find the determinant of the matrix below using (a) cofactor expansion and (b) row reduction. A = 3 2 =

Section 2.7 Derivatives and Rates of Change Part II Section 2.8 The Derivative as a Function. at the point a, to be. = at time t = a is

Math 102 TEST CHAPTERS 3 & 4 Solutions & Comments Fall 2006

MAT244 - Ordinary Di erential Equations - Summer 2016 Assignment 2 Due: July 20, 2016

Lesson 6: The Derivative

Polynomial Functions. Linear Functions. Precalculus: Linear and Quadratic Functions

LIMITATIONS OF EULER S METHOD FOR NUMERICAL INTEGRATION

Copyright c 2008 Kevin Long

The derivative function

1 1. Rationalize the denominator and fully simplify the radical expression 3 3. Solution: = 1 = 3 3 = 2

Recall from our discussion of continuity in lecture a function is continuous at a point x = a if and only if

REVIEW LAB ANSWER KEY

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

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

4.2 - Richardson Extrapolation

Continuity. Example 1

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

MTH-112 Quiz 1 Name: # :

1 2 x Solution. The function f x is only defined when x 0, so we will assume that x 0 for the remainder of the solution. f x. f x h f x.

Pre-Calculus Review Preemptive Strike

Differential Calculus (The basics) Prepared by Mr. C. Hull

1. State whether the function is an exponential growth or exponential decay, and describe its end behaviour using limits.

2.3 Product and Quotient Rules

Lesson 4 - Limits & Instantaneous Rates of Change

SKP Engineering College

Exercises for numerical differentiation. Øyvind Ryan

INTRODUCTION AND MATHEMATICAL CONCEPTS

Derivation Of The Schwarzschild Radius Without General Relativity

The Priestley-Chao Estimator

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

ALGEBRA AND TRIGONOMETRY REVIEW by Dr TEBOU, FIU. A. Fundamental identities Throughout this section, a and b denotes arbitrary real numbers.

Name: Answer Key No calculators. Show your work! 1. (21 points) All answers should either be,, a (finite) real number, or DNE ( does not exist ).

Differential equations. Differential equations

Calculus I Practice Exam 1A

Chapter 2. Limits and Continuity 16( ) 16( 9) = = 001. Section 2.1 Rates of Change and Limits (pp ) Quick Review 2.1

= h. Geometrically this quantity represents the slope of the secant line connecting the points

Tangent Lines-1. Tangent Lines

Combining functions: algebraic methods

Math 31A Discussion Notes Week 4 October 20 and October 22, 2015

MATH CALCULUS I 2.1: Derivatives and Rates of Change

Exercises Copyright Houghton Mifflin Company. All rights reserved. EXERCISES {x 0 x < 6} 3. {x x 2} 2

Name: Sept 21, 2017 Page 1 of 1

Differential Equations

A Reconsideration of Matter Waves

lecture 35: Linear Multistep Mehods: Truncation Error

The algebra of functions Section 2.2

SECTION 3.2: DERIVATIVE FUNCTIONS and DIFFERENTIABILITY

SFU UBC UNBC Uvic Calculus Challenge Examination June 5, 2008, 12:00 15:00

MA119-A Applied Calculus for Business Fall Homework 4 Solutions Due 9/29/ :30AM

Finding and Using Derivative The shortcuts

lecture 26: Richardson extrapolation

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.

Click here to see an animation of the derivative

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

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

Some Review Problems for First Midterm Mathematics 1300, Calculus 1

= 0 and states ''hence there is a stationary point'' All aspects of the proof dx must be correct (c)

Sample Problems for Exam II

1. Consider the trigonometric function f(t) whose graph is shown below. Write down a possible formula for f(t).

Gradient Descent etc.

Precalculus Test 2 Practice Questions Page 1. Note: You can expect other types of questions on the test than the ones presented here!

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.

MATH1131/1141 Calculus Test S1 v8a

MATH 155A FALL 13 PRACTICE MIDTERM 1 SOLUTIONS. needs to be non-zero, thus x 1. Also 1 +

Chapter 4: Numerical Methods for Common Mathematical Problems

The Derivative The rate of change

These errors are made from replacing an infinite process by finite one.

MTH 119 Pre Calculus I Essex County College Division of Mathematics Sample Review Questions 1 Created April 17, 2007

Mathematics 5 Worksheet 11 Geometry, Tangency, and the Derivative

Applied Linear Statistical Models. Simultaneous Inference Topics. Simultaneous Estimation of β 0 and β 1 Issues. Simultaneous Inference. Dr.

Transcription:

Numerical Analysis MTH60 PREDICTOR CORRECTOR METHOD Te metods presented so far are called single-step metods, were we ave seen tat te computation of y at t n+ tat is y n+ requires te knowledge of y n only. In predictor-corrector metods wic we will discuss now, is also known as multi-step metods. To compute te value of y at t n+, we must know te solution y at t n, t n-, t n-2, etc. Tus, a predictor formula is used to predict te value of y at t n+ and ten a corrector formula is used to improve te value of y n+. Let us consider an IVP dy f (, t y), y( tn) yn dt = = Using simple Euler s and modified Euler s metod, we can write down a simple predictor-corrector pair (P C) as (0) P: yn+ = yn + f( tn, y ) n ( (0) C: yn+ = yn + f( tn, yn) + f( tn+, yn+ 2 Here, y n+ ( is te first corrected value of yn+. Te corrector formula may be used iteratively as defined below: ( r) ( r yn+ = yn + f( tn, yn) + f( tn+, yn+ ), r =,2, 2 Te iteration is terminated wen two successive iterates agree to te desired accuracy In tis pair, to extrapolate te value of y, we ave approximated te solution curve in n+ te interval (t n, t n+ ) by a straigt line passing troug (t n, y n ) and (t n+, y n+ ). Te accuracy of te predictor formula can be improved by considering a quadratic curve troug te equally spaced points (t n-, y n- ), (t n, y n ), (t n+, y n+ ) Suppose we fit a quadratic curve of te form y = a+ b( t tn + c( t tn)( t tn were a, b, c are constants to be determined As te curve passes troug (t, y ) and (t, y ) and satisfies n- n- n n dy = f ( tn, yn) dt ( tn, yn) We obtain yn = a, yn = a+ b= yn + b Terefore yn yn b = and Copyrigt Virtual University of Pakistan

Numerical Analysis MTH60 dy = f( tn, yn) = { b+ c[( t tn ) + ( t tn)]} ( t n, y n ) dt ( tn, yn) Wic give f ( tn, yn) = b+ c( tn tn = b+ c f( tn, yn) ( yn yn or c = 2 Substituting tese values of a, b and c into te quadratic equation, we get yn+ = yn + 2( yn yn + 2[ f( tn, yn) ( yn yn ] Tat is yn+ = yn + 2 f( tn, yn) Tus, instead of considering te P-C pair, we may consider te P-C pair given by P: yn+ = yn + 2 f( tn, yn) C: yn+ = yn + [ f( tn, yn) + f( tn+, yn+ ] 2 Te essential difference between tem is, te one given above is more accurate However, tis one can not be used to predict y for a given IVP, because its use n+ require te knowledge of past two points. In suc a situation, a R-K metod is generally used to start te predictor metod. Milne s Metod It is also a multi-step metod were we assume tat te solution to te given IVP is known at te past four equally spaced point t 0, t, t 2 and t. To derive Milne s predictor-corrector pair, let us consider a typical IVP dy f (, t y), y( t0) y0 dt = = On integration between te limits t and t, we get 0 t dy t dt = f (, t y ) dt t0 dt t0 t y y f (, t y ) dt 0 = t0 But we know from Newton s forward difference formula ss ( 2 ss ( ( s 2) f(, t y) = f0 + s f0 + f0 + f0 + 2 6 t t0 were s=, t = t0 + s t ss ( 2 ss ( ( s 2) y = y0 + t f0 + s f0 + f0 + f0 0 2 6 ss ( ( s 2)( s ) + f0 + dt 2 Now, by canging te variable of integration (from t to s), te limits of integration also canges (from 0 to ), and tus te above expression becomes Copyrigt Virtual University of Pakistan 2

Numerical Analysis MTH60 ss ( 2 ss ( ( s 2) y = y0 + 0 0 0 0 0 f + s f + f + f 2 6 ss ( ( s 2)( s ) + f0 + ds 2 wic simplifies to 20 2 8 28 y y0 = + f0 + 8 f0 + f0 + f0 + f0 90 Substituting te differences 2 f0 = f f0, f0 = f2 2 f+ f0, It can be furter simplified to 28 y = y0 + (2 f f2 + 2 f) + f0 90 Alternatively, it can also be written as 28 y = y0 + (2y y 2 + 2 y ) + y 0 90 Tis is known as Milne s predictor formula. Similarly, integrating te original over te interval t to t or s = 0 to 2 and repeating te 0 2 above steps, we get y2 = y0 + ( y 0 + y + y 2) y 0 90 wic is known as Milne s corrector formula. In general, Milne s predictor-corrector pair can be written as P: yn+ = yn + (2y n 2 y n + 2 y n) C: yn+ = yn + ( y n + y n + y n+ From tese equations, we observe tat te magnitude of te truncation error in / corrector formula is /90 y 0 wile te truncation error in predictor formula is / 28/ 90 y 0 Tus: TE in, c-formula is less tan te TE in p-formula. In order to apply tis P C metod to solve numerically any initial value problem, we first predict te value of y by means of predictor formula, were derivatives are n+ computed using te given differential equation itself. Using te predicted value y, we calculate te derivative y from te given n+ n+ differential equation and ten we use te corrector formula of te pair to ave te corrected value of y Tis in turn may be used to obtain improved value of y by n+ n+ using corrector again. Tis in turn may be used to obtain improved value of y n+ by using te corrector again. Tis cycle is repeated until we acieve te required accuracy. Example Copyrigt Virtual University of Pakistan

Numerical Analysis MTH60 dy Find y (2.0) if y ( t ) is te solution of ( t y ) dt = 2 + y (0) = 2, y (0.5) = 2.66, y (.0) =.595 and y(.5) =.968 Use Milne s P-C metod. Solution Taking t = 0.0, t = 0.5, t =.0, t =.5 y, y, y and y, are given, we ave to 0 2 0 2 compute y, te solution of te given differential equation corresponding to t =2.0 Te Milne s P C pair is given as P: yn+ = yn + (2y n 2 y n + 2 y n) C: yn+ = yn + ( y n + y n + y n+ From te given differential equation, y = ( t+ y)/2 We ave t+ y 0.5 + 2.66 y = = =.5680 t2 + y2.0 +.595 y 2 = = = 2.2975 t + y.5 +.968 y = = =.20 Now, using predictor formula, we compute y = y0 + (2 y y 2 + 2 y ) (0.5) = 2 + [ 2(.5680) 2.2975 + 2(.20) ] = 6.870 Using tis predicted value, we sall compute te improved value of y from corrector formula y = y2 + ( y 2 + y + y ) Using te available predicted value y and te initial values, we compute t + y 2 + 6.6870 y = = =.55 t + y.5 +.968 y = = =.20 and y 2 = 2.2975 Tus, te first corrected value of y is given by Copyrigt Virtual University of Pakistan

Numerical Analysis MTH60 ( 0.5 y =.595 + [2.2975 + (.2) +.55] = 6.87667 Suppose, we apply te corrector formula again, ten we ave (2) ( y = y2 + ( 2 ( ) y + y + y 0.5 2 + 6.87667 =.595 + 2.2975 (.2) + + 2 = 6.8767 Finally, y (2.0) = y = 6.87. Example dy Tabulate te solution of = t+ y, y(0) = in te interval [0, 0.] wit = 0., dt using Milne s P-C metod. Solution Milne s P-C metod demand te solution at first four points t, t, t and t. As it is not a 0 2 self starting metod, we sall use R-K metod of fourt order to get te required solution and ten switc over to Milne s P C metod. Tus, taking t 0 = 0, t = 0., t 2 = 0.2, t = 0. we get te corresponding y values using R K metod of t order; tat is y =, y =.0, y =.228 and y =.997 0 2 (Reference Lecture 8) Now we compute y = t+ y = 0.+.0 =.20 y 2 = t2 + y2 = 0.2 +.228 =.28 y = t+ y = 0.+.997 =.6997 Using Milne s predictor formula P: y = y0 + (2y y 2 + 2 y ) (0.5) = + [ 2(.20).28 + 2(.6997 ] =.586 Before using corrector formula, we compute y ( ) = t + y predicted value = 0. +.586 =.986 Finally, using Milne s corrector formula, we compute Copyrigt Virtual University of Pakistan 5

Numerical Analysis MTH60 C: y = y2 + ( y + y + y 2) 0. =.228 + (.986 + 6.7988 +.28) =.586 Te required solution is: t 0 0. 0.2 0. 0. y.0.228.997.586 Example Using Milne s Predictor-Corrector Formula find f(0.) from Ordinary Differential Equation / y = x y ; y(0) = ; = 0. wit te elp of following table. X 0 0. 0.2 0. Y 0.9097 0.875 0.786 Solution: Here, x = 0, x = 0., x = 0.2, x = 0., x = 0. 0 2 y ' = x y = 0. 0.9097 = 0.8097 y ' = x y = 0.2 0.875 = 0.675 2 y ' = x y = 0. 0.786 = 0.86 Now, using Predictor Formula y = y0 + 2 y' y2' + 2 y' *0. y = + (-.95 y = 0.7065 ( ) Copyrigt Virtual University of Pakistan 6

Numerical Analysis MTH60 Using te predicted value, we sall now compute te corrected value as; y = y + y + y + y ( ' ' ') Now, y ' = x y = 0. 0.7065= -0.065 Putting te values,int o te Corrector Formula; y = y2 + ( y2' + y' + y' ) 0. y = 0.875+ 0.675+ * 0.86 0.065 y = 0.875-0.09688 ( ( )- ) y = 0.7068556 Ans. Copyrigt Virtual University of Pakistan 7

Numerical Analysis MTH60 Copyrigt Virtual University of Pakistan 8