Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: error with Sum and Infinity

  • To: mathgroup at
  • Subject: [mg102387] Re: error with Sum and Infinity
  • From: Richard Fateman <fateman at>
  • Date: Fri, 7 Aug 2009 05:32:31 -0400 (EDT)
  • References: <h5bk64$hlm$>

Bill Rowe wrote:

> Suppose Mathematica had functions SumA and SumB per your
> description above. 

Perhaps the distinction would be clearer if one of those "functions" was 
written like this  [I know this is not Mathematica-like, but bear with me just a 

by analogy with

For i=1 to n step 1 do ( ) end

allow something like this.

For i=1 to n step 1 sumup 1/i end

perhaps Mathematica-ishly,  DoSum[1/i, {i,n,1}]   but that does not make the 
distinction between programming construct and "function" very clear.
This is, of course, a major hazard with Mathematica as well as its competitors.

I don't know how exactly to characterize a "new user" but a 
mathematician unfamiliar with computer programming would have a rather 
different understanding of the term "function" which you use below and 
that is worth considering.

Now instead of a new user asking why Sum
> doesn't return 1 when infinitely many terms exist, you will get
> questions as to why SumB cannot deal with a finite number of
> terms 

There is no reason for the more general symbolic summation to fail on a 
finite number of terms.  It can do "definite summation" (compare to 
"definite integration") if the summand is a "pure expression". Or it can 
just add up the terms.

or the same question when SumA fails to work as the user
> is expecting.

I don't know what the user would expect from

For i=1 to Infinity sumup  1/i

> It does not help clarify things to add a new function with a
> different name for new users.

  I disagree here.  In particular it would force the people documenting 
the "functions" to make a clear distinction.

> In fact, it is more likely to
> cause confusion since you would now have two things with similar
> names that don't behave the same. And if the two names were not
> similar, you almost certainly ensure a new user will not find
> the one with the less intuitive name.

Instead you have one thing (Sum) that does two different things. 
Appropriate documentation or even error messages would help.

How do you feel about Integrate and NIntegrate, Sum, NSum?

> And for the more experienced/knowledgeable user there is no
> advantage to what you propose over the way things are now.

Well, see Elton TeKolste's remarkable post.
I doubt that the "feature" he illustrates would be known even by most 
experienced users.


  • Prev by Date: Re: Linear Interpolation problems
  • Next by Date: Re: A Sum-like notation for iteration
  • Previous by thread: Re: Re: Re: error with Sum and Infinity
  • Next by thread: Re: Re: error with Sum and Infinity