Re: Symbolic summation
- To: mathgroup at smc.vnet.net
- Subject: [mg101625] Re: Symbolic summation
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Fri, 10 Jul 2009 23:27:48 -0400 (EDT)
On 7/10/09 at 6:44 AM, Lucazanottifragonara at alice.it (Luca) wrote: >The problem is that I want a solution of this form: >x1+x2+x3+x4+x5... >Where the 1, 2, 3 and 4 and 5 are the summation subscripts... > >My summation is not infinite, I have to stop it. >If I write something like this: >n = 3; >Sum[kl, {l, 2, n}] >I obtain 2kl, instead I want to obtain k2+k3. Mathematica sees the syntax above as saying the summand is a variable named kl and the summation index is l. Since kl and l are distinct and no relationship between them has been provided, Mathematica returns the correct answer 2 kl. What you've described can be done as follows: In[2]:= Sum[Subscript[k, j], {j, 2, 3}] Out[2]= Subscript[k, 2] + Subscript[k, 3]