<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, dsolve problem with plotting acceleration</title>
    <link>http://www.mapleprimes.com/questions/133675-Dsolve-Problem-With-Plotting-Acceleration</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Wed, 10 Jun 2026 20:38:09 GMT</lastBuildDate>
    <pubDate>Wed, 10 Jun 2026 20:38:09 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, dsolve problem with plotting acceleration</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, dsolve problem with plotting acceleration</title>
      <link>http://www.mapleprimes.com/questions/133675-Dsolve-Problem-With-Plotting-Acceleration</link>
    </image>
    <item>
      <title>two ways</title>
      <link>http://www.mapleprimes.com/questions/133675-Dsolve-Problem-With-Plotting-Acceleration?ref=Feed:MaplePrimes:dsolve problem with plotting acceleration:Comments#answer133682</link>
      <itunes:summary>&lt;p&gt;First possibility: you want to plot the derivative of x'(t), that is to say: the derivative of a numeric procedure. I suppose that odeplot is not designed for that. So use the option output=listprocedure:&lt;/p&gt;
&lt;pre&gt;sol3 := dsolve({DE1, DE2, ICs}, numeric, output=listprocedure );
v := subs(sol3,diff(x(t),t));
st := time(): plot(D(v),0..3); T := time() - st;
&lt;/pre&gt;

&lt;p&gt;Faster is to calculate timeseries for x(t) and v(t) and use a(t) from the differential equation:&lt;/p&gt;
&lt;pre&gt;solve( DE1, diff(diff(x(t), t), t) ): subs( {m(t)=m, x(t)=x, diff(x(t),t)=v}, % ):
a := unapply( %, t,m,x,v );     #acceleration as a function of t, m, x and x'
sol2 := dsolve({DE1, DE2, ICs}, numeric, output=Array([seq(i,i=0..3,0.001)]) );
   # sol2 has two parts: a list with the names of the variables and a matrix of calculated values
plot( &amp;lt;sol2[2,1][1..-1,1]|a~(seq(sol2[2,1][1..-1,i], i=1..4))&amp;gt; );
&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;First possibility: you want to plot the derivative of x'(t), that is to say: the derivative of a numeric procedure. I suppose that odeplot is not designed for that. So use the option output=listprocedure:&lt;/p&gt;
&lt;pre&gt;sol3 := dsolve({DE1, DE2, ICs}, numeric, output=listprocedure );
v := subs(sol3,diff(x(t),t));
st := time(): plot(D(v),0..3); T := time() - st;
&lt;/pre&gt;

&lt;p&gt;Faster is to calculate timeseries for x(t) and v(t) and use a(t) from the differential equation:&lt;/p&gt;
&lt;pre&gt;solve( DE1, diff(diff(x(t), t), t) ): subs( {m(t)=m, x(t)=x, diff(x(t),t)=v}, % ):
a := unapply( %, t,m,x,v );     #acceleration as a function of t, m, x and x'
sol2 := dsolve({DE1, DE2, ICs}, numeric, output=Array([seq(i,i=0..3,0.001)]) );
   # sol2 has two parts: a list with the names of the variables and a matrix of calculated values
plot( &amp;lt;sol2[2,1][1..-1,1]|a~(seq(sol2[2,1][1..-1,i], i=1..4))&amp;gt; );
&lt;/pre&gt;</description>
      <guid>133682</guid>
      <pubDate>Thu, 03 May 2012 17:47:14 Z</pubDate>
      <itunes:author>Adri vanderMeer
 van der Meer</itunes:author>
      <author>Adri vanderMeer
 van der Meer</author>
    </item>
    <item>
      <title>a(t)</title>
      <link>http://www.mapleprimes.com/questions/133675-Dsolve-Problem-With-Plotting-Acceleration?ref=Feed:MaplePrimes:dsolve problem with plotting acceleration:Comments#answer133685</link>
      <itunes:summary>&lt;p&gt;Try changing the call to dsolve(...,numeric) to be,&lt;/p&gt;
&lt;pre&gt;sol1 := dsolve({DE1, DE2, ICs, a(t) = diff(x(t), t, t)}, numeric, range = 0 .. 3);
&lt;/pre&gt;
&lt;p&gt;Then, your last plot could be produced using,&lt;/p&gt;
&lt;pre&gt;odeplot(sol1, [t, a(t)], 0 .. N);
&lt;/pre&gt;
&lt;p&gt;That could be a way to get better results, numerically. It makes dsolve(...,numeric) compute a(t) itself. By instead using D(v)(t) then when that gets evalf'd Maple will internally call fdiff() to compute a derivative numerically using a multi-point difference scheme. I would expect dsolve(...,numeric) to be able to compute a(t) more robustly than that, in general if not specifically. &lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Try changing the call to dsolve(...,numeric) to be,&lt;/p&gt;
&lt;pre&gt;sol1 := dsolve({DE1, DE2, ICs, a(t) = diff(x(t), t, t)}, numeric, range = 0 .. 3);
&lt;/pre&gt;
&lt;p&gt;Then, your last plot could be produced using,&lt;/p&gt;
&lt;pre&gt;odeplot(sol1, [t, a(t)], 0 .. N);
&lt;/pre&gt;
&lt;p&gt;That could be a way to get better results, numerically. It makes dsolve(...,numeric) compute a(t) itself. By instead using D(v)(t) then when that gets evalf'd Maple will internally call fdiff() to compute a derivative numerically using a multi-point difference scheme. I would expect dsolve(...,numeric) to be able to compute a(t) more robustly than that, in general if not specifically. &lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>133685</guid>
      <pubDate>Thu, 03 May 2012 22:22:39 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>forgot to thank you for this. it worked.</title>
      <link>http://www.mapleprimes.com/questions/133675-Dsolve-Problem-With-Plotting-Acceleration?ref=Feed:MaplePrimes:dsolve problem with plotting acceleration:Comments#comment133927</link>
      <itunes:summary>&lt;p&gt;forgot to thank you for this. it worked. your help was much appreciated.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;forgot to thank you for this. it worked. your help was much appreciated.&lt;/p&gt;</description>
      <guid>133927</guid>
      <pubDate>Tue, 08 May 2012 22:37:23 Z</pubDate>
      <itunes:author>Gbrandt</itunes:author>
      <author>Gbrandt</author>
    </item>
  </channel>
</rss>