0% found this document useful (0 votes)
48 views28 pages

Materi Multi Step

This document discusses multi-step and predictor-corrector methods for numerically solving differential equations. Multi-step methods use information from several previous time steps to estimate the next value, while predictor-corrector methods use an explicit method like Adams-Bashforth to predict the next value and then an implicit method like Adams-Moulton to correct the predicted value. The document provides examples of applying 3-step Adams-Bashforth and Adams-Moulton methods within a predictor-corrector scheme to solve a sample differential equation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views28 pages

Materi Multi Step

This document discusses multi-step and predictor-corrector methods for numerically solving differential equations. Multi-step methods use information from several previous time steps to estimate the next value, while predictor-corrector methods use an explicit method like Adams-Bashforth to predict the next value and then an implicit method like Adams-Moulton to correct the predicted value. The document provides examples of applying 3-step Adams-Bashforth and Adams-Moulton methods within a predictor-corrector scheme to solve a sample differential equation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Numerical Diff.

Equation

Chapter 4
Multi-Step and
Predictor-Corrector
Methods

Math UB/2015-2016
Overview

• One-Step Methods – use only info from previous


step
– Euler
– Runge-Kutta
• Multistep Methods- use info from several prior
steps
– Adam Bashforth
– Adam Moulton Method
– Predictor-Corrector Method
Single Step Methods
• Single Step Methods:
– Euler and Runge-Kutta are single step methods.
– Estimates of yi+1 depends only on yi and xi.

xi-2 xi-1 xi xi+1

CISE301_Topic8L7 3
Multi-Step Methods
• 2-Step Methods
– In a two-step method, estimates of yi+1 depends
on yi, yi-1, xi, and xi-1

xi-2 xi-1 xi xi+1

4
Multi-Step Methods
• 3-Step Methods
– In an 3-step method, estimates of yi+1 depends on
yi ,yi-1 ,yi-2, xi , xi-1, and xi-2

xi-2 xi-1 xi xi+1

5
One-Step vs Multi-Step
Multi-Step Principle
• To solve dx
 f t, x 
dt
• We use an iteration scheme to find xi+1 in terms of
previous values of xi, xi-1, xi-2, etc, and/or values of
fi=f(ti, xi), fi-1, fi-2 , etc.
Multi-Step Principle
The method comes from integrating the derivative to
get x(t).
dx
 f t , x(t ) 
dt
dx  f t , x(t ) dt
t i1

 dx xi 1  xi   f t, x(t )dt


ti
t i 1
 xi 1  xi   f t, x(t )dt
ti
Multi-Step Example
• Midpoint rule:
t i 1
h
 f t , x(t ) dt   fi 1  fi 
ti
2

• Another weighted average rule:


t i 1
h
 f t , x(t ) dt  3 fi 1  fi 
ti
2
Multi-Step General Form
• The general form for a multi-step method is
xi 1  am1xi  am2 xi 1
   a0 xi 1m
 h[bm f (ti 1, xi 1 )  bm1 f (ti , xi )
   b0 f (ti 1m , xi 1m )]

• The parameters ak and bk are determined by


polynomial interpolation.
Multi-Step General Form

xi 1  am 1 xi  am  2 xi 1    a0 xi 1 m 
h[bm f (ti 1 , xi 1 )  bm 1 f (ti , xi )    b0 f (ti 1 m , xi 1 m )]

• If bm =0, the method is called explicit, as this


formula gives xi+1 explicitly in terms of
previously found values.
• If bm ≠0, the method is called implicit, as xi+1
appears on both sides of the equals sign.
Multi-Step Explicit Adams Method
• In this method we approximate the value of
t i 1

 f t , x ( t ) dt
ti
by interpolating f(t,x(t)) at the points
(ti, xi), (ti-1, xi-1), …, (ti+1-m , xi+1-m).

We then integrate this polynomial exactly to use in the


t i 1
formula for the next iterate:
xi 1  xi  f t , x(t ) dt

ti
Example: 3-Step Adams-Bashforth

Want a formula of the type:

xi 1  xi  h[b2 f (ti , xi )  b1 f (ti 1, xi 1)  b0 f (ti 2, xi 2 )]

We use the three previous values of (ti, xi) for a


Lagrange interpolating polynomial for f
Example: 3-Step Adams-Bashforth

2 2
p2 (t )   f (ti k , xi k ) * Lk (t )   f i k * Lk (t )
k 0 k 0
(t  ti 1 )(t  ti 2 )
L0 (t )  ,
(ti  ti 1 )(ti  ti 2 )
(t  ti )(t  ti 2 )
L1 (t )  ,
(ti 1  ti )(ti 1  ti 2 )
(t  ti )(t  ti 1 )
L2 (t ) 
(ti 2  ti )(ti 2  ti 1 )
Example: 3-Step Adams-Bashforth
Then, ti1 ti1

 f t, x(t)dt   p2 t dt


ti ti

After a change of variables: u=(ti+1 - t)/h we get


ti1 1

 f t, x(t)dt  h p2 ti 1  hudu


