Re: Can it be done - easily?

• To: mathgroup at smc.vnet.net
• Subject: [mg13263] Re: Can it be done - easily?
• From: "Stephen P Luttrell" <luttrell at signal.dra.hmg.gb>
• Date: Fri, 17 Jul 1998 03:17:54 -0400
• Organization: Defence Evaluation and Research Agency
• References: <6od25q\$hn9@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```>Myself and two workmates are software developers.  One guy wanted a
>formula to calculate a result for the following equation...
>     Z = sum of X/Y where X is a fixed number, and Y ranges from A-B in
>fixed steps...
>     i.e... X=10000 ; Y=100,200,300...1000
>     i.e... Z= 10000/100 + 10000/200 + ... 10000/1000 =  292.896
>
>He and I tried to figure out a simple formula to calculate it, but
>couldn't. The third guy said it was *not* *possible* to derive a
>formula - we think he's wrong, but can't prove it.  MathCad can solve
>it in the blink of an eye, even if the value of Y ranges from 1 to 1e6
>in steps of 1 !!!
>
>Can anyone come up with a simple formula to give a reasonably accurate
>result?  It is too slow to actually divide X by Y for each value of Y
>as there may be 1000 or even 100,000 values of Y.

Matematica 3 takes the following input

Sum[1/n, {n, low, high}]

and converts it into the following output

PolyGamma[0,1+high]-PolyGamma[0,low]

and if you set low=1, high=10 you get 7381/2520 which approximates to
2.92897, which is in agreement with your result.

=================================================================

Stephen P Luttrell
Signal Processing and Imagery Department DERA Malvern, St.Andrew's Road
Malvern, United Kingdom, WR14 3PS

+44 (0)1684 894046 (tel)
+44 (0)1684 894384 (fax)
luttrell at signal.dera.gov.uk (email)
http://www.dera.gov.uk/cis5pip/Welcome.html (web)

```

• Prev by Date: Re: 3DGraphics color problem
• Next by Date: Re: Starting Sound in Mathematica for Windows
• Previous by thread: Re: Can it be done - easily?
• Next by thread: Re: Can it be done - easily?