The Computable Differential Equation Lecture ... - Bruce E. Shapiro

The Computable Differential Equation Lecture ... - Bruce E. Shapiro The Computable Differential Equation Lecture ... - Bruce E. Shapiro

bruce.shapiro.com
from bruce.shapiro.com More from this publisher
21.04.2015 Views

74 CHAPTER 4. IMPROVING ON EULER’S METHOD Definition 4.5. [ Local Truncation Error] Let u(t n ) be any function defined on a mesh, and define the difference operator N by N u(t n ) = u(t n) − u(t n−1 ) h n − φ(t n−1 , u(t n−1 )) (4.45) The Local Truncation Error d n is given by N y(t n ), where y(t n ) is the exact solution evaluated on the mesh: d n = N y(t n ) = y(t n) − y(t n−1 ) h n − φ(t n−1 , y(t n−1 )) (4.46) The local truncation error gives an estimate of the error in discretizing the differential equation at y n assuming that there are no errors at y n1 - the local error in the calculation of the derivative. For Euler’s Method, y n+1 = y n + h n f(t n , y n ) (4.47) we can derive the local truncation error using a Taylor Series approximation about y(t n−1 ), d n = N (t n ) = y(t n) − y(t n−1 ) h = y(t n−1) + hy ′ (t n−1 ) + 1 2 h2 y ′′ (t n−1 ) + · · · − y(t n−1 ) h Using the fact that y ′ (t n−1 ) = f(t n−1 , y(t n−1 ), − f(t n−1 , y(t n−1 )) (4.48) − f(t n−1 , y(t n−1 ) (4.49) d n = h 2 y′′ (t n−1 ) + O(h 2 ) (4.50) Thus the local truncation error for Euler’s method is proportional to h. We write this as d n = O(h), and say that Euler’s method is a first order method. Definition 4.6 (Convergence). A one step method is said to converge on an interval [a, b] if y n → y on [a, b] as n → ∞ for any IVP y ′ = f(t, y), y(t 0 ) = y 0 (4.51) with f(t, y) Lipshitz in y. A method is said to be convergent of order p if for some positive integer p the global error e n = |y(t n ) − y n | satisfies e n = |y(t n ) − y n | = O(h p ) (4.52) Definition 4.7 (Stabilty, Zero-Stability, 0-Stability). A one-step method is said to be stable if for each IVP (4.44) with f Lipshitz in y there exists K, h 0 > 0 such that the difference between two different mesh functions (not necessarily solutions, just functions that are defined on the mesh) y n and ŷ n satisfies [ ] |y n − ŷ n | ≤ K |y 0 − ŷ 0 | + ‖N y n − N ŷ n ‖ (4.53) for all h ∈ [0, h 0 ], where ‖ · ‖ denotes the sup-norm, ‖u n ‖ = max 1≤j≤n |u j| (4.54) Math 582B, Spring 2007 California State University Northridge c○2007, B.E.Shapiro Last revised: May 23, 2007

CHAPTER 4. IMPROVING ON EULER’S METHOD 75 Theorem 4.2. Euler’s method is zero-stable. Proof. ‖N u n − N u ∗ n‖ = ∥ u n − u ∗ n − u n−1 − u ∗ n−1 − ( f(u n−1 ) − f(u ∗ h h n−1) )∥ ∥ (4.55) ≥ ∥ u n − u ∗ n ∥ − ∥ u n−1 − u ∗ n−1 + ( f(u n−1 ) − f(u ∗ h h n−1) )∥ ∥ (4.56) By the triangle inequality and the Lipshitz condition ∥ u n − u ∗ n ∥ ≤ ‖N u n − N u ∗ h n‖ + ∥ u n−1 − u ∗ n−1 ∥ + K ∥ ∥u n−1 − u ∗ ∥ n−1 (4.57) ∥ h ∥u n − u ∗ ∥ n ≤ h‖N u n − N u ∗ n‖ + ∥ ∥u n−1 − u ∗ ∥ n−1 + hK ∥ ∥u n−1 − u ∗ ∥ n−1 (4.58) = h‖N u n − N u ∗ n‖ + (1 + hK) ∥ ∥u n−1 − u ∗ ∥ n−1 (4.59) Apply the result recursively n − 1 additional times to give ∥ ∥u n − u ∗ ∥ n ≤ h‖N u n − N u ∗ n‖ + (1 + hK) ∥ ∥u n−1 − u ∗ ∥ n−1 (4.60) ≤ h‖N u n − N u ∗ n‖+ (4.61) (1 + hk) [ h‖N u n − N u ∗ n‖ + (1 + hk) ∥ ∥u n−2 − u ∗ ∥ ] n−2 (4.62) ≤ . ≤ h‖N u n − N u ∗ n‖ n∑ (1 + hK) n−i + (1 + hk) n∥ ∥ u0 − u ∗ ∥ 0 (4.63) i=1 ∥∥ ≤ k{ u 0 − u ∗ } ∥ 0 + ‖N u n − N u ∗ n‖ (4.64) where { k = max h n∑ (1 + hK) n−i , (1 + hk) n} (4.65) i=1 Therefore the method is 0-stable. A zero-stable method depends continuously on the initial data. If a method is not zero stable that a small perturbation in the method could potentially lead to an infinite change in the results. Suppose that y n = y n + 1 + hφ(t n − 1, y n−1 , ...) (4.66) is a numerical method. Then we define a perturbation δ of the method as ỹ n = y n + 1 + hφ(t n − 1, y n−1 , ...) + δ n (4.67) The following theorem is normally taken as the definition of zero-stability. c○2007, B.E.Shapiro Last revised: May 23, 2007 Math 582B, Spring 2007 California State University Northridge

74 CHAPTER 4. IMPROVING ON EULER’S METHOD<br />

Definition 4.5. [ Local Truncation Error] Let u(t n ) be any function defined on<br />

a mesh, and define the difference operator N by<br />

N u(t n ) = u(t n) − u(t n−1 )<br />

h n<br />

− φ(t n−1 , u(t n−1 )) (4.45)<br />

<strong>The</strong> Local Truncation Error d n is given by N y(t n ), where y(t n ) is the exact<br />

solution evaluated on the mesh:<br />

d n = N y(t n ) = y(t n) − y(t n−1 )<br />

h n<br />

− φ(t n−1 , y(t n−1 )) (4.46)<br />

<strong>The</strong> local truncation error gives an estimate of the error in discretizing the<br />

differential equation at y n assuming that there are no errors at y n1 - the local error<br />

in the calculation of the derivative. For Euler’s Method,<br />

y n+1 = y n + h n f(t n , y n ) (4.47)<br />

we can derive the local truncation error using a Taylor Series approximation about<br />

y(t n−1 ),<br />

d n = N (t n ) = y(t n) − y(t n−1 )<br />

h<br />

= y(t n−1) + hy ′ (t n−1 ) + 1 2 h2 y ′′ (t n−1 ) + · · · − y(t n−1 )<br />

h<br />

Using the fact that y ′ (t n−1 ) = f(t n−1 , y(t n−1 ),<br />

− f(t n−1 , y(t n−1 )) (4.48)<br />

− f(t n−1 , y(t n−1 ) (4.49)<br />

d n = h 2 y′′ (t n−1 ) + O(h 2 ) (4.50)<br />

Thus the local truncation error for Euler’s method is proportional to h. We write<br />

this as d n = O(h), and say that Euler’s method is a first order method.<br />

Definition 4.6 (Convergence). A one step method is said to converge on an<br />

interval [a, b] if y n → y on [a, b] as n → ∞ for any IVP<br />

y ′ = f(t, y), y(t 0 ) = y 0 (4.51)<br />

with f(t, y) Lipshitz in y. A method is said to be convergent of order p if for<br />

some positive integer p the global error e n = |y(t n ) − y n | satisfies<br />

e n = |y(t n ) − y n | = O(h p ) (4.52)<br />

Definition 4.7 (Stabilty, Zero-Stability, 0-Stability). A one-step method is<br />

said to be stable if for each IVP (4.44) with f Lipshitz in y there exists K, h 0 > 0<br />

such that the difference between two different mesh functions (not necessarily solutions,<br />

just functions that are defined on the mesh) y n and ŷ n satisfies<br />

[<br />

]<br />

|y n − ŷ n | ≤ K |y 0 − ŷ 0 | + ‖N y n − N ŷ n ‖<br />

(4.53)<br />

for all h ∈ [0, h 0 ], where ‖ · ‖ denotes the sup-norm,<br />

‖u n ‖ = max<br />

1≤j≤n |u j| (4.54)<br />

Math 582B, Spring 2007<br />

California State University Northridge<br />

c○2007, B.E.<strong>Shapiro</strong><br />

Last revised: May 23, 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!