Sunteți pe pagina 1din 25

Introduction

Multi-Step Methods
Summary

S TABILITY

Dr. Johnson

School of Mathematics

Semester 1 2008

Dr. Johnson MATH65241


Introduction
Multi-Step Methods
Summary

O UTLINE

1 I NTRODUCTION
What is stability?
Defining stability

2 M ULTI -S TEP M ETHODS


Characteristic Equation
Stability Root Condition
Examples

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

A N EXAMPLE PROBLEM :

Suppose the initial-value problem

y ′ = −50y , 0 ≤ x ≤ 1, y (0) = 1

is approximated by the Euler method so that

yi+1 = yi + hf (xi , yi ).

The exact solution to the problem is

y (x) = e−50x

This is a stiff problem.

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

T HE E XACT S OLUTION

1
y=e-50x

0.8

0.6
y(x)

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1
x

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

U NSTABLE S OLUTION

Now we generate the numerical solution with h = 0.05, we


have that
y0 = 1
y1 = 1 + (0.05) · (−50 · 1) = −1.5
y2 = −1.5 + (0.05) · (−50 · −1.5) = 2.25
and so on. . .
Here errors are growing, the method is unstable.

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

U NSTABLE SOLUTION

Now we take h = 0.04, then


y0 = 1
y1 = 1 + (0.04) · (−50 · 1) = −1
y2 = −1 + (0.04) · (−50 · −1) = 1
and so on. . .
Here the solution oscilates, and errors grow slowly. The
method is unstable.

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

S TABLE SOLUTION

Next take h = 1/30, then


y0 = 1
y1 = 1 + (1/30) · (−50 · 1) = −2/3
y2 = −2/3 + (1/30) · (−50 · −2/3) = 4/9
and so on. . .
Here the solution oscilates, but errors reduce slowly. The
method is in some sense stable.

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

U NSTABLE S OLUTIONS

y=e-50x
4 n=20
n=25
n=30

2
y(x)

-2

-4

0 0.2 0.4 0.6 0.8 1


x

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

S TABLE S OLUTIONS

A stable solution is one in which errors or pertubations are


damped down.
Think of the first case with h = 0.05:
The error from calculating y1 is amplified at y2 .
Given the exact value for y1 , the error at y2 would be much
smaller.
If we set h small enough the errors are bounded and the
method gives satisfactory results.

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

S OME S TABLE S OLUTIONS

1
y=e-50x
n=50
n=100
0.8

0.6
y(x)

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1
x

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

C ONSISTENCY

D EFINITION :
A one-step difference method with truncation error τi (h) at the
ith step is said to be consistent with the difference equation it
approximates if
lim max |τi (h)| = 0.
h→0 i

This is a local definition.


We compare the exact value to the difference
approximation given that we know the exact value at yi−1 .

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

C ONVERGENCE

D EFINITION :
A one-step difference method is said to be convergent with
respect to the difference equation it approximates if

lim max |wi − y (xi )| = 0,


h→0 i

where wi is the approximate value at xi to the exact value


yi = y (xi ).

This is a global definition.


Given that only y0 is exact, the errors at the ith position
tend to zero as we reduce the step size.

Dr. Johnson MATH65241


Introduction
What is stability?
Multi-Step Methods
Defining stability
Summary

S TABILITY

D EFINITION :
A stable method is one whose results depend continuously on
the initial data.

Consider a one step method in the form

wi+1 = wi + hφ(xi , yi , h),

such that φ is continuous and satisfies a Lipschitz


condition. Then the method is stable as defined above.
If the method is consistent, then it is convergent if and only
if it is stable.

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

G ENERAL MULTISTEP METHOD

The general m multistep method for approximating the solution


to the initial-value problem

y ′ = f (x, y ), a ≤ x ≤ b, y (a) = α

can be written as

w0 = α, w1 = α1 , . . . , wm−1 = αm−1 ,
wi+1 = am−1 wi + am−2 wi−1 + · · · + a0 wi+1−m
+hF (xi , h, wi , . . . , wi+1−m ),

This is very complicated to analyse, so we simplify things. . .

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

C HARACTERISTIC EQUATION

Consider the trivial initial-value problem

y ′ = 0, y (a) = α, where α 6= 0,

this has the solution y (x) = α.


In theory any multistep method will produce the result
wn = α.
The only errors will be due to roundoff.
This is the homogeneous equation, and is embedded in
the original problem.

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

C HARACTERISTIC EQUATION

Since f (x, y ) = 0, then in the multi-step method F (x, y ) = 0, so


we can write

wi+1 = am−1 wi + am−2 wi−1 + · · · + a0 wi+1−m (1)

and the corresponding characteristic equation of the method is


