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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

104 CHAPTER 5. RUNGE-KUTTA METHODS<br />

Figure 5.5: <strong>The</strong> function RungeKuttaOrderConditions in Mathematica.<br />

5.6 Step Size Control for ERK Methods<br />

Computing the local truncation error for a Runge-Kutta method is quite unwieldy<br />

and requires the analytic calculation of numerous partial derivatives, making it<br />

impractical for an efficient implementation. Instead, we are forced to use an approximation<br />

of the error. Suppose we have computed two different solutions: y, of<br />

order p, and z, of order p + 1. <strong>The</strong>n<br />

y n = y(t n ) + ch p+1 + O(h p+2 ) (5.132)<br />

z n = y(t n ) + O(h p+2 ) (5.133)<br />

for some constant c that depends on the method but is independent of h. Subtracting,<br />

ch p+1 = |y n − z n | (5.134)<br />

<strong>The</strong> idea is that we have some tolerance ɛ that we do not want to exceed, and when<br />

|y n − z n | approaches ɛ, we choose a new step size that satisfies<br />

|y n − z n | old<br />

h p+1<br />

old<br />

≈ c ≈ |y n − z n | new<br />

h p+1<br />

new<br />

< νɛ<br />

h p+1<br />

new<br />

(5.135)<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!