       Re: Symbolic summation

• To: mathgroup at smc.vnet.net
• Subject: [mg101618] Re: [mg101561] Symbolic summation
• From: "Elton Kurt TeKolste" <tekolste at fastmail.us>
• Date: Fri, 10 Jul 2009 23:26:32 -0400 (EDT)
• References: <200907101044.GAA15502@smc.vnet.net>

```There is some confusion in your question about the role of the
subscript.

If you have a known series of terms, then it would be best to define
them as a function, as in, say

f[n_Integer]:=n^2

To define the sum of the first n terms:
1 + 4 + 9 + ... + n^2

For example

In:= Sum[f[k],{k,7}]
Out= 91

The summation may be symbolic if the function is not defined

In:= Sum[k[i],{i,7}]
Out= k+k+k+k+k+k+k

Or if it is defined symbolically

In:= Sum[i^a,{i,7}]
Out= 1+2^a+3^a+4^a+5^a+6^a+7^a

In the example that you provided below, k1 is an atomic symbol, and thus
an unknown constant in the summation.  The answer provided by
Mathematica is correct:
k1 + k1 = 2 k1.  But the integers in "k1", "k2", ... do not represent
subscripts -- this is character string concatenation (<>), which
produces (in the example below) seven distinct new symbols, none of
which have an assigned value.

In:= Sum["k"<>IntegerString[i],{i,7}]
Out= k1+k2+k3+k4+k5+k6+k7

Subscripts are similar to concatenation in meaning but look different.
The following will also generate seven new symbols -- the subscripts
don't copy to the email so you'll have to try it in Mathematica

In:= Sum[Subscript[k,i],{i,7}]
Out= Subscript[k, 1]+Subscript[k, 2]+Subscript[k, 3]+Subscript[k,
4]+Subscript[k, 5]+Subscript[k, 6]+Subscript[k, 7]

Kurt TeKolste

On Fri, 10 Jul 2009 02:44 -0400, "Luca" <Lucazanottifragonara at alice.it>
wrote:
> Hello all, I have a problem, I've to compute a symbolic summation, which
> takes a very long time if I have to do it by hand. I have to write the
> terms of the Volterra series, related to the associated linear equation
> of a system.
>
> The problem is that I'm not really confident with mathematica, I've tried
> to use symbolic calculations with sums, but I think that in my case is
> not so easy.
>
> 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.
>
> Is it possible with mathematica?
>

```

• Prev by Date: Re: Symbolic summation
• Next by Date: Re: Re: about Implication
• Previous by thread: Re: Symbolic summation
• Next by thread: Re: Symbolic summation