MathGroup Archive 1993

[Date Index] [Thread Index] [Author Index]

Search the Archive

working with sums

Dear Mathgroup,

1.)  I'm trying to work with sums and can't get the algebra to work.
     For example:
In[1]:= << Algebra`SymbolicSum`
In[2]:= s=Sum[a*x[i],{i,1,n}]
Out[2]= Sum[a x[i], {i, 1, n}]
In[3]:= s/a

        Sum[a x[i], {i, 1, n}]
Out[3]= ----------------------

Of course, the function x[i] is not defined, but surely this simple factor
out to be possible?  Using Expand and Simplify do nothing.  Although, 
differentiation with respect to a works:

In[4]:= D[s,a]
Out[4]= Sum[x[i], {i, 1, n}]

Is there some way to make this work? Or do I have to use Map and get at
the expression at specific levels?

2.)  What is the difference between Sum and SymbolicSum?
     This is what I get with SymbolicSum (doing the same operations above):

In[5]:= ss=SymbolicSum[a*x[i],{i,1,n}]
Out[5]= SymbolicSum[a x[i], {i, 1, n}]
In[6]:= ss/a

        SymbolicSum[a x[i], {i, 1, n}]
Out[6]= ------------------------------
In[7]:= D[ss,a]
Out[7]= {x[i] SymbolicSum     [a x[i], {i, 1, n}], 
>    x[i] SymbolicSum     [a x[i], {i, 1, n}], 
>    x[i] SymbolicSum     [a x[i], {i, 1, n}]}

What does this last result mean?

Does one have to specify the function x in some way?  I need it to be 
arbitrary.  Thanks in advance.

Martin Lo
jpl 818-354-7169
mwl at

  • Prev by Date: Input windows in 2.1
  • Next by Date: Misbehavior of Conjugate[Exp[I x]]
  • Previous by thread: Input windows in 2.1
  • Next by thread: Misbehavior of Conjugate[Exp[I x]]