ti 0
1
 h fi L0 ti 1  hu  fi 1 L1ti 1  hu  fi  2 L2 ti 1  hudu

0
Example: 3-Step Adams-Bashforth
Then,
ti  1 1 1 
 f t , x(t )dt  h fi L0 ti 1  hudu  fi 1 L1ti 1  hudu  fi  2 L2 ti 1  hudu
  
 
ti-1  0 0 0 
1 1
(2  u )(3  u ) 23
Now,  L0 (ti 1  hu )du   1 2
du 
12
0 0

1 1
Likewise, 4 5
 L1 (ti 1  hu )du  
3
and  L2 (ti 1  hu )du 
12
0 0
Example: 3-Step Adams-Bashforth
So, we get,
ti
h
 f t , x(t )dt  23 fi  16 fi 1  5 fi  2 
12
ti-1
Thus,
h
xi1  xi  [23f (ti , xi ) 16f (ti1, xi1) 5f (ti2, xi2)]
12
Example: 4-Step Adams-Bashforth

h
xi 1  xi  [55 f i  59 f i 1  37 f i  2  9 f i  3 ]
24
Implicit Multi-Step Methods

• Implicit multi-step methods use the value of


xi+1 to find the value of xi+1.
• Of course, this is impossible if we do not know
xi+1, so in practice we use an explicit method to
approximate (predict) xi +1 and then use an
implicit method to improve (correct) the value
of xi+1.
• These methods again rely on polynomial
interpolation approximation of f(t,x(t))
Adams-Moulton Implicit Methods
Three-Point:
h
xi 1  xi  [5 f (ti 1, xi 1)  8 f (ti , xi )  f (ti 1, xi 1)]
12
Four Point:
h
xi 1  xi  [9 f i 1  19 f i  5 f i 1  f i  2 ]
24
Predictor-Corrector Methods

• The Predictor-Corrector technique uses an


explicit scheme (like the Adams-Bashforth
Method) to estimate the initial guess for xi+1
and then uses an implicit technique (like the
Adams-Moulton Method) to correct xi+1.
Predictor-Corrector Example
• Adams third order Predictor-Corrector scheme:
• Use the Adams-Bashforth three point explicit scheme
for the initial value.
h
x *i 1  xi  23 fi  16 fi 1  5 fi  2 
12
• Use the Adams-Moulton three-point implicit method
to correct.
xi 1  xi 
12
h
 
5 f (ti 1 , xi*1 )  8 f (ti , xi )  f (ti 1 , xi 1 )
Predictor-Corrector Example
• Consider Exact Solution
dx
 x  t2 x  2  2t  t 2  e t
dt

• Initial condition: x(0) = 1


• Step size: h = 0.1
• We will use the 3 Point Adams-Bashforth and 3 point
Adams-Moulton. Both require 3 points to get
started!
Predictor-Corrector Example
• From the 4th order Runge Kutta

f 0  f 0 ,1  1 . 0000
f 0 . 1  f 0 . 1,1 . 104829   1 .094829
f 0 .2  f 0 . 2 ,1 . 218597   1 . 178597
x 2  1 . 218597
Predictor-Corrector Example

• 3-point Adams-Bashforth Predictor Value:


0 .1
x3*  x2  23 (1 .178597 )  16 (1 .094829 )  5(1) 
12
 1 .218597  0 .121587  1 .340184
Predictor-Corrector Example
• To correct, we need f(t3 , x3*)
f  0 . 3 , 1 . 340184   1 . 250184
• 3-point Adams-Moulton Corrector Value:
0 .1
x3  x 2  51 .250184   81 .178597   11 .094829 
12
 1 .218597  0 .121541
 1 .340138
The values for the Predictor-Corrector Scheme
Three Point Predictor-Corrector Scheme
t x f A-B sum x* f* A-M sum
0 1 1
0.1 1.104829 1.094829
0.2 1.218597 1.178597 0.121587 1.340184 1.250184 0.121541
0.3 1.340138 1.250138 0.128081 1.468219 1.308219 0.12803
0.4 1.468168 1.308168 0.133155 1.601323 1.351323 0.133098
0.5 1.601266 1.351266 0.136659 1.737925 1.377925 0.136597
0.6 1.737863 1.377863 0.138429 1.876291 1.386291 0.138359
0.7 1.876222 1.386222 0.13828 2.014502 1.374502 0.138204
0.8 2.014425 1.374425 0.136013 2.150438 1.340438 0.135928
0.9 2.150353 1.340353 0.131404 2.281757 1.281757 0.13131
1 2.281663 1.281663 0.124206 2.405869 1.195869 0.124102
Predictor-Corrector Example
The predictor-corrector 3 Point Predictor-Corrector Method
method produces a
solution with nearly 4

the same accuracy as 2

the RK order 4 method. 0


0 1 2 3 4
-2

x Value
4th order Runge-Kutta
-4
Exact
Generally, the n-step -6
Adam Moulton

method will have -8 Adam Bashforth

truncation error of -10

order at least n. t Value

asuryanto.lecture.ub.ac.id

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy