A Riemann Sum

One of my office-mates asked me an intuiging question today, one which neither of us could quite resolve. So I thought I’d post it here, and see if anybody had any comments for us.

Consider the integral \int_1^{b+1}\frac{1}{x}\, dx, whose value we know is \ln(b+1) by the Fundamental Theorem of Calculus. The question is: how to show this with Riemann sums.

Let’s set up the notation. Let f(x)=\frac{1}{x}. Consider partitioning the interval [1,b+1] into n intervals of equal width. The width of each sub-interval will be \Delta x=\frac{b}{n}, and the endpoints of the sub-intervals will be the x_i=1+\frac{b}{n}\cdot i for i=0,\ldots,n. Let’s use right endpoints to set up the Riemann sum (I think using left-, or mid-, points won’t be any better, but I could be mistaken), obtaining

\displaystyle \int_1^{b+1}\frac{1}{x}\, dx=\lim_{n\to\infty}\sum_{i=1}^{n}f(x_i)\Delta x=\lim_{n\to\infty}\sum_{i=1}^{n}\frac{1}{1+\frac{b}{n}\cdot i}\cdot \frac{b}{n}.

The question is, how to show that this limit is equal to \ln(b+1)?

The obvious thing to do seems to me to be first to multiply the two fractions together, obtaining the expression \frac{b}{n+bi}, and then perhaps factor out a b, writing the expression as \frac{1}{\frac{n}{b}+1}. Making a substitution, m=\frac{n}{b}, our limit becomes

\displaystyle \lim_{m\to\infty}\sum_{i=1}^{mb}\frac{1}{m+i}.

My next thought was to perhaps group the terms in these series in batches of m, say as

\displaystyle \sum_{i=1}^{mb}\frac{1}{m+i}=\sum_{d=1}^{b}\sum_{i=1}^{m}\frac{1}{dm+i}.

However, it’s not apparent to me that this has accomplished anything.

The only other thought I have had so far is to rewrite the sum as

\displaystyle \sum_{i=1}^{mb}\frac{1}{m+i}=\sum_{k=1}^{mb}\frac{1}{k}-\sum_{k=1}^{m}\frac{1}{k}.

We have thus re-written our sum as the difference of two partial sums for the harmonic series. I’m not sure what, exactly, this has gotten us, in terms of answering this question. Let H_n=\sum_{i=1}^{n}\frac{1}{i} be the n-th partial sum of the harmonic series. We have thus written

\displaystyle \int_1^{b+1}\frac{1}{x}\, dx=\lim_{m\to\infty}H_{m(b+1)}-H_{m}.

Of course, as the harmonic series diverges, this is, on the face of it, not a pleasant limit to consider.

One way we might cheat is to use the approximation H_n\approx \ln(n)+\gamma, where \gamma is the Euler-Mascheroni constant. Let’s ignore the fact that anything you say about this constant is probably intimately related to the fact that \int_1^t\frac{1}{x}\, dx=\ln(t). If we just blindly use this approximation, we do get the right answer, as H_{m(b+1)}-H_{m}\approx \ln(m(b+1))+\gamma-\ln(m)-\gamma=\ln(b+1).

As I think about this sum, I find it pretty interesting. If you think about bigger and bigger partial sums for the harmonic series, and keep subtracting an initial segment whose length is proportional to the number of terms, then you get (in the limit), natural logs. That’s kinda fascinating.

But anyway, anybody have any suggestions for us? I haven’t tried it, but perhaps it’s easier to see the area using trapezoids (or something?), instead of rectangles? Or is there some clever geometry trick one can apply first (or second?)? Perhaps a more convenient partition of the interval [1,b+1] makes the algebra more apparent?


Tags: , , , , ,

9 Responses to “A Riemann Sum”

  1. AC Ajaccio » Fractional order integrator Says:

    […] A Riemann Sum « Sumidiot's Blog […]

  2. Carnival of Mathematics #52 « The Number Warrior Says:

    […] that last post is well commented on, try Nick Hamblet’s question on Riemann sums that nobody has (as of this writing) […]

  3. Sune Kristian Jakobsen Says:

    Set y=\log(b+1), now we what to find \int_1^{e^y}\frac{1}{x}dx. Use the partitioning into intervals with equal length on the log-scale, that is: x_i=e^{y\frac{i}{n}}, and use the left endpoints.

  4. I’m in the Carnival! « Sumidiot’s Blog Says:

    […] in the Carnival! By sumidiot My post on a Riemann sum made the 52nd Carnival of […]

  5. Badal Says:

    While you are at it, you might as well try to find the integral of x^r for any r. Look at my post http://thesquaredcircle.wordpress.com/2009/04/11/fermats-integration-of-xr/
    Unfortunately, I have only posed the problem in this post and not found the time to write up a solution. But the solution will appear soon.

  6. Badal Says:

    Okay, solution posted!
    For the integral of x^r for r \in \mathbb{R}, check out my post at


  7. David Speyer Says:

    Write L(b) for \int_{1}^b dx/x, so we want to evaluate L(b) by Riemann sums.

    Using N rectangles, we get:

    L(ab) - L(a) = \lim_{N \to \infty} (a(b-1)/N) \sum_{i=1}^N 1/(a+ia(b-1)/N)

    Canceling the a‘s, we get
    L(ab) - L(a) = \lim_{N \to \infty} ((b-1)/N) \sum_{i=1}^N 1/(1+i(b-1)/N)

    But that right hand side is the Riemann sum for \int_{1}^b dx/x, so we have L(ab) - L(a) = L(b) or L(ab) = L(a) + L(b). This (plus continuity) shows that L is log to some base. To see that this base is e, note that L'(1) = 1.

  8. sumidiot Says:

    Awesome! Thanks all for the nice solutions. The solution suggested by Sune Kristian Jakobsen works out to be fairly similar to the one of Badal (nice historical notes in your posts!), and both are along the lines of what I was hoping to stumble upon. I also like David Speyer’s solution, avoiding the algebra as much as possible 🙂

  9. Shapes Vanish Before Your Eyes Illusion! | Insane Optical Illusions Says:

    […] A Riemann Sum […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: