<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - comments on Post, parameters in dsolve</title>
    <link>http://www.mapleprimes.com/posts/36579-Parameters-In-Dsolve</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Thu, 11 Jun 2026 23:33:04 GMT</lastBuildDate>
    <pubDate>Thu, 11 Jun 2026 23:33:04 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest comments added to the Post, parameters in dsolve</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - comments on Post, parameters in dsolve</title>
      <link>http://www.mapleprimes.com/posts/36579-Parameters-In-Dsolve</link>
    </image>
    <item>
      <title>difference</title>
      <link>http://www.mapleprimes.com/posts/36579-Parameters-In-Dsolve?ref=Feed:MaplePrimes:parameters in dsolve:Comments#comment62765</link>
      <itunes:summary>&lt;p&gt;Your second (1-line) way is a procedure call. The first way could also be made into a proc, and also be 1 line.&lt;/p&gt;
&lt;p&gt;Your second way requires calling dsolve/numeric each time. That involves repeating all sorts of setup, initialization, deduction of problem class, algorithmic switching due to problem class, etc, etc. That is all unnecessary when one knows that the problem form will be the same, and that only some parameter will change. One purpose of the parameter option is to remove duplicated, unnecessary overhead.&lt;/p&gt;
&lt;p&gt;The overhead costs both time and memory.&lt;/p&gt;
&lt;pre&gt;
    |\^/|     Maple 13 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2009
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 &amp;lt;____ ____&amp;gt;  Waterloo Maple Inc.
      |       Type ? for help.
&amp;gt; ans:=(a,c)-&amp;gt;dsolve({diff(y(x),x)+sin(x^2)*y(x)=a,y(0)=c},y(x),numeric):
&amp;gt; h:=rand(100):
&amp;gt; st,bu:=time(),kernelopts(bytesalloc):
&amp;gt; for ii from 1 to 1000 do
&amp;gt;   ans(h(),h())(5.7);
&amp;gt; end do: time()-st,kernelopts(bytesalloc)-bu;
                                5.424, 90161024
  
&amp;gt; quit
 
 
    |\^/|     Maple 13 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2009
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 &amp;lt;____ ____&amp;gt;  Waterloo Maple Inc.
      |       Type ? for help.
&amp;gt; ans:=dsolve({diff(y(x),x)+sin(x^2)*y(x\
&amp;gt; )=a,y(0)=c},y(x),numeric,parameters=[a,c]):
&amp;gt; h:=rand(100):
&amp;gt; st,bu:=time(),kernelopts(bytesalloc):
&amp;gt; for ii from 1 to 1000 do
&amp;gt;   ans(parameters=[h(),h()]);
&amp;gt;   ans(5.7);
&amp;gt; end do: time()-st,kernelopts(bytesalloc)-bu;
                                1.613, 38003920

   |\^/|     Maple 13 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2009
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 &amp;lt;____ ____&amp;gt;  Waterloo Maple Inc.
      |       Type ? for help.
&amp;gt; ans:=dsolve({diff(y(x),x)+sin(x^2)*
&amp;gt; y(x)=a,y(0)=c},y(x),numeric,parameters=[a,c]):
&amp;gt; h:=rand(100):
&amp;gt; nans:=proc(a,b,x) ans(parameters=[a,b]); ans(x); end proc:
&amp;gt; st,bu:=time(),kernelopts(bytesalloc):
&amp;gt; for ii from 1 to 1000 do
&amp;gt;   nans(h(),h(),5.7);
&amp;gt; end do: time()-st,kernelopts(bytesalloc)-bu;
                                1.632, 38003920
&lt;/pre&gt;
&lt;p&gt;There may also be some technical reasons underneath. For example, using globals is not thread-safe.&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, parameters in dsolve</description>
      <guid>62765</guid>
      <pubDate>Fri, 16 Oct 2009 17:11:03 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>re parameters</title>
      <link>http://www.mapleprimes.com/posts/36579-Parameters-In-Dsolve?ref=Feed:MaplePrimes:parameters in dsolve:Comments#comment62766</link>
      <itunes:summary>Thank you for the explanation. 

The timings make your point nicely.</itunes:summary>
      <description>The latest comments added to the Post, parameters in dsolve</description>
      <guid>62766</guid>
      <pubDate>Mon, 19 Oct 2009 20:34:03 Z</pubDate>
      <itunes:author>awass</itunes:author>
      <author>awass</author>
    </item>
  </channel>
</rss>