Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Easier way to get exact sum/avr?

  1. Mar 30, 2008 #1
    Easier way to get exact sum/avr? [SOLVED, thanks awvvu]


    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:

    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):

    [tex]\frac{1}{n} \sum_{n=1}^{1000} \sqrt{1^2 + (0.001n)^2} [/tex]
    (that right?)

    And extended to an infinte amount of slices:

    [tex]\lim_{k\rightarrow\infty} \frac{1}{k} \sum_{n=1}^{k} \sqrt{1^2 + (\frac{n}{k})^2} [/tex]
    (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: Mar 31, 2008
  2. jcsd
  3. Mar 30, 2008 #2
    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 [itex]\sqrt{1+x^2}[/itex]. And we want to integrate from x = 0 to x = 1.

    I stuck it into integrator and the antiderivative is [itex]\frac{1}{2}(x \sqrt{1 + x^2} + arcsinh(x))[/itex]. Plugging in our limits gives [itex]\frac{1}{2}(\sqrt{2} + arcsinh(1)) \approx 1.14779[/itex]. 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: Mar 30, 2008
  4. Mar 31, 2008 #3
    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
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Easier way to get exact sum/avr?