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

Interesting integral

  1. Feb 19, 2005 #1
    An interesting integral appeared on a test that I took today. I had no idea how to solve it, and was wondering if any of you all could possibly help me

    \int_{0}^{1} \frac{1}{x}-floor(\frac{1}{x})

    we first had to draw the graph from 0 to 1, (which has a max of 1, a min of 0 (at 1/n for any integer n), with a negative slope at all points (more or less).

    then we had to describe the integrability...

    and finally, we were asked to evaluate the integral, noting that
    \gamma = \lim_{n->\infty} \sum_{n=1}^{\infty} \frac{1}{n} - \ln (n)

    I had no idea on what to do from here (besides the fact that there was probably going to be a substitution involving 1/x, so that the limits of integration are changed to 1-> infty)...

    ~dazed and confused
  2. jcsd
  3. Feb 19, 2005 #2
    that function [tex]\frac{1}{x}-\left[\frac{1}{x}\right][/tex] is called the gauss function or something like that. i guess i'd start by splitting the integrable into pieces & add up the separate integrals like this:

    [tex]\sum_{n=1}^{\infty}\int_{1/(n+1)}^{1/n} \left(\frac{1}{x}-\left[ \frac{1}{x}\right]\right) dx[/tex] i don't know how that helps though

    re: integrability it's riemann integrable because it's continuous almost everywhere (ie. it has a countable set of discontinuities). not sure if it's also lebesgue integrable but it is if [tex]\int_{[0,1]} \left(\frac{1}{x}-\left[ \frac{1}{x}\right]\right) dx < \infty[/tex]
    Last edited: Feb 19, 2005
  4. Feb 20, 2005 #3


    User Avatar
    Science Advisor
    Homework Helper

    I've been working on it too and come out with:

    [tex]\sum_{n=0}^{\infty}(\int_{1/(n+2)}^{1/(n+1)} \left(\frac{1}{x}-\left (n+1)\right\right)) dx[/tex]

    Solving, I get:


    This appears to converge but I can't prove it.
    Last edited: Feb 20, 2005
  5. Feb 20, 2005 #4


    User Avatar
    Science Advisor
    Homework Helper

    I think I have a proof for convergence:

    First express the sum as:

    [tex]\ln(2)-\frac{1}{2}+\sum_{n=1}^{\infty} ( \ln[\frac{n+2}{n+1}]-\frac{1}{n+2})[/tex]

    Now the Integral Test for convergence can be used by evaluating the following integral:


    The antiderivative is:


    Since this is [itex](\infty*0)[/itex] at the upper limit, I can express it as a quotient which has the indeterminate form [itex]\frac{0}{0}[/itex]. After differentiating, I get the limit of 1. Thus the series converges.

    Any comments?

    Attached Files:

    Last edited: Feb 20, 2005
  6. Feb 22, 2005 #5
    Well, I got another way to solve this, I hope it's correct, and i'm sorry to tell you (saltydog) the answer of your integral is not logic (0.189), the answer must be very near to 0.5 (less than 0.5 a little), we can see that from the graph

    if we studied the continuity of this integral we will find that it's verified only when we are from 1/(n+1) to 1/n while n is an integer, ok, what if we tried to make a sum using the mathematical induction (i don't know if it's named like that i'm not english), let's do this:

    [tex] \int_{\frac{1}{2}}^{1} (\frac{1}{x}-floor(\frac{1}{x})) dx = \int_{\frac{1}{2}}^{1}(\frac{1}{x}-1)dx[/tex]
    [tex] \int_{\frac{1}{3}}^{\frac{1}{2}}} (\frac{1}{x}-floor(\frac{1}{x})) dx = \int_{\frac{1}{3}}^{\frac{1}{2}}}(\frac{1}{x}-2)dx[/tex]
    [tex] \int_{\frac{1}{4}}^{\frac{1}{3}}} (\frac{1}{x}-floor(\frac{1}{x})) dx = \int_{\frac{1}{4}}^{\frac{1}{3}}}(\frac{1}{x}-3)dx[/tex]

    That will make the sum series:

    [tex]\gamma = \sum_{n=1}^{\infty} \int_{\frac{1}{n+1}}^{\frac{1}{n}}}(\frac{1}{x}-n)dx[/tex]

    [tex]\gamma = \sum_{n=1}^{\infty} ln(\frac{n+1}{n}) - 1 + \frac{n}{n+1} = 0.424[/tex]

    and the sum will equal approximately 0.424 which is the area under the curves and which is a logic answer,

    I'm just a second year physics student, can you discuss with me what a got? i've made all this with out studying anything about the definite integrals, i just know F(b) - F(a) from the indefinite integral?

    thanks for reading
  7. Feb 22, 2005 #6


    User Avatar
    Science Advisor
    Homework Helper

    I never gave a value for the integral. I only showed that it converged by showing it had a value for the upper limit. Perhaps I should have been more specific. However, the value of the integral does not help in evaluating the infinite sum. It's only a "test" to check for convergence. That's why I didn't stress it's value.

    I like your analysis of the sum. It's very similar to mine. I just started the index at 0 instead of 1.

    Mathematica reports the sum as 0.422784 but I suspect it does so numerically.
  8. Feb 24, 2005 #7
    I've calculated my and your sum using mathcad, do you mean the sum result (0.422784) is for your integral? or for mine? because i really got in mathcad the result 0.189

    and sorry if my language disturbed you :), I love the scientific discussions ;)

    with my regards, TheDestroyer
  9. Feb 25, 2005 #8


    User Avatar
    Science Advisor
    Homework Helper

    Hum, though I answered this yesterday. Anyway, the integral is not related to the sum. You know that right? Well, not directly, it's an approximate value. But really, it's only used as a test to determine if the sum converges. I didn't fully evaluate the integral. Perhaps I should have. However, I just wanted to see if the integral converged. If it did, that's all I needed to know to prove that the sum converged. The value of 0.422784 is for the infinite sum (not the integral) as reported by Mathematica.
  10. Oct 26, 2011 #9
    Well six years late for the discussion ( I Googled 'interesting integrals' out of boredom ) but really, what in the Platonic realm does the original sum mean? In the infinite series, the limit as nā†’āˆž has already been taken, so the additional limit makes no sense at all... there were a number of enthusiastic responses that completely ignored this ambiguity.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook