Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Skipping Elements in Sum

  • To: mathgroup at
  • Subject: [mg61160] Re: Skipping Elements in Sum
  • From: "Jens-Peer Kuska" <kuska at>
  • Date: Tue, 11 Oct 2005 04:49:56 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <did35k$qh9$> <difr6v$fe8$>
  • Sender: owner-wri-mathgroup at


the main problem with


ist that a[i,j] in many physical applications 
a singularity and Mathematica try to evaluate 
before it find out that the term 
In the worst case it get 0*Infinity and don't know 
to do with it.


"Richard J. Fateman" <fateman at> 
schrieb im Newsbeitrag 
news:difr6v$fe8$1 at
| Sum[a[i],{i,low,j-1}]+Sum[a[i],{i,j+1,high}] may 
be far more
| useful in many ways, since you can tell how many 
elements there
| are:    if low<j<high then  high-low else 
high-low+1  and
| other useful symbolic info.
| Symbolically manipulating objects with holes 
shot in them with
| Delta functions is not so easy or reliable.
| If all you want to do is add them, you can use a 
For loop and
| subtract the excluded elements, but that's not 
what you asked.
| You could try asking a more specific question 
about what you
| really want to do with Sum.
| Bill Rowe wrote:
| > On 10/9/05 at 1:36 AM, qcadesigner at 
| >
| >
| >>Does anyone know how to skip elements using 
the mathematica sum?
| >>e.g. take the sum of all i, where i not equal 
to j.
| >
| >
| > Yes.
| >
| > One way to do this with the Sum function would 
be to use the KroneckerDelta function as follows:
| >
| > Sum[Subscript[a, n](1 - KroneckerDelta[n, 3]), 
{n, 5}]
| >
| > Another way to create the same sum would be
| >
| > Total[Table[Subscript[a, n], {n, 
| >     Range[5], {3}]]]]
| >
| > and there are many other ways to achieve the 
same result. Which is best depends on exactly what 
you are trying to accomplish.
| > --
| > To reply via email subtract one hundred and 
| >

  • Prev by Date: Re: Problem with circles in complex plane
  • Next by Date: Re: Problem with circles in complex plane
  • Previous by thread: Re: Re: Skipping Elements in Sum
  • Next by thread: Re: Re: Skipping Elements in Sum