MathGroup Archive 2010

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

Search the Archive

Re: Bug in Sum?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109142] Re: Bug in Sum?
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Mon, 19 Apr 2010 04:10:43 -0400 (EDT)
  • References: <hq0mqo$k1b$1@smc.vnet.net>

Abhishek,

I don't seem to be able to reproduce your bug. For Sum A I get:

-((x^(-2 n) (-1 + x^n) (-1 - x^n + r x^n + s x^n + r x^(2 n) +
    s x^(1 + n)))/(-1 + x^2))

which depends on r and s.
Same result for Expand[A].

In[6]:= $Version

Out[6]= "7.0 for Microsoft Windows (32-bit) (February 18, 2009)"

Cheers -- Sjoerd

On Apr 13, 5:01 am, gopher <gopherg... at gmail.com> wrote:
> In the following, A and Expand[A] give different answers after when
> summed (a finite geometric series.) The result of summing A is clearly
> wrong, since it is independent of the parameters r and s.
>
> Abhishek
>
> In[44]:= A = x^(i - n) (x^(i - n) (1 - r x^n) - s);
> A == Expand[A] // Simplify
>
> Out[45]= True
>
> In[46]:= Sum[A, {i, 0, n - 1}]
>
> Out[46]= (x^(-2 n) (-1 + x^(2 n)))/(-1 + x^2)
>
> In[47]:= Sum[Expand[A], {i, 0, n - 1}] // FullSimplify
>
> Out[47]= -((
>  x^(-2 n) (-1 + x^n) (-1 + x^n (-1 + r + s + s x + r x^n)))/(-1 + x^2)
>  )



  • Prev by Date: Re: Bug in Sum?
  • Next by Date: Re: Bug in Sum?
  • Previous by thread: Re: Bug in Sum?
  • Next by thread: Re: Bug in Sum?