# Easier way to get exact sum/avr?

## Main Question or Discussion Point

Easier way to get exact sum/avr? [SOLVED, thanks awvvu]

Greetings,

First I will explain what I am trying to do.
I am trying to find the 'average' distance from the bottom and right edges of this box:
http://img174.imageshack.us/img174/8934/okvi7.jpg [Broken]

Basically (using 11 approximations)
What I am after for is equal to
1 + sqrt (1 + 0.1^2) + sqrt (1 + 0.2^2) + sqrt (1 + 0.3^2)
+ sqrt (1 + 0.4^2) + sqrt (1 + 0.5^2) + sqrt (1 + 0.6^2)
+ sqrt (1 + 0.8^2) + sqrt (1 + 0.8^2) + sqrt (1 + 0.9^2) + sqrt(2)
And then that divided by 11

I've used a nice messy excel spreadsheet to get this to 1000 approximations (1000 little 'slices') to get an average of 1.148001 and also using 5000 slices I get 1.147835

Basically as a summation what I _think_ I am looking for is (1000 slices):

$$\frac{1}{n} \sum_{n=1}^{1000} \sqrt{1^2 + (0.001n)^2}$$
(that right?)

And extended to an infinte amount of slices:

$$\lim_{k\rightarrow\infty} \frac{1}{k} \sum_{n=1}^{k} \sqrt{1^2 + (\frac{n}{k})^2}$$
(is this right/possible?)

What I am looking for is, using integration, or if it is do-able to evaluate that sum, to know if it is possible to get an 'exact' answer for the 'average' distance?
I imagine it would be very similar to the 1.1478 answer above, but I'm looking for more accuracy (basically to whatever precision the infinite sum gives) or if it just happens to equal a nice fraction for me (8/7 which is 1.14285...) or you know.. something nice and round

Thanks for reading, please let me know if you need any more info, or if I have gone wrong somewhere, or any hints to get me on the right track, etc.

Last edited by a moderator:

You can set it up as an integral.

Let's place the bottom-left corner of the square at the origin. The distance from the top-left corner to any x is $\sqrt{1+x^2}$. And we want to integrate from x = 0 to x = 1.

I stuck it into integrator and the antiderivative is $\frac{1}{2}(x \sqrt{1 + x^2} + arcsinh(x))$. Plugging in our limits gives $\frac{1}{2}(\sqrt{2} + arcsinh(1)) \approx 1.14779$. It's a pretty unexpected exact expression.

I think with some prodding, your sum can be turned into a Riemann sum and you'll get the same results as setting it up as an integral directly.

edit: The integral and final expression should be divided by its length (1) to find the average.

Last edited:
Thanks very much !
I knew there would be a simpler way through integrating than my messy summations.

Could I ask what you mean by "It's a pretty unexpected exact expression" ? (Just out of interest)

Thanks again