Download presentation
Presentation is loading. Please wait.
Published byClaire Barrett Modified over 9 years ago
1
1 Chapter 6 Numerical Methods for Ordinary Differential Equations
2
2 6.1 The Initial Value Problem: Background
3
3 Example 6.1
4
4 Example 6.2
5
5 Example 6.3
6
6 Example 6.4
7
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 variety of method – Two ways of expressing “smooth enough” Lipschitz continuity Smooth and uniformly monotone decreasing
8
8 Definitions 6.1 and 6.2
9
9 Example 6.5
10
10 Example 6.5 (con.)
11
11 Theorem 6.1 Proof: See Goldstine’s book
12
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
13 Geometric Derivation
14
14
15
15 Analytic Derivation
16
16 Error Estimation for Euler’s Method By the analytic derivation, we have The residual for Euler’s method: The truncation error:
17
17 Example 6.6
18
18
19
19 6.3 Analysis of Euler’s Method Proof: pp. 323-324 (You can study it by yourselves.) O(h)O(h)
20
20 Theorem 6.4 Proof: pp. 324-325 (You can study it by yourselves.) O(h)O(h)
21
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 multiplying 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
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
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
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
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(h) O(h2)O(h2) Method 1 Method 2
26
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) O(h2)O(h2) Method 4 Method 3
27
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)O(h3)
28
28 Variants of Euler’s Method We can use a midpoint rule approximation to integrating (6.23) and get O(h3)O(h3) Method 6
29
29 Discussion What about these method? Are any of them any good? Observations – Methods 2, 3, and 4 are all based on derivative approximations that are O ( h 2 ), 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
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
31 6.4.1 The Residual and Truncation Error
32
32 Definition 6.3
33
33 Example 6.7
34
34 Example 6.8
35
35 Definition 6.4
36
36 6.4.2 Implicit Methods and Predictor- Corrector Schemes How to get the value of y n+1 ? Using Newton’s method or the secant method or a fixed point iteration. Let y = y n +1
37
37 F(y)F(y) F’(y ) F(y)F(y) h F(y+h)-F(y)
38
38 Predictor-corrector idea Can we use a much cruder (coarse) means of estimating y n +1 ?
39
39 Example 6.11
40
40 Example 6.12
41
41
42
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 y n +1 that satisfies the implicit recursion.
43
43 Discussion If the differential equation is linear, we can entirely avoid the problem of implicitness. Write the general linear ODE as
44
44 6.4.3 Starting Values and Multistep Method How to find the starting values?
45
45 Example 6.15 (con.)
46
46 Example 6.15 (con.)
47
47
48
48 6.4.4 The Midpoint Method and Weak Stability
49
49
50
50
51
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
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
53 Consider the more general method: Residual
54
54
55
55 Rewrite the formula of R, we get
56
56 Solution 1 Solution 2
57
57 Solution 3
58
58 Runge-Kutta Method
59
59 Example 6.16
60
60 Example 6.16 (con.)
61
61 One major drawback of the Runge-Kutta methods is that they require more evaluations of the function f than other methods.
62
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
63 Adams-Bashforth Methods
64
64
65
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
66 Example 6.17 Table 6.6
67
67 Example 6.17 (con.) Table 6.6
68
68 Adams-Moulton Methods If k = -1 then t n-k = t n +1
69
69 Example 6.18
70
70
71
71 6.6.2 The BDF Family BDF: backward difference formula
72
72 The BDF Method (con.) K = -1
73
73 The BDF Method (con.)
74
74 6.7 Stability Issues
75
75 Definition 6.6
76
76 Discussion
77
77 Example 6.19
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.