given by

λm − am−1 λm−1 − am−2 λm−2 − · · · − a1 λ − a0 = 0. (2)

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

C HARACTERISTIC EQUATION

Suppose λ is a root of the characteristic equation (2), then


wn = λn is a solution to (1).

wn+1 − am−1 wn − am−2 wn−1 − · · · + a0 wn+1−m = 0.


λn+1 − am−1 λn − am−2 λn−1 − · · · + a0 λn+1−m = 0.
λn+1−m [λm − am−1 λm−1 − am−2 λm−2 − · · · − a1 λ − a0 ] = 0
λn+1−m [0] = 0

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

ROOTS OF THE EQUATION

If λ1 , λ2 , . . . , λm are the distinct roots of the characteristic


equation (2), then we can show:

Every solution wn can be written as

X
m
wn = ci λni ,
i=1

for some unique collection of constants c1 , c2 , . . . , cm .

This is just a linear combination of the solutions λni .


Remember that all solutions should be equal to the exact
solution wn = α.

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

λ = 1 MUST BE A ROOT.

Since we have an exact solution y (x) = α, and therefore


wn = α, then subbing into (1) we get

α = am−1 α + am−2 α + · · · + a0 α

and after rearranging we obtain

α[1 − am−1 − am−2 − · · · − a1 − a0 ] = 0

which implies that λ = 1 is a root of (2).

Therfore set λ1 = 1 and c1 = α.

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

S OLUTION TO THE INITIAL VALUE PROBLEM

Every solution wn can be written as

X
m
wn = α + ci λni ,
i=2

for some unique collection of constants c2 , . . . , cm .

If calculations are exact, c2 , . . . , cm = 0


In practice c2 , . . . , cm 6= 0

ROUNDOFF ERRORS
Errors will grow exponentially unless |λi | ≤ 1 ∀i.

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

T HE ROOT CONDITION
Let λ1 , λ2 , . . . , λm be the distinct roots of the characteristic
equation
λm − am−1 λm−1 − am−2 λm−2 − · · · − a1 λ − a0 = 0
associated with the difference method
w0 = α, w1 = α1 , . . . , wm−1 = αm−1 ,
wi+1 = am−1 wi + am−2 wi−1 + · · · + a0 wi+1−m
+hF (xi , h, wi , . . . , wi+1−m ),
then
D EFINITION
If |λi | ≤ 1 for each i = 1, 2, . . . , m and all roots with value 1 are
simple root then the difference method is said to satisfy the root
condition.
Dr. Johnson MATH65241
Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

T HE ROOT CONDITION

D EFINITION
If the method satisfies the root condition and has λ1 = 1 as the
only root of magnitude 1 are called strongly stable.

D EFINITION
If the method satisfies the root condition with more than one
distinct root with magnitude one are called weakly stable.

D EFINITION
If the method does not satisfy the root condition then the
method is unstable.

Dr. Johnson MATH65241


Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

T HE A DAMS -BASHFORTH METHOD

wi+1 = wi + hF (xi , h, wi+1 , . . . , wi−3 )


where
1
F (xi , h, wi+1 , . . . , wi−3 ) = [55f (xi , wi ) − 59f (xi−1 , wi−1 )
24
+37f (xi−2 , wi−2 ) − 9f (xi−3 , yi−3 )]
so m = 4, a0 = a1 = a2 = 0, and a3 = 1.

The characteristic equation is:

λ4 − λ3 = λ3 (λ − 1) = 0

Roots are λ1 = 1 and λ2 = λ3 = λ4 = 0.


The method is strongly stable.
Dr. Johnson MATH65241
Introduction Characteristic Equation
Multi-Step Methods Stability Root Condition
Summary Examples

M ILNE ’ S METHOD

4h
wi+1 = wi−3 + [2f (xi , wi ) − f (xi−1 , wi−1 ) + 2f (xi−2 , wi−2 )]
3

The characteristic equation is:

λ4 − 1 = 0

Roots are λ1 = 1, λ2 = −1, λ3 = i, and λ4 = −i.


The method is weakly stable.

Dr. Johnson MATH65241


Introduction
Multi-Step Methods
Summary

S UMMARY

We investigate stability in the limit as h → 0, and show it is


contained in the characteristic equation for the difference
method.
In this sense, we can show all one-step methods are stable
and convergent if they are consistent.
For multistep methods, we define two states of stability,
strong and weak. Strongly stable schemes are the
preferred methods.
Even though the euler method is stable, we saw in the
introduction that for sufficiently large stepsize the method
becomes unstable. This leads to another definition of
stability in the next lecture. . .

Dr. Johnson MATH65241

S-ar putea să vă placă și