Re: Sum simplifying

• To: mathgroup at smc.vnet.net
• Subject: [mg89223] Re: [mg89200] Sum simplifying
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Fri, 30 May 2008 02:55:29 -0400 (EDT)

```sub = (Sum[a_. * x_ + y_., {k_, lower_, upper_}] /; FreeQ[a, k]) :>
a*Sum[x, {k, lower, upper}] + Sum[y, {k, lower, upper}];

expr = Sum[a[k]*I + b[k], {k, 1, n}] -
I*Sum[a[k], {k, 1, n}] - Sum[b[k], {k, 1, n}];

expr /. sub

0

Bob Hanlon

---- Lari <lari.jarvenpaa at luukku.com> wrote:
> Hey,
>
> I'd like to simplify a following type of sum:
>
> In[62]:= Sum[a[k]*I + b[k], {k, 1, n}] - I*Sum[a[k], {k, 1, n}] -
>  Sum[b[k], {k, 1, n}]
>
> In[63]:= FullSimplify[%]
>
> The result should obviously be zero; however, Mathematica returns the same expression. If I put n an integer value it knows how to simplify. How do I make it understand that also with a symbolic upper limit?
>
> Hope someone can help!
>
> Thanks,
> Lari
>

```

• Prev by Date: snippets
• Next by Date: Re: Exporting the output of GraphPlot
• Previous by thread: Sum simplifying
• Next by thread: Exporting the output of GraphPlot