MathGroup Archive 2005

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

Search the Archive

Re: Sum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55215] Re: Sum
  • From: "Ofek Shilon" <ofek at simbionix.com>
  • Date: Thu, 17 Mar 2005 03:28:33 -0500 (EST)
  • References: <d192qe$ng4$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I believe the answer lies in an innocent looking line in the
Mathematica book, under "Sum":
"If a sum cannot be carried out explicitly by adding up a finite number
of terms, Sum will attempt to find a symbolic result. In this case, f
is first evaluated symbolically. "
(f refers to the syntax Sum[f, {i, a}]).    i.e., when the Sum cannot
be converted to Plus, f (your x) is evaluated BEFORE the iterator
variable i (your k). Thus, x is converted to the form Exp[-k] first,
and is not affected by the "change" in k - in an infinite sum, the
iterator does not really iterates \inf times.

an easy workaround is to define the k-dependence explicitly:

x[k_]:= Exp[-k]
Sum[x, {k, 0, Infinity}]

- works fine  in Mathematica 5.1.0 on windows. no need to copy/paste
long expressions, just add the index dependence as above.


  • Follow-Ups:
  • Prev by Date: functional programming excercise from Mastering Mathematica
  • Next by Date: using mathematica over the internet
  • Previous by thread: Re: Sum
  • Next by thread: Re: Re: Sum