21.04.2015 Views

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

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

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

4.4 Other Euler Methods<br />

<strong>The</strong> Trapezoidal Method has an iteration formula<br />

y n = y n−1 + h n<br />

2 (f(t n, y n ) + f(t n−1 , y n−1 )) (4.113)<br />

<strong>The</strong> local truncation error for the Trapezoidal Method is O(h 2 ):<br />

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

h<br />

Use Taylor series expansions about t = t n ,<br />

− 1 2 [f(t ,y(t n )) + f(t n−1 , y(t n−1 ))] (4.114)<br />

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

2 y′′ (t n ) − h3<br />

6 y′′′ (t n ) + · · · ⇐= (4.115)<br />

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

2 y′′′ (t n ) · · · (4.116)<br />

Hence the local truncation error is<br />

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

8 y′′′ (t n ) + · · · (4.117)<br />

· · · + 1 ]<br />

[y ′ (t n ) + y ′ (t n ) − hy ′′ (t n ) + h2<br />

2<br />

2 y′′′ (t n ) + · · · (4.118)<br />

= 3h2<br />

8 y′′′ (t n ) (4.119)<br />

= O(h 2 ) (4.120)<br />

For the test equation, the trapezoidal method gives<br />

y n = 2 + hλ<br />

2 − hλ y n−1 (4.121)<br />

Substituting hλ = x + iy we find that the region of absolute stability is precisely<br />

the left-half plane x ≤ 0.<br />

<strong>The</strong> theta method is given by<br />

y n = y n−1 + h [θf(t n−1 , y n−1 ) + (1 − θ)f(t n , y n )] (4.122)<br />

<strong>The</strong> theta method is implicit except when θ = 1, where it reduces to Euler’s method.<br />

For θ = 1/2 it becomes the trapezoidal method. <strong>The</strong> method is first order except<br />

when θ = 1/2. <strong>The</strong> theta method can be used to eliminate error in specific terms in<br />

the Taylor expansion besides the lowest order term. For example, setting θ = 2/3<br />

gets rid of the O(h 3 ) term in the error even though the O(h 2 ) term remains. This<br />

could be of use in cases where the higher order term has a sufficiently high coefficient<br />

that for larger step sizes it overwhelms the lower order term. <strong>The</strong> theta-method is<br />

A-stable if and only if 0 ≤ θ ≤ 1/2.<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!