Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: Simple Sum problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44514] Re: Simple Sum problem
  • From: "Peltio" <peltio at twilight.zone>
  • Date: Thu, 13 Nov 2003 02:27:05 -0500 (EST)
  • References: <botd3d$ck1$1@smc.vnet.net>
  • Reply-to: "Peltio" <peltioNOSP at Miname.com.invalid>
  • Sender: owner-wri-mathgroup at wolfram.com

"P.Z. Takacs" wrote

>I have an algebra Sum problem where I am trying to sum the product of
>two terms. The first term contains the index integer raised to various
>powers. The second term is an unspecified function identified by the
>index integer. A typical expression would be: Sum[a i^2 + en[i], {i,
>1, npts}] .

You might want to use the package Summa.m (you can find it in the mathsource
under 'typesetting' (!): search for Peltio or Infinite Sum Manipulation) to
do this with some ad hoc simplification commands. Suppose you have
expression expr given by

    expr=Sum[a i^2 + en[i], {i, 1, n}];

Once you download the package in a place accessibile to Mathematica, you load it
with

    <<Summa.m

You should turn all its Sum(s) into Summa objects, and then
just expand them with ExpandSum. After that you replace the Summa(s) with
Sum(s) to let mma act on whatever he can. This single line should do what
you want:

    ExpandSum[expr /. Sum->Summa] /. Summa->Sum

(This double substitution is rather cumbersome, but in version 2 of the
package - whose manual I can't find the time to update prior to upload it to
the mathsource - it is possible to enable and disable mma's Sum evaluation
at will and to use Sum instead of Summa objects, directly).

cheers,
Peltio
invalid address in reply-to - crafty munging required to mail me.




  • Prev by Date: Re: Q .wav import
  • Next by Date: Re: Readability confuses mathematica?
  • Previous by thread: Simple Sum problem
  • Next by thread: RE: Simple Sum problem