       Re: Real sum gives complex result -> Bug in Mathematica?

• To: mathgroup at smc.vnet.net
• Subject: [mg44513] Re: [mg44493] Real sum gives complex result -> Bug in Mathematica?
• From: "Bruce W. Colletti" <bcolletti at compuserve.com>
• Date: Thu, 13 Nov 2003 02:27:04 -0500 (EST)
• References: <200311121301.IAA12534@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Two related issues regarding Input :

- Load result into X and run Simplify[X,Trig -> True].  This returns a
different expression that when hit with //N returns 4.44101 + 4.05328x10^15
I

- Strike the replacement rule and hardwire d=10. (note the decimal) and
n=100 to get 47.7141

Question for all:  why does Mathematica 5.0 (running under WinXP Home)
return these results?

Bruce

----- Original Message -----
From: "Norbert Schuch" <nsng0203 at web.de>
To: mathgroup at smc.vnet.net
Subject: [mg44513] [mg44493] Real sum gives complex result -> Bug in Mathematica?

> Hi,
>
> the following problems appears with Mathematica 4,0, 4.1, 4.2:
>
>
> | In:= Sum[Sin[Pi*k/n]*Sin[Pi*(k-d)/n],{k,d,n}]/.{d->10,n->100}//N
> |
> | Out= 39.4497 - 25.4353 I
> |
> | In:= Sum[Sin[Pi*k/n]*Sin[Pi*(k-d)/n],{k,d+1,n}]/.{d->10,n->100}//N
> |
> |                             -14
> | Out= 47.7141 - 6.11986 10    I
> |
> | In:= Sum[Sin[Pi*k/n]*Sin[Pi*(k-d)/n],{k,10,100}]/.{d->10,n->100}//N
> |
> | Out= 47.7141
>
>
> Output 2 and 3 are correct, while output 1 is complex although the sum
> is over real contributions! (The difference between 1 and 2 is zero, as
> the second sine vanishes.) What is the problem?
>
>
> Thanks, Norbert
>
>
>

```

• Prev by Date: RE: Readability confuses mathematica?
• Next by Date: Re: Q .wav import
• Previous by thread: Real sum gives complex result -> Bug in Mathematica?
• Next by thread: Making anti-aliased fonts work for 4.1 + KDE?