21.09.2013 Views

Solving DDEs in MATLAB

Solving DDEs in MATLAB

Solving DDEs in MATLAB

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.

444 L.F. Shamp<strong>in</strong>e, S. Thompson / Applied Numerical Mathematics 37 (2001) 441–458<br />

is an explicit recipe for the stage and the formulas are explicit. The function S(x) is the <strong>in</strong>itial history<br />

for x a. After tak<strong>in</strong>g the step to xn+1, we use the cont<strong>in</strong>uous extension to def<strong>in</strong>e S(x) on [xn,xn+1] as<br />

S(xn + σhn) = yn+σ . We are then ready to take another step. This suffices for prov<strong>in</strong>g convergence as the<br />

maximum step size tends to zero, but we must take up the other situation because <strong>in</strong> practice, we may very<br />

well want to use a step size larger than the smallest delay. When hn >τj for some j, the “history” term<br />

S(x) is evaluated <strong>in</strong> the span of the current step and the formulas are def<strong>in</strong>ed implicitly. In this situation<br />

we evaluate the formulas with simple iteration. On reach<strong>in</strong>g xn, wehavedef<strong>in</strong>edS(x) for x xn. We<br />

extend its def<strong>in</strong>ition somehow to (xn,xn + hn] and call the result<strong>in</strong>g function S (0) (x). A typical stage<br />

of simple iteration beg<strong>in</strong>s with the approximate solution S (m) (x). The next iterate is computed with the<br />

explicit formula<br />

S (m+1) (xn + σhn) = yn + hnΦ xn,yn,σ; S (m) (x) .<br />

Here and elsewhere it is convenient to show the dependence on the history by means of another argument<br />

<strong>in</strong> the <strong>in</strong>crement function. In the next section we show that if the step size is small enough, this is a<br />

contraction and S(x) is well-def<strong>in</strong>ed for x xn+1.<br />

In dde23 we predict S (0) (x) to be the constant y0 for the first step. We do not attempt to predict more<br />

accurately then because the solution is not smooth at a and we do not yet know a step size appropriate<br />

to the scale of the problem. Indeed, reduc<strong>in</strong>g the step size as needed to obta<strong>in</strong> convergence of simple<br />

iteration is a valuable tactic for f<strong>in</strong>d<strong>in</strong>g an <strong>in</strong>itial step size that is on scale, cf. [16]. After the first step, we<br />

use the cont<strong>in</strong>uous extension of the preced<strong>in</strong>g step as S (0) (x) for the current step. This prediction has an<br />

appropriate order of accuracy and we can even assess the accuracy quantitatively us<strong>in</strong>g (2). Remarkably,<br />

the truncation error has a local maximum at xn+1 so that extrapolation actually provides a more accurate<br />

solution for some distance. Specifically, the ratio of the error of yn+σ to the error of yn+1 is no larger<br />

than 1 for σ up to about 1.32. Much more important <strong>in</strong> practice is the accuracy of the prediction <strong>in</strong> the<br />

span of a subsequent step of the same size or rather larger. Unfortunately, the ratio grows rapidly as σ<br />

<strong>in</strong>creases. Still, it is no bigger than 13 for 1 σ 2, so the prediction is quite good when the step size<br />

is chang<strong>in</strong>g slowly. The step size adjustment algorithms of dde23 are those of ode23 augmented to<br />

deal with implicit formulas. The convergence test for simple iteration is that y (m+1)<br />

n+1 − y(m) n+1 is no more<br />

than one tenth the accuracy required of yn+1. Because each iteration costs as much as an explicit step,<br />

any proposed hn with τ

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

Saved successfully!

Ooh no, something went wrong!