MathGroup Archive 2005

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

Search the Archive

Re: Simple Sum does not simplify

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55578] Re: Simple Sum does not simplify
  • From: "Peltio" <peltio at trilight.zone>
  • Date: Wed, 30 Mar 2005 03:21:15 -0500 (EST)
  • References: <d20ql0$b6l$1@smc.vnet.net>
  • Reply-to: "Peltio" <peltioNOSPAM at despammed.com.invalid>
  • Sender: owner-wri-mathgroup at wolfram.com

"Alix" ha scritto

>Here is a simple symbolic sum:
>
>Sum[n a[i] - Sum[a[j], {j, n}], {i, n}]
>
>This should simplify to 0, but it doesn't. Why and is there a way to
>get mathematica to work with these kind of sums?

As long as you nest 'one dimensional separable' sums, you could try to use
the simplification routines of Summa.m, a small package available on the
mathsource:
http://library.wolfram.com/infocenter/MathSource/3336/
that overrides automatic evaluation of sums by means of a new object, named
Summa, over which the user has more control. Summa objects are displayed as
ordinary Sums are, and can be manipulated without the intrusion of Mathematica's
evaluator trying to change them on its own. From version 2 of the
package, the user can choose to switch off ordinary Sum evaluation and let
the package transparently replace ordinary Sums with Summas.
The package was designed with simple one-dimensional sums in mind, but with
due care certain simplification procedures can be applied to particular
cases of nested sums (namely, those whose summands are can be separated
into a product of functions depending each on a single index).

In your particular case you just need the SumExpand function to carry the
index independent factors out of the inner sum, and a change of the name of
the second index. This is what you should see with Summa version 2.x:

    <<Summa.m
    Sum[n a[k] - Sum[a[j], {j, 1, n}], {k, 1, n}] // SumExpand

        n*Sum[a[k], {k, 1, n}] - (Sum[a[j], {j, 1, n}] * Sum[1, {k, 1, n}])

    EnableSumEvaluation [% /. j -> k]

        0

cheers,
Peltio

PS
I thought I had already uploaded version 2.x on the mathsource, but it seems
this is not true. I remember that there still was a problem with Coefficient
under different version of Mathematica I had never find the time to solve. Since I
don't know when I'll have the time to do that, I will upload package 2.4
and related notebooks tomorrow. It has changed a lot from version 1.x and
Coefficient is used only in marginal procedures.



  • Prev by Date: Re: Simplifying ArcTan
  • Next by Date: Re: Unicode Support
  • Previous by thread: Re: Simple Sum does not simplify
  • Next by thread: MD5 Brain teaser