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.

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

While one could use an arbitrary step size for the first step, some knowledge of the<br />

problem is still necessary to prevent a really bad choice. An automatic calculation<br />

of the first value of h is provided by the following algorithm, as presented in [10].<br />

1. Input ɛ abs and ɛ rel , the acceptable absolute and relative tolerances, and calculate<br />

where ‖u‖ =<br />

√<br />

1<br />

∑ ui<br />

n σ<br />

2. Let h 0 = 0.01(d 0 /d 1 ) and calculate<br />

3. Calculate f(t 0 + h 0 , y 1 ) and let<br />

4. Compute a new step size h 1 from<br />

5. Use the following initial step size:<br />

σ = ɛ abs + |y 0 |ɛ rel (5.142)<br />

d 0 = ‖y 0 ‖ (5.143)<br />

d 1 = ‖f(t 0 , y 0 )‖ (5.144)<br />

(for scalar problems this becomes ‖u‖ = |u|/√ σ).<br />

y 1 = y 0 + h 0 f(t 0 , y 0 ) (5.145)<br />

d 2 = ‖f(t 0 + h, y 1 ) − f(t 0 , y 0 )‖<br />

h 0<br />

(5.146)<br />

h p+1<br />

1 max(d 1 , d 2 ) = 0.01 (5.147)<br />

h = min(100h 0 , h 1 ) (5.148)<br />

5.7 Implicit Runge-Kutta Methods<br />

Implicit Runge-Kutta (IRK) methods are more complicated - the diagonal and<br />

supra-diagonal elements of the Butcher array may be nonzero. IRK’s fall into several<br />

classes, including:<br />

• Gauss Methods which are based on Gaussian quadrature 2 , and have an<br />

order of accuracy of 2s, where s is the number of stages. Gauss methods have<br />

the highest attainable order for a given number of stages. Gauss methods are<br />

A-Stable but do not have stiff decay.<br />

• Radau Methods where one end of the interval is included in the iteration<br />

formula; the order of accuracy is 2s − 1. Radau methods have stiff decay.<br />

• Lobatto methods, in which the function is sampled at both ends of the<br />

interval; the order of accuracy is 2s − 2. Lobatto methods are A-Stable but<br />

do not have stiff decay.<br />

2 see [13], for example, for a discussion of Gaussian quadrature.<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!