As I was walking home from lunch today, burdened by thoughts of simulated annealing, and cross-entropy minimization, I happened to look down as I was crossing a bridge. And on the road below, a pair of boys, side by side, in matching uniforms and backpacks, looked to be walking toward school. But, right as I looked, a telephone pole stood right between us, blocking my few of the inner half of each boy – it looked like one boy, stretched to the point of absurdity. And yet still realistic. Then the moment passed.
I love moments like that. Tiny, fleeting things. Seeing the world, slightly skewed. I remember one time, riding my bike, coming up behind a bird sitting in the middle of the road. The bird took off, flying away from me. But, for a moment, my eyes fixed on his tail, and I imagine we hit the exact same velocity for that one second. It was like the entire world blurred away, leaving me and the bird moving as one. And then it was over.
And that has absolutely nothing to do with what I’d like to talk about today.
Consider the function frac(x). frac removes the integer part of x, leaving the fractional part. So frac(5.25) = 0.25. Of course, frac(0.25) = 0.25, as well. frac(pi) = pi – 3, giving the fractional part by just subtracting off the integer part. Clearly, frac(n) = 0, for any integer n. This becomes important.
For x from 0 to 10 looks like this,
The problem today is to evaluate the following integral.
I love naming constants F. F, for fox. There is supposedly a physicist who, in all his papers, names all his constants variations on ‘k’.
frac(1/x) looks like the following.
As x gets bigger, 1/x goes from one integer to the next faster and faster – hence the faster transitions in frac(1/x) seen as x goes to 0. But, can we calculate the area under these multitudinous curves? And is it anything nice at all?
And the answer is, interestingly – yes. The first step is to divide the curve up into more managable parts.
Just as with frac(x), there is a discontinuity every time 1/x is an integer – these discontinuities define each of the individual curves in the graph. We can thus break the integral around these discontinuities. Integrating for when 1/x is between 1 and 2, between 2 and 3, 3 and 4, etc. In each of these intervals, frac(1/x) is a continuous curve.
In terms of x then, this breaks the integral into the intervals 1/2 to 1, 1/3 to 1/2, 1/4 to 1/3, etc.
Thus, the first transformation of the integral is this.
So, let’s consider just the integral over one of the intervals.
What is frac(1/x) over one of these intervals? If int(x) is the integer part of a number, int(pi) = 3, for example, we have the relation that x = int(x) + frac(x). Or, in this case, 1/x = int(1/x) + frac(1/x). Over one of these intervals, 1/x goes from n to n+1, but the integer part of 1/x is simply n. We conveniently can ignore what happens exactly at the endpoints. This gives us, using the previous relation, 1/x = n + frac(1/x), or frac(1/x) = 1/x – n, which we can immediately put to good use.
So we get,
This by itself is relatively nice, but we can do better. Consider the partial summation,
We can then calculate F as the limit of FN, letting N go to infinity. But, expressing the partial sum, we can rearrange it in a nice way, noting the presence of a telescoping sum, and grouping the sums of reciprocals, in a nice way.
Note the addition of the 1+, to make the harmonic sum complete from 1 to N. Thus, jumping back to F, we have,
And … that’s pretty much all you can do. Except for one more very nice thing. As N goes to infinity, ln(N) and the harmonic sum to N become very close, their difference approaching a constant. This constant was first noticed, and given a name, a very long time ago – the Euler-Mascheroni Constant. I find it fascinating that ln(n) and the harmonic sum grow almost equivalently like that, and that constant has long been of interest to me, because I can never find a satisfying way of calculating it. But, this gives us
And this lets us bring everything together nicely,
An interesting calculation.
And now, I must study.


really glad to see you posting again
Comment by Foxfan — July 8, 2009 @ 10:12 pm