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.

146 CHAPTER 7. DELAY DIFFERENTIAL EQUATIONS<br />

Figure 7.2: Numerical integration of y ′ = −y(t − 1), y(t) = 1, −1 < t < 0, on<br />

the interval (0, 10) for three different step sizes using the Forward Euler Method<br />

combined with the Method of Steps.<br />

Next we consider the delay differential equation 1<br />

y ′ (t) =<br />

cy(t − τ)<br />

− λy(t) (7.71)<br />

1 + y(t − τ) m<br />

y(t) = 1, −τ < t < 0 (7.72)<br />

with c = 0.11, λ = 0.21, and m = 10. <strong>The</strong> only difference in the implementation is<br />

the definition of the function f[t]:<br />

f[t ] := Module[{<br />

λ = 0.11, c = 0.21, m = 10, i, ydelay, ynow, v},<br />

i = index[t - tau, tau, n];<br />

ydelay = data[[i]];<br />

ynow = Last[data];<br />

v = c*ydelay/(1 + ydelay m ) - λ*ynow;<br />

Return[v];<br />

];<br />

This function makes the assumption that whenever f[t] is called the current value<br />

of y(t) is stored the last element of the list array data. In the illustrations shown<br />

in figure 7.3 we have also modified the call to ListPlot to also display the value of<br />

tau,<br />

1 This equation is derived from a model of respiration, M.C.Mackey and L.Glass (1977) “Oscillation<br />

and chaos in physiological control systems,” Science, 197:287-289.<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!