[Date Index]
[Thread Index]
[Author Index]
Re: real telescopic sum becomes complex?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg54449] Re: [mg54358] real telescopic sum becomes complex?
*From*: DrBob <drbob at bigfoot.com>
*Date*: Sun, 20 Feb 2005 00:10:58 -0500 (EST)
*References*: <200502190732.CAA06051@smc.vnet.net>
*Reply-to*: drbob at bigfoot.com
*Sender*: owner-wri-mathgroup at wolfram.com
Version 5.1 does somewhat better:
telesum[n_] := Sum[Sqrt[k] - Sqrt[k - 1], {k, 1, n}]
telesum[5]
telesum[n]
% /. n -> 5
Sqrt[5]
-HarmonicNumber[-1 + n, -(1/2)] + HarmonicNumber[n, -(1/2)]
Sqrt[5]
Sum still makes plenty of mistakes, so always sanity-check the results.
Bobby
On Sat, 19 Feb 2005 02:32:02 -0500 (EST), Peter Pein <petsie at arcor.de> wrote:
> Dear Group,
>
> I'v only got the old version 4.0 of Mathematica and I would like to know
> whether later versions do the same mistake:
>
> In[1]:=
> {$Version, $ProcessorType}
> Out[1]=
> {"4.0 for Microsoft Windows (July 16, 1999)", "x86"}
> In[2]:=
> telesum[n_] := Sum[Sqrt[k] - Sqrt[k - 1], {k, 1, n}]
> In[3]:=
> telesum[5]
> Out[3]=
> Sqrt[5]
> OK - but:
> In[4]:=
> telesum[n]
> Out[4]=
> HarmonicNumber[n, -(1/2)] +
> I*(Zeta[-(1/2)] - Zeta[-(1/2), 1 - n])
> In[5]:=
> % /. n -> 5
> Out[5]=
> 3 + Sqrt[2] + Sqrt[3] + Sqrt[5] +
> I*(Zeta[-(1/2)] - Zeta[-(1/2), -4])
> In[6]:=
> N[%]
> Out[6]=
> 8.382332347441762 - 6.146264369941973*I
>
> (please note, that Re[%]+Im[%]==Sqrt[5.]!!!)
>
> Has anyone got an explanation, what could have happened inside
> Mathematica to get this nonsense?
>
> Thanks in advance,
> Peter
>
--
DrBob at bigfoot.com
www.eclecticdreams.net
Prev by Date:
**Re: Question about an integral**
Next by Date:
**Re: Re: Why does Inverse[M] hesitate?**
Previous by thread:
**real telescopic sum becomes complex?**
Next by thread:
**Re: real telescopic sum becomes complex?**
| |