Re: Re: NSum working on Re[ ]
- To: mathgroup at smc.vnet.net
- Subject: [mg43036] Re: [mg42999] Re: [mg42953] NSum working on Re[ ]
- From: Peter Pein <peter1963 at totalise.co.uk>
- Date: Sat, 9 Aug 2003 02:57:36 -0400 (EDT)
- References: <200308080426.AAA05523@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Andrzej and Mathijs,
if you evaluate Sum[Sqrt[k+I],{k,1,n}], you'll see that
Re[Zeta[-1/2,1+I]-Zeta[-1/2,1+I+n]] will give you, what you want.
I didn't experience any problems with this expression regarding n.
Peter
Andrzej Kozlowski wrote:
> This is a curious problem as
>
>
> NSum[Re[Sqrt[n + I]], {n, 1, 24}]
>
> 80.879
>
> works fine but
>
> In[270]:=
> NSum[Re[Sqrt[n + I]], {n, 1, 25}]
>
> gives the error message about the derivative or Re[...] at n= 16 (!)
>
> However, you can avoid this problem by using simply:
>
>
> Re[NSum[Sqrt[n + I], {n, 1, 100}]]
>
> 671.734
>
> Andrzej Kozlowski
> Yokohama, Japan
> http://www.mimuw.edu.pl/~akoz/
> http://platon.c.u-tokyo.ac.jp/andrzej/
>
>
> On Wednesday, August 6, 2003, at 09:16 AM, Mathijs Romans wrote:
>
>
>>I have problems applying NSum to a function that involves Re and Im,
>>for
>>example:
>>
>>ff[n_] := Re[Sqrt[n + I]];
>>NSum[ff[n], {n, 1, 100}]
>>
>>Mathematica (4.2.0.0) gives an error because it does not know the
>>derivative of the Re-function. It wrongly assumes the chain-rule can be
>>applied: D[Re[f[x]],x] = Re'[f[x]]f'[x].
>>
>>In this case of course I can circumvent the problem, but I have a
>>though
>>calculation, and hope that is possible to set the derivative of a
>>general function Re[f[x]] correct, so an infinite numerical summation
>>becomes possible. Anybody knows any solutions? - Thanks
>>
>>
>>
>>
>
>
>
- References:
- Re: NSum working on Re[ ]
- From: Andrzej Kozlowski <andrzej@platon.c.u-tokyo.ac.jp>
- Re: NSum working on Re[ ]