<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, ODE numeric integration</title>
    <link>http://www.mapleprimes.com/questions/35526-ODE-Numeric-Integration</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 16 Jun 2026 10:23:06 GMT</lastBuildDate>
    <pubDate>Tue, 16 Jun 2026 10:23:06 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, ODE numeric integration</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, ODE numeric integration</title>
      <link>http://www.mapleprimes.com/questions/35526-ODE-Numeric-Integration</link>
    </image>
    <item>
      <title>Use odeplot or output=listprocedure</title>
      <link>http://www.mapleprimes.com/questions/35526-ODE-Numeric-Integration?ref=Feed:MaplePrimes:ODE numeric integration:Comments#answer44176</link>
      <itunes:summary>&lt;p&gt;You can do either one of the following. (I have inserted concrete values for a, b and t0).&lt;/p&gt;
&lt;p&gt;The first method uses odeplot.&lt;/p&gt;
&lt;p&gt;F := diff(y(x),x,x) + x^2*diff(y(x),x) + sin(x)*y(x) ;&lt;br /&gt;
EDF := {F = 0, y(1) = -.1, D(y)(1) = 2};&lt;br /&gt;
Snum := dsolve(EDF, y(x), type = numeric);&lt;br /&gt;
plots:-odeplot(Snum,[x,y(x)],0..10);&lt;br /&gt;
plots:-odeplot(Snum,[x,diff(y(x),x)],0..10);&lt;/p&gt;
&lt;p&gt;The second method uses output=listprocedure.&lt;/p&gt;
&lt;p&gt;Snum2 := dsolve(EDF, y(x), type = numeric,output=listprocedure);&lt;br /&gt;
S:=subs(Snum2,y(x));&lt;br /&gt;
S1:=subs(Snum2,diff(y(x),x));&lt;br /&gt;
plot(S,0..10);&lt;br /&gt;
plot(S1,0..10);&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Preben Alsholm&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;You can do either one of the following. (I have inserted concrete values for a, b and t0).&lt;/p&gt;
&lt;p&gt;The first method uses odeplot.&lt;/p&gt;
&lt;p&gt;F := diff(y(x),x,x) + x^2*diff(y(x),x) + sin(x)*y(x) ;&lt;br /&gt;
EDF := {F = 0, y(1) = -.1, D(y)(1) = 2};&lt;br /&gt;
Snum := dsolve(EDF, y(x), type = numeric);&lt;br /&gt;
plots:-odeplot(Snum,[x,y(x)],0..10);&lt;br /&gt;
plots:-odeplot(Snum,[x,diff(y(x),x)],0..10);&lt;/p&gt;
&lt;p&gt;The second method uses output=listprocedure.&lt;/p&gt;
&lt;p&gt;Snum2 := dsolve(EDF, y(x), type = numeric,output=listprocedure);&lt;br /&gt;
S:=subs(Snum2,y(x));&lt;br /&gt;
S1:=subs(Snum2,diff(y(x),x));&lt;br /&gt;
plot(S,0..10);&lt;br /&gt;
plot(S1,0..10);&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Preben Alsholm&lt;/p&gt;</description>
      <guid>44176</guid>
      <pubDate>Fri, 12 Mar 2010 15:19:51 Z</pubDate>
      <itunes:author>alsholm</itunes:author>
      <author>alsholm</author>
    </item>
    <item>
      <title>'known' provoques a bug in dsolve ?</title>
      <link>http://www.mapleprimes.com/questions/35526-ODE-Numeric-Integration?ref=Feed:MaplePrimes:ODE numeric integration:Comments#answer44177</link>
      <itunes:summary>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I want to integrate the delayed differential equation&lt;/p&gt;
&lt;p&gt;x'(t) = -x(t-1)&amp;nbsp; for t &amp;ge; 0&amp;nbsp; and x(t) = 1 for -1 &amp;le; t &amp;le; 0.&lt;br /&gt;
&lt;br /&gt;
The idea is to evaluate x on [0,1], [1,2], and so on.&lt;br /&gt;
&lt;br /&gt;
The following code works, but is very, very slow si N &amp;gt; 8 :&lt;/p&gt;
&lt;p&gt;&lt;img src="file:///Users/rase/Library/Caches/TemporaryItems/moz-screenshot.png" alt="" /&gt;theta := t -&amp;gt; 1; &lt;br /&gt;
P := plot(theta, -1 .. 0);&lt;br /&gt;
N := 3; &lt;br /&gt;
xx := array(0 .. N+1); &lt;br /&gt;
xx[0] := theta; &lt;br /&gt;
for n from 0 to N do &lt;br /&gt;
xnum := dsolve({x(n) = xx[n](n), x'(t)(t) = -xx[n](t-1)}, &lt;br /&gt;
x(t), type = numeric, output = listprocedure, 'known' = xx[n]); &lt;br /&gt;
xx[n+1] := rhs(xnum[2]); &lt;br /&gt;
P := P, plot(xx[n+1], n .. n+1) &lt;br /&gt;
od ; &lt;br /&gt;
&lt;br /&gt;
display([P], axes = boxed)&lt;/p&gt;
&lt;p&gt;But if I suppress the array xx[0..N+1] to get a better loop and write&lt;/p&gt;
&lt;p&gt;theta := t -&amp;gt; 1; &lt;br /&gt;
P := plot(theta, -1 .. 0);&lt;br /&gt;
N := 3; &lt;br /&gt;
xx := theta; &lt;br /&gt;
for n from 0 to N do &lt;br /&gt;
xnum := dsolve({x(n) = xx(n), x'(t) = -xx(t-1)}, &lt;br /&gt;
x(t), type = numeric, output = listprocedure, 'known' = xx); &lt;br /&gt;
xx := rhs(xnum[2]); &lt;br /&gt;
P := P, plot(xx, n .. n+1) &lt;br /&gt;
od ; &lt;br /&gt;
&lt;br /&gt;
display([P], axes = boxed);&lt;br /&gt;
&lt;br /&gt;
Maple breaks its connexion with his kernel and became useless.&lt;br /&gt;
&lt;br /&gt;
Raymond S&amp;eacute;roul, Universit&amp;eacute; de Strasbourg&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I want to integrate the delayed differential equation&lt;/p&gt;
&lt;p&gt;x'(t) = -x(t-1)&amp;nbsp; for t &amp;ge; 0&amp;nbsp; and x(t) = 1 for -1 &amp;le; t &amp;le; 0.&lt;br /&gt;
&lt;br /&gt;
The idea is to evaluate x on [0,1], [1,2], and so on.&lt;br /&gt;
&lt;br /&gt;
The following code works, but is very, very slow si N &amp;gt; 8 :&lt;/p&gt;
&lt;p&gt;&lt;img src="file:///Users/rase/Library/Caches/TemporaryItems/moz-screenshot.png" alt="" /&gt;theta := t -&amp;gt; 1; &lt;br /&gt;
P := plot(theta, -1 .. 0);&lt;br /&gt;
N := 3; &lt;br /&gt;
xx := array(0 .. N+1); &lt;br /&gt;
xx[0] := theta; &lt;br /&gt;
for n from 0 to N do &lt;br /&gt;
xnum := dsolve({x(n) = xx[n](n), x'(t)(t) = -xx[n](t-1)}, &lt;br /&gt;
x(t), type = numeric, output = listprocedure, 'known' = xx[n]); &lt;br /&gt;
xx[n+1] := rhs(xnum[2]); &lt;br /&gt;
P := P, plot(xx[n+1], n .. n+1) &lt;br /&gt;
od ; &lt;br /&gt;
&lt;br /&gt;
display([P], axes = boxed)&lt;/p&gt;
&lt;p&gt;But if I suppress the array xx[0..N+1] to get a better loop and write&lt;/p&gt;
&lt;p&gt;theta := t -&amp;gt; 1; &lt;br /&gt;
P := plot(theta, -1 .. 0);&lt;br /&gt;
N := 3; &lt;br /&gt;
xx := theta; &lt;br /&gt;
for n from 0 to N do &lt;br /&gt;
xnum := dsolve({x(n) = xx(n), x'(t) = -xx(t-1)}, &lt;br /&gt;
x(t), type = numeric, output = listprocedure, 'known' = xx); &lt;br /&gt;
xx := rhs(xnum[2]); &lt;br /&gt;
P := P, plot(xx, n .. n+1) &lt;br /&gt;
od ; &lt;br /&gt;
&lt;br /&gt;
display([P], axes = boxed);&lt;br /&gt;
&lt;br /&gt;
Maple breaks its connexion with his kernel and became useless.&lt;br /&gt;
&lt;br /&gt;
Raymond S&amp;eacute;roul, Universit&amp;eacute; de Strasbourg&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>44177</guid>
      <pubDate>Fri, 12 Mar 2010 18:25:06 Z</pubDate>
      <itunes:author>raymond_seroul</itunes:author>
      <author>raymond_seroul</author>
    </item>
    <item>
      <title>The name xx is reused</title>
      <link>http://www.mapleprimes.com/questions/35526-ODE-Numeric-Integration?ref=Feed:MaplePrimes:ODE numeric integration:Comments#answer44178</link>
      <itunes:summary>&lt;p&gt;The problem may be that the name xx is reused in your second version.&lt;/p&gt;
&lt;p&gt;The first of the following corresponds to your first loop and causes no problem.&lt;/p&gt;
&lt;p&gt;The second redefines xx to be a procedure that must call a procedure also called xx. This is likely to be the problem.&lt;/p&gt;
&lt;p&gt;I wouldn't think that avoiding array or Array would speed up your loop, anyway.&lt;/p&gt;
&lt;p&gt;The unproblematic one:&lt;/p&gt;
&lt;p&gt;restart;&lt;br /&gt;
theta := t -&amp;gt; 1;&lt;br /&gt;
xx := theta;&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), diff(x(t),t) = -xx(t-1)},&lt;br /&gt;
type = numeric, output = listprocedure, 'known' = xx);&lt;br /&gt;
&lt;br /&gt;
xx := rhs(xnum[2]);&lt;br /&gt;
xx(.12345);&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), diff(x(t),t) = -xx(t-1)},&lt;br /&gt;
type = numeric, output = listprocedure, 'known' = xx);&lt;br /&gt;
&lt;br /&gt;
xx1 := rhs(xnum[2]);&lt;br /&gt;
xx1(.12345);&lt;/p&gt;
&lt;p&gt;The following will cause the loss of connection to the kernel.&lt;/p&gt;
&lt;p&gt;restart;&lt;br /&gt;
theta := t -&amp;gt; 1;&lt;br /&gt;
xx := theta;&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), diff(x(t),t) = -xx(t-1)},&lt;br /&gt;
type = numeric, output = listprocedure, 'known' = xx);&lt;br /&gt;
&lt;br /&gt;
xx := rhs(xnum[2]);&lt;br /&gt;
xx(.12345);&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), diff(x(t),t) = -xx(t-1)},&lt;br /&gt;
type = numeric, output = listprocedure, 'known' = xx);&lt;br /&gt;
&lt;br /&gt;
xx := rhs(xnum[2]);&lt;br /&gt;
xx(.12345);&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Preben Alsholm&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The problem may be that the name xx is reused in your second version.&lt;/p&gt;
&lt;p&gt;The first of the following corresponds to your first loop and causes no problem.&lt;/p&gt;
&lt;p&gt;The second redefines xx to be a procedure that must call a procedure also called xx. This is likely to be the problem.&lt;/p&gt;
&lt;p&gt;I wouldn't think that avoiding array or Array would speed up your loop, anyway.&lt;/p&gt;
&lt;p&gt;The unproblematic one:&lt;/p&gt;
&lt;p&gt;restart;&lt;br /&gt;
theta := t -&amp;gt; 1;&lt;br /&gt;
xx := theta;&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), diff(x(t),t) = -xx(t-1)},&lt;br /&gt;
type = numeric, output = listprocedure, 'known' = xx);&lt;br /&gt;
&lt;br /&gt;
xx := rhs(xnum[2]);&lt;br /&gt;
xx(.12345);&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), diff(x(t),t) = -xx(t-1)},&lt;br /&gt;
type = numeric, output = listprocedure, 'known' = xx);&lt;br /&gt;
&lt;br /&gt;
xx1 := rhs(xnum[2]);&lt;br /&gt;
xx1(.12345);&lt;/p&gt;
&lt;p&gt;The following will cause the loss of connection to the kernel.&lt;/p&gt;
&lt;p&gt;restart;&lt;br /&gt;
theta := t -&amp;gt; 1;&lt;br /&gt;
xx := theta;&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), diff(x(t),t) = -xx(t-1)},&lt;br /&gt;
type = numeric, output = listprocedure, 'known' = xx);&lt;br /&gt;
&lt;br /&gt;
xx := rhs(xnum[2]);&lt;br /&gt;
xx(.12345);&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), diff(x(t),t) = -xx(t-1)},&lt;br /&gt;
type = numeric, output = listprocedure, 'known' = xx);&lt;br /&gt;
&lt;br /&gt;
xx := rhs(xnum[2]);&lt;br /&gt;
xx(.12345);&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Preben Alsholm&lt;/p&gt;</description>
      <guid>44178</guid>
      <pubDate>Fri, 12 Mar 2010 19:31:06 Z</pubDate>
      <itunes:author>alsholm</itunes:author>
      <author>alsholm</author>
    </item>
    <item>
      <title>numeric intergration and piecewise</title>
      <link>http://www.mapleprimes.com/questions/35526-ODE-Numeric-Integration?ref=Feed:MaplePrimes:ODE numeric integration:Comments#answer44179</link>
      <itunes:summary>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Dear Preben Alsholm,&lt;/p&gt;
&lt;p&gt;thank you a lot for your aid.&lt;br /&gt;
&lt;br /&gt;
Avoiding the array was only aesthetic.&lt;/p&gt;
&lt;p&gt;I am still enjoying my delayed differential equation. As the previous code est very slow (because of recursive calls),&lt;br /&gt;
I tried to use the option 'piecewise'. But the documentatiohn is osbcure and does not help. I tried the code&lt;br /&gt;
&lt;br /&gt;
xx := t -&amp;gt; 1&amp;nbsp; ; &lt;br /&gt;
P := plot(xx, -1 .. 0); &lt;br /&gt;
&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), (D(x))(t) = -xx(t-1)}, &lt;br /&gt;
x(t), type = numeric, output = piecewise, range = 0 .. 1, 'known' = xx); &lt;br /&gt;
yy := unapply(rhs(xnum(t)[2]), rhs(xnum[1])); &lt;br /&gt;
&lt;br /&gt;
P := P, plot(yy, 0 .. 1); &lt;br /&gt;
&lt;br /&gt;
xnum := dsolve({x(1) = ('yy')(1), (D(x))(t) = -('yy')(t-1)}, &lt;br /&gt;
x(t), type = numeric, output = piecewise, range = 1 .. 2, 'known' = yy); &lt;br /&gt;
zz := unapply(rhs(xnum(t)[2]), rhs(xnum[1])); &lt;br /&gt;
&lt;br /&gt;
P := P, plot(zz, 1 .. 2); &lt;br /&gt;
&lt;br /&gt;
P := P, plot(tt, 2 .. 3); &lt;br /&gt;
display([P], axes = boxed);&lt;/p&gt;
&lt;p&gt;But it does not work : i get the message&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Warning, cannot evaluate the solution further right of 1.9999993, probably a singularity.&amp;quot;&lt;/p&gt;
&lt;p&gt;Questions :&lt;/p&gt;
&lt;p&gt;1) Do output = piecewise really works ?&lt;br /&gt;
&lt;br /&gt;
2) The affectation&amp;nbsp; yy := unapply(rhs(xnum(t)[2]), rhs(xnum[1])); &lt;br /&gt;
looks awkward, but I did not discover something more elegant.&lt;br /&gt;
&lt;br /&gt;
3) The real problem is that Maple does not consider a dsolve(..., type = numeric)&lt;br /&gt;
as a genuine function. Is there a philosophy ?&lt;br /&gt;
&lt;br /&gt;
Raymond S&amp;eacute;roul, Universit&amp;eacute; de Strasbourg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Raymond S&amp;eacute;roul&lt;/p&gt;
&lt;p&gt;Universit&amp;eacute; de Strasbourg&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Dear Preben Alsholm,&lt;/p&gt;
&lt;p&gt;thank you a lot for your aid.&lt;br /&gt;
&lt;br /&gt;
Avoiding the array was only aesthetic.&lt;/p&gt;
&lt;p&gt;I am still enjoying my delayed differential equation. As the previous code est very slow (because of recursive calls),&lt;br /&gt;
I tried to use the option 'piecewise'. But the documentatiohn is osbcure and does not help. I tried the code&lt;br /&gt;
&lt;br /&gt;
xx := t -&amp;gt; 1&amp;nbsp; ; &lt;br /&gt;
P := plot(xx, -1 .. 0); &lt;br /&gt;
&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), (D(x))(t) = -xx(t-1)}, &lt;br /&gt;
x(t), type = numeric, output = piecewise, range = 0 .. 1, 'known' = xx); &lt;br /&gt;
yy := unapply(rhs(xnum(t)[2]), rhs(xnum[1])); &lt;br /&gt;
&lt;br /&gt;
P := P, plot(yy, 0 .. 1); &lt;br /&gt;
&lt;br /&gt;
xnum := dsolve({x(1) = ('yy')(1), (D(x))(t) = -('yy')(t-1)}, &lt;br /&gt;
x(t), type = numeric, output = piecewise, range = 1 .. 2, 'known' = yy); &lt;br /&gt;
zz := unapply(rhs(xnum(t)[2]), rhs(xnum[1])); &lt;br /&gt;
&lt;br /&gt;
P := P, plot(zz, 1 .. 2); &lt;br /&gt;
&lt;br /&gt;
P := P, plot(tt, 2 .. 3); &lt;br /&gt;
display([P], axes = boxed);&lt;/p&gt;
&lt;p&gt;But it does not work : i get the message&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Warning, cannot evaluate the solution further right of 1.9999993, probably a singularity.&amp;quot;&lt;/p&gt;
&lt;p&gt;Questions :&lt;/p&gt;
&lt;p&gt;1) Do output = piecewise really works ?&lt;br /&gt;
&lt;br /&gt;
2) The affectation&amp;nbsp; yy := unapply(rhs(xnum(t)[2]), rhs(xnum[1])); &lt;br /&gt;
looks awkward, but I did not discover something more elegant.&lt;br /&gt;
&lt;br /&gt;
3) The real problem is that Maple does not consider a dsolve(..., type = numeric)&lt;br /&gt;
as a genuine function. Is there a philosophy ?&lt;br /&gt;
&lt;br /&gt;
Raymond S&amp;eacute;roul, Universit&amp;eacute; de Strasbourg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Raymond S&amp;eacute;roul&lt;/p&gt;
&lt;p&gt;Universit&amp;eacute; de Strasbourg&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>44179</guid>
      <pubDate>Fri, 12 Mar 2010 20:33:12 Z</pubDate>
      <itunes:author>raymond_seroul</itunes:author>
      <author>raymond_seroul</author>
    </item>
    <item>
      <title>Your code works</title>
      <link>http://www.mapleprimes.com/questions/35526-ODE-Numeric-Integration?ref=Feed:MaplePrimes:ODE numeric integration:Comments#answer44181</link>
      <itunes:summary>&lt;p&gt;It seems to me that your code works. The warning is just that. A warning, not an error. It is to be expected since the function xx(t-1) at the time is undefined for t &amp;gt; 2.&lt;/p&gt;
