Re: How is it possible to factor Sum[a]+Sum[b] to Sum[a+b] ?
- To: mathgroup at smc.vnet.net
- Subject: [mg42044] Re: How is it possible to factor Sum[a]+Sum[b] to Sum[a+b] ?
- From: "Steve Luttrell" <luttrell at _removemefirst_westmal.demon.co.uk>
- Date: Tue, 17 Jun 2003 05:43:29 -0400 (EDT)
- References: <bcjtid$hn3$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
This will will define the property you need:
Unprotect[Sum];
Sum /: Sum[a_[n_], {n_, 1, Infinity}] + Sum[b_[n_], {n_, 1, Infinity}] :=
Sum[a[n] + b[n], {n, 1, Infinity}];
Protect[Sum];
You could make more a general definition if you want to widen the scope of
the transformation rule.
--
Steve Luttrell
West Malvern, UK
"Eric Duault" <eduault at yahoo.com> wrote in message
news:bcjtid$hn3$1 at smc.vnet.net...
> 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.
>
>
>
>