1 chapter 6 numerical methods for ordinary differential equations

Post on 23-Dec-2015

235 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Chapter 6Numerical Methods for Ordinary

Differential Equations

2

6.1 The Initial Value Problem: Background

3

Example 6.1

4

Example 6.2

5

Example 6.3

6

Example 6.4

7

Methods

To solve differential equation problem:– If f is “smooth enough”, then

a solution will exist and be unique we will be able to approximate it accurately with a wide varie

ty of method

– Two ways of expressing “smooth enough” Lipschitz continuity Smooth and uniformly monotone decreasing

8

Definitions 6.1 and 6.2

9

Example 6.5

10

Example 6.5 (con.)

11

Theorem 6.1

Proof: See Goldstine’s book

12

6.2 Euler’s Method

We have treated Euler’s method in Chapter 2. There are two main derivations about Euler’s

method– Geometric derivation– Analytic derivation

13

Geometric Derivation

14

15

Analytic Derivation

16

Error Estimation for Euler’s Method

By the analytic derivation, we have

The residual for Euler’s method:

The truncation error:

17

Example 6.6

18

19

6.3 Analysis of Euler’s Method

Proof: pp. 323-324 (You can study it by yourselves.)

O(h)

20

Theorem 6.4

Proof: pp. 324-325 (You can study it by yourselves.)

mC

kCC

yChytyCyty

h

tTTtCy

yf

VersionIIMethodsEulerforEstimateError

TtkkTtk

2

1

and , as 01, where

")()(max

small,ly sufficient for Then

. somefor ]),([ solution that theassume

and , in decreasing monotoneuniformly and smooth be Let

) , ' ( 6.4 Theorem

00

],[,000

002

0

O(h)

21

Discussion

Both error theorems show that Euler’s method is only first-order accurate (O(h)).– If f is only Lipschitz continuous, then the constants m

ultiplying the initial error and the mash parameter can be quite large, rapidly growing.

– If f is smooth and uniformly monotone decreasing in y, then the constants in the error estimate are bounded for all n.

22

Discussion

How is the initial error affected by f ?– If f is monotone decreasing in y, then the effect of the

initial error decreases rapidly as the computation progresses.

– If f is only Lipschitz continuous, then any initial error that is made could be amplified to something exponentially large.

23

6.4 Variants of Euler’s Method

Euler’s method is not the only or even the best scheme for approximating solutions to initial value problems.

Several ideas can be considered based on some simple extensions of one derivation of Euler’s method.

24

Variants of Euler’s Method

We start with the differential equation

And replace the derivative with the simple difference quotient derived in (2.1)

What happens if we use other approximations to the derivative?

25

Variants of Euler’s Method

If we use

then we get the backward Euler method

If we use

then we get the midpoint method

O(h)

O(h2)

Method 1

Method 2

26

Variants of Euler’s Method

If we use the methods based on interpolation (Section 4.5)

then we get two numerical methods

O(h2)

O(h2)

Method 4

Method 3

27

Variants of Euler’s Method

By integrating the differential equation:

(6.23)

and apply the trapezoid rule to (6.23) to get

Thus

(6.25)Method 5

O(h3)

28

Variants of Euler’s Method

We can use a midpoint rule approximation to integrating (6.23)

and get

O(h3)

Method 6

29

Discussion

What about these method? Are any of them any good?

Observations– Methods 2, 3, and 4 are all based on derivative appro

ximations that are O(h2), thus they are more accurate than Euler method and method 1 (O(h)).

– Similarly, methods 5 and 6 are also more accurate.– Methods 2, 3, and 4 are not single-step methods, but

multistep methods. They depend on information form more than one previous approximate value of the unknown function.

30

Discussion

Observations (con.)– Concerning methods 1, 4, and 5, all of these

formulas involve we cannot explicitly solve for the new approximate values Thus these methods are called implicit methods.

– Methods 2 and 3 are called explicit methods.

31

6.4.1 The Residual and Truncation Error

32

Definition 6.3

33

Example 6.7

34

Example 6.8

35

Definition 6.4

36

6.4.2 Implicit Methods and Predictor-Corrector Schemes

How to get the value of yn+1? Using Newton’s method or the secant method or a fixed point iteration.

Let y = yn+1

37

F(y)

F’(y)

F(y)

h

F(y+h)-F(y)

38

Predictor-corrector idea

Can we use a much cruder (coarse) means of estimating yn+1?

39

Example 6.11

40

Example 6.12

41

42

Discussion

Generally speaking, unless the differential equation is very sensitive to changes in the data, a simple predictor-corrector method will be just as good as the more time-consuming process of solving for the exact values of yn+1 that satisfies the implicit recursion.

43

Discussion

If the differential equation is linear, we can entirely avoid the problem of implicitness.

Write the general linear ODE as

44

6.4.3 Starting Values and Multistep Method

How to find the starting values?

45

Example 6.15 (con.)

46

Example 6.15 (con.)

47

48

6.4.4 The Midpoint Method and Weak Stability

49

50

51

Discussion

What is going on here?– It is the weakly stability problem.– The problem is not caused by rounding error. – The problem is inherent in the midpoint method and

would occur in exact arithmetic.– Why? (pp. 340-342)

52

6.5 Single-step Method: Runge-Kutta

The Runge-Kutta family of methods is one of the most popular families of accurate solvers for initial value problems.

53

Consider the more general method:

Residual

54

55

Rewrite the formula of R, we get

56

Solution 1

Solution 2

57

Solution 3

58

Runge-Kutta Method

59

Example 6.16

60

Example 6.16 (con.)

61

One major drawback of the Runge-Kutta methods is that they require more evaluations of the function f than other methods.

62

6.6 Multistep Methods

6.6.1 The Adams families Adams families include the following most popular

ones:– Explicit methods: Adams-Bashforth families– Implicit methods: Adams-Moulton families

63

Adams-Bashforth Methods

64

65

Discussion

If we assume a uniform grid with mash spacing h, then the formulas for the and simplify substantially, and they are routinely tabulated:

66

Example 6.17

Table 6.6

67

Example 6.17 (con.)

Table 6.6

68

Adams-Moulton Methods

If k = -1 then tn-k= tn+1

If k = -1 then tn-k= tn+1

69

Example 6.18

70

71

6.6.2 The BDF Family

BDF: backward difference formula

72

The BDF Method (con.)

K = -1

73

The BDF Method (con.)

74

6.7 Stability Issues

75

Definition 6.6

76

Discussion

77

Example 6.19

top related