&lt;p&gt;Using output=piecewise makes it unnecessary to rename, since there is no recursive calling. In fact you made the right hand side of the differential equation into a concrete function of t given by a formula.&lt;/p&gt;
&lt;p&gt;So you could change your code to&lt;/p&gt;
&lt;p&gt;restart;&lt;br /&gt;
xx := t -&amp;gt; 1&amp;nbsp; :&lt;br /&gt;
P := plot(xx, -1 .. 0):&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), (D(x))(t) = -xx(t-1)},type = numeric, output = piecewise, range = 0 .. 1):&lt;br /&gt;
xx:=unapply(subs(op(xnum),x(t)),t):&lt;br /&gt;
P := P, plot(xx, 0 .. 1):&lt;br /&gt;
#Just to see that it works&lt;br /&gt;
plots:-display(P);&lt;br /&gt;
xnum := dsolve({x(1) = xx(1), (D(x))(t) = -xx(t-1)},type = numeric, output = piecewise, range = 1 .. 2):&lt;br /&gt;
xx := unapply(subs(op(xnum),x(t)),t):&lt;br /&gt;
#Just to see that it still works&lt;br /&gt;
P := P, plot(xx, 1 .. 2):&lt;br /&gt;
plots:-display(P);&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Preben Alsholm&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;It seems to me that your code works. The warning is just that. A warning, not an error. It is to be expected since the function xx(t-1) at the time is undefined for t &amp;gt; 2.&lt;/p&gt;
&lt;p&gt;Using output=piecewise makes it unnecessary to rename, since there is no recursive calling. In fact you made the right hand side of the differential equation into a concrete function of t given by a formula.&lt;/p&gt;
&lt;p&gt;So you could change your code to&lt;/p&gt;
&lt;p&gt;restart;&lt;br /&gt;
xx := t -&amp;gt; 1&amp;nbsp; :&lt;br /&gt;
P := plot(xx, -1 .. 0):&lt;br /&gt;
xnum := dsolve({x(0) = xx(0), (D(x))(t) = -xx(t-1)},type = numeric, output = piecewise, range = 0 .. 1):&lt;br /&gt;
xx:=unapply(subs(op(xnum),x(t)),t):&lt;br /&gt;
P := P, plot(xx, 0 .. 1):&lt;br /&gt;
#Just to see that it works&lt;br /&gt;
plots:-display(P);&lt;br /&gt;
xnum := dsolve({x(1) = xx(1), (D(x))(t) = -xx(t-1)},type = numeric, output = piecewise, range = 1 .. 2):&lt;br /&gt;
xx := unapply(subs(op(xnum),x(t)),t):&lt;br /&gt;
#Just to see that it still works&lt;br /&gt;
P := P, plot(xx, 1 .. 2):&lt;br /&gt;
plots:-display(P);&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Preben Alsholm&lt;/p&gt;</description>
      <guid>44181</guid>
      <pubDate>Fri, 12 Mar 2010 21:26:50 Z</pubDate>
      <itunes:author>alsholm</itunes:author>
      <author>alsholm</author>
    </item>
    <item>
      <title>Other ways</title>
      <link>http://www.mapleprimes.com/questions/35526-ODE-Numeric-Integration?ref=Feed:MaplePrimes:ODE numeric integration:Comments#comment44180</link>
      <itunes:summary>&lt;p&gt;There are many ways to handle delay differential equations.&amp;nbsp;&amp;nbsp;&amp;nbsp; You might look at &lt;a href="http://www.mapleprimes.com/forum/delaylogistic"&gt;www.mapleprimes.com/forum/delaylogistic&lt;/a&gt; or &lt;a href="http://groups.google.ca/group/sci.math.symbolic/browse_frm/thread/1f04240aa7b3a42c/fcbe7928da2ad9d1"&gt;groups.google.ca/group/sci.math.symbolic/browse_frm/thread/1f04240aa7b3a42c/fcbe7928da2ad9d1&lt;/a&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;There are many ways to handle delay differential equations.&amp;nbsp;&amp;nbsp;&amp;nbsp; You might look at &lt;a href="http://www.mapleprimes.com/forum/delaylogistic"&gt;www.mapleprimes.com/forum/delaylogistic&lt;/a&gt; or &lt;a href="http://groups.google.ca/group/sci.math.symbolic/browse_frm/thread/1f04240aa7b3a42c/fcbe7928da2ad9d1"&gt;groups.google.ca/group/sci.math.symbolic/browse_frm/thread/1f04240aa7b3a42c/fcbe7928da2ad9d1&lt;/a&gt;&lt;/p&gt;</description>
      <guid>44180</guid>
      <pubDate>Fri, 12 Mar 2010 20:43:54 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
  </channel>
</rss>