MathGroup Archive 1998

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

Search the Archive

Re: My own sum

  • To:
  • Subject: [mg11101] Re: My own sum
  • From: Daniel Lichtblau <>
  • Date: Sun, 22 Feb 1998 14:55:27 -0500
  • Organization: Wolfram Research, Inc.
  • References: <6cakf2$>

Thomas Lemm wrote:
> I want to implement another type of Sum to treat expressions in a
> "physical" manner. But I need to know how Mathematica tackles the
> Problem:
> Sum[F[x],{x,-a,a}]==Sum[F[y],{y,-a,a}]
> Help welcome
> Thomas Lemm

Not sure exactly what you have in mind, but if you want to just have
dummy summation variables replaced by a standard variable, call it
'local', you could do as below.

In[10]:= mySum[a_,{x_,y_,z_}] := Block[{local},
        ReleaseHold[Hold[Sum[a, {local,y,z}]] /. x->local]]

In[11]:= mySum[F[x],{x,-a,a}]
Out[11]= Sum[F[local], {local, -a, a}]

In[12]:=  mySum[F[x],{x,-a,a}]==mySum[F[y],{y,-a,a}] Out[12]= True

If you do this it would be a good idea not to use the symbol 'local'
elsewhere in your code.

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Re: typesetting problem in Mathematica3 / NT
  • Next by Date: Help
  • Prev by thread: Re: Re: My own sum
  • Next by thread: Block diagonalisation of matrices