<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, sum() ind subs()</title>
    <link>http://www.mapleprimes.com/questions/40214-Sum-Ind-Subs</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 10:46:57 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 10:46:57 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, sum() ind subs()</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, sum() ind subs()</title>
      <link>http://www.mapleprimes.com/questions/40214-Sum-Ind-Subs</link>
    </image>
    <item>
      <title>One way</title>
      <link>http://www.mapleprimes.com/questions/40214-Sum-Ind-Subs?ref=Feed:MaplePrimes:sum() ind subs():Comments#answer73999</link>
      <itunes:summary>This is a way that works, though I do not like much:

&lt;code&gt;eval(sum(r[i]*y[i],i=1..m),[m=3,sum=add,y[1]=2]);&lt;/code&gt;</itunes:summary>
      <description>This is a way that works, though I do not like much:

&lt;code&gt;eval(sum(r[i]*y[i],i=1..m),[m=3,sum=add,y[1]=2]);&lt;/code&gt;</description>
      <guid>73999</guid>
      <pubDate>Mon, 21 Jan 2008 04:34:38 Z</pubDate>
      <itunes:author>jakubi</itunes:author>
      <author>jakubi</author>
    </item>
    <item>
      <title>sum and subs</title>
      <link>http://www.mapleprimes.com/questions/40214-Sum-Ind-Subs?ref=Feed:MaplePrimes:sum() ind subs():Comments#answer73998</link>
      <itunes:summary>The short answer to "why" is that sum(r[i]*y[i], i=1..m) does not actually contain y[1].  See for yourself:

&lt;pre&gt;
&gt; sum(r[i]*y[i], i=1..m);
&lt;/pre&gt;
&lt;maple&gt;sum(r[i]*y[i], i=1..m)&lt;/maple&gt;

No y[1] there!  One thing you could do is this:

&lt;pre&gt;
&gt; eval(eval(sum(r[i]*y[i],i=1..m),m=3),y[1]=2);
&lt;/pre&gt;
&lt;maple&gt;2*r[1]+r[2]*y[2]+r[3]*y[3]&lt;/maple&gt;

Note: I use eval rather than subs, to have the result evaluated after substitution.
</itunes:summary>
      <description>The short answer to "why" is that sum(r[i]*y[i], i=1..m) does not actually contain y[1].  See for yourself:

&lt;pre&gt;
&gt; sum(r[i]*y[i], i=1..m);
&lt;/pre&gt;
&lt;maple&gt;sum(r[i]*y[i], i=1..m)&lt;/maple&gt;

No y[1] there!  One thing you could do is this:

&lt;pre&gt;
&gt; eval(eval(sum(r[i]*y[i],i=1..m),m=3),y[1]=2);
&lt;/pre&gt;
&lt;maple&gt;2*r[1]+r[2]*y[2]+r[3]*y[3]&lt;/maple&gt;

Note: I use eval rather than subs, to have the result evaluated after substitution.
</description>
      <guid>73998</guid>
      <pubDate>Mon, 21 Jan 2008 04:54:04 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>Disregard this post</title>
      <link>http://www.mapleprimes.com/questions/40214-Sum-Ind-Subs?ref=Feed:MaplePrimes:sum() ind subs():Comments#answer73991</link>
      <itunes:summary>Please, disregard this post. The previous content was misconceived.</itunes:summary>
      <description>Please, disregard this post. The previous content was misconceived.</description>
      <guid>73991</guid>
      <pubDate>Mon, 21 Jan 2008 13:44:59 Z</pubDate>
      <itunes:author>John Fredsted</itunes:author>
      <author>John Fredsted</author>
    </item>
    <item>
      <title>Yes, but you have insert</title>
      <link>http://www.mapleprimes.com/questions/40214-Sum-Ind-Subs?ref=Feed:MaplePrimes:sum() ind subs():Comments#answer73990</link>
      <itunes:summary>Yes, but you have insert i=1..3 instead of i=1..m in your equation above. In this case you would not need the m=3 in subs().</itunes:summary>
      <description>Yes, but you have insert i=1..3 instead of i=1..m in your equation above. In this case you would not need the m=3 in subs().</description>
      <guid>73990</guid>
      <pubDate>Mon, 21 Jan 2008 13:46:56 Z</pubDate>
      <itunes:author>Dirk</itunes:author>
      <author>Dirk</author>
    </item>
    <item>
      <title>I did not see your response,</title>
      <link>http://www.mapleprimes.com/questions/40214-Sum-Ind-Subs?ref=Feed:MaplePrimes:sum() ind subs():Comments#answer73989</link>
      <itunes:summary>I did not see your response, as I sent my answer. Sorry for that.</itunes:summary>
      <description>I did not see your response, as I sent my answer. Sorry for that.</description>
      <guid>73989</guid>
      <pubDate>Mon, 21 Jan 2008 14:08:54 Z</pubDate>
      <itunes:author>Dirk</itunes:author>
      <author>Dirk</author>
    </item>
    <item>
      <title>It does appear to be the evaluation order.</title>
      <link>http://www.mapleprimes.com/questions/40214-Sum-Ind-Subs?ref=Feed:MaplePrimes:sum() ind subs():Comments#answer73984</link>
      <itunes:summary>Here are two ways of trying to do this. The first does not work,
the sum is not evaluated.

&lt;em&gt;subs(y[1]=2,subs(m=3,sum(r[i]*y[i],i=1..m)));&lt;/em&gt;


The next works, with a forced evaluation.

&lt;em&gt;subs(y[1]=2,eval(subs(m=3,sum(r[i]*y[i],i=1..m))));&lt;/em&gt;



If you look at the help on sum in Maple 11 you will find 
the following statement.

"Maple returns the call unevaluated if it cannot find a closed form."

Since you do not have a closed form, Maple does not evaluate the sum
and there is no "y[1]."</itunes:summary>
      <description>Here are two ways of trying to do this. The first does not work,
the sum is not evaluated.

&lt;em&gt;subs(y[1]=2,subs(m=3,sum(r[i]*y[i],i=1..m)));&lt;/em&gt;


The next works, with a forced evaluation.

&lt;em&gt;subs(y[1]=2,eval(subs(m=3,sum(r[i]*y[i],i=1..m))));&lt;/em&gt;



If you look at the help on sum in Maple 11 you will find 
the following statement.

"Maple returns the call unevaluated if it cannot find a closed form."

Since you do not have a closed form, Maple does not evaluate the sum
and there is no "y[1]."</description>
      <guid>73984</guid>
      <pubDate>Mon, 21 Jan 2008 19:52:54 Z</pubDate>
      <itunes:author>jaytreiman</itunes:author>
      <author>jaytreiman</author>
    </item>
  </channel>
</rss>