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

Converting sums to integrals

  1. Mar 9, 2007 #1
    Hi guys,

    I'm working on a project at the moment where I want to convert a sum to an integral but I am out of ideas. Basically I have something like:

    Sum over h: [f(h+0.5dh)]^(-1) - [f(h-0.5dh)]^(-1)

    where h goes from 0 to H.

    Any tips would be appreciated!
  2. jcsd
  3. Mar 9, 2007 #2
    You can't sum that?

  4. Mar 9, 2007 #3
    I can sum it, yes. But I want the expression as an integral.
  5. Mar 9, 2007 #4
    Ok yes, I tried to change it a bit to make it easier to post it. I have attached the mathematica notebook of the expression since I don't get on with latex. In the expression, I know the function f, which is only a function of one thing. Everything in the expression is a constant except j, which is the integer I am adding over.

    Attached Files:

  6. Mar 9, 2007 #5
    This sounds like an assignment of some kind, why would you want to express the sum as an integral?

    The only thing I can think of is working backwards to a contour integral starting from the idea that this is a sum of the residues of some function.
  7. Mar 9, 2007 #6
    The motivation for expressing it as an integral is that by using the sum, even by increasing the numbers of terms to say 1E6, the accuracy is still obviously not perfect. But an integration would give perfect precision. As I increase the number of terms in my sum, I am taking thinner and thinner slices and so the limit should be when the slices have thickness dh.

    I can do the problem with the sum but it takes a lot of time to do 1E6 operations (around 4 minutes) and I think the integration will be nearly instantaneous.
  8. Mar 9, 2007 #7


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    What you need to post is a well formated statement of your problem. I really cannot make heads or tails of what you have written. Read how to post equations
  9. Mar 10, 2007 #8

    Tom Mattson

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Let's get this into LaTeX.

    Is this it?


    I want to make sure that the "-1" exponents don't actually refer to inverse functions.
    Last edited: Mar 10, 2007
  10. Mar 10, 2007 #9
    In the Mathematica notebook this is what he included:

    [tex]\sum _{j=1}^N \sin ^{-1}\left(\frac{20
    \eta }{\left(\frac{H j}{N}+10\right)
    ^{-1}\left(\frac{20 \eta
    }{\left(\frac{H j}{N}+10\right)

    Which is nothing like what has appeared in the forum! By the way natski, look up the function TeXForm in Mathematica.

    Natski, four minutes is really slow for doing the sum. Why don't you post for me the notebook where you calculate the sum? I will speed it up to be practical and efficient.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Converting sums to integrals
  1. Sum and integral (Replies: 2)