Re: NSum working on Re[ ]
- To: mathgroup at smc.vnet.net
- Subject: [mg42999] Re: [mg42953] NSum working on Re[ ]
- From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
- Date: Fri, 8 Aug 2003 00:26:16 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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
>
>
>
>
- Follow-Ups:
- Re: Re: NSum working on Re[ ]
- From: Peter Pein <peter1963@totalise.co.uk>
- Re: Re: NSum working on Re[ ]