       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:= \$Version

Out= "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:= A = x^(i - n) (x^(i - n) (1 - r x^n) - s);
> A == Expand[A] // Simplify
>
> Out= True
>
> In:= Sum[A, {i, 0, n - 1}]
>
> Out= (x^(-2 n) (-1 + x^(2 n)))/(-1 + x^2)
>
> In:= Sum[Expand[A], {i, 0, n - 1}] // FullSimplify
>
> Out= -((
>  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?