Re: How is it possible to factor Sum[a]+Sum[b] to Sum[a+b] ?
- To: mathgroup at smc.vnet.net
- Subject: [mg42037] Re: [mg41982] How is it possible to factor Sum[a]+Sum[b] to Sum[a+b] ?
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Tue, 17 Jun 2003 05:43:13 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
There is no such rule and I do not think there any point in having one. It only makes sense to try to work with Sum if you give it as an argument a "summable" expression , so that what you get no longer has a head Sum. Mathematica knows no rules for transforming unevaluated expressions with head Sum, and the reason why it does not is simply that very few useful transformations could be done with such things in general. In fact all that can be done can be equally well done by working with a[n] an b[m] directly (say, by using the Einstein summation convention, as Paul Abbott has demonstrated on several occasions). Beside, note that there is also no simple way to transform: Integrate[f[x], x] + Integrate[g[x], x] to Integrate[f[x]+g[x],x]. (in fact, of course should there be such a function it ought to work also on Integrate[f[x], x] + Integrate[g[y], y] and the same for Sum ). On the other hand: In[8]:= Distribute[Integrate[f[x] + g[x], x]] Out[8]= Integrate[f[x], x] + Integrate[g[x], x] and of course: In[9]:= Distribute[Sum[a[n] + b[n], {n, 1, Infinity}]] Out[9]= Sum[a[n], {n, 1, Infinity}] + Sum[b[n], {n, 1, Infinity}] Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/ On Monday, June 16, 2003, at 04:56 PM, Eric Duault wrote: > Hello > > I looking for a way to transform an expression in the form > Sum[a[n], {n, 1, Infinity}] + Sum[b[n], {n, 1, Infinity}] > to : > Sum[a[n]+b[n], {n, 1, Infinity}] > where a[n] and b[n] are numerical. > > I tried quite a faw Mathematica fuctions, but none of the gives the > required > result. > There is still the possibility to define custom transformation rules, > but > Mathematica should provide a function for doing that. > > Thank you for your answer. > > > > > >