The idea for this post came from a question I saw in a math help forum about improper integrals. While this problem has a very simple solution using basic tools in integral calculus, I want to show a more geometric approach which can be generalized much further (and for the Hebrew speakers among you, I made a video explaining this as well here ).

Without the extra noise added by the original person who wrote this question, it eventually comes down to the following. One of the first improper integrals that we all learn about is

The proof is quite simple: we know that the integral of is so that the integral above is . Geometrically, this means that the area below the graph of the function is infinite:

Things start to become more interesting when we multiply the integrand by and . In these cases we get the areas of the following graphs:

Using our geometric intuition, in the first integral where we multiply by , we get positive and negative areas alternatively, so a lot of it cancels away, and we might hope that the total area converge to some finite number. On the other hand, when multiplying by , it seems that the new area is at least half of the original area, and since the original area is infinite, half of it would also infinite as well.

Both of these claims can be proven quite easily. For the first one, we use integration by parts (integrating and taking the derivative of ) to get that

.

The first part is just . The second term is also finite since it is absolutely convergent:

.

Since both terms are finite, then so is the integral.

For the second integral, we use some trigonometric identities and inequalities to get that

So now we have that

.

The first term above is infinite (and to connect it to our intuition, it is “half” of the infinity of ), and the second part is finite (the proof uses the same argument that we had in the previous case). So all in all it is .

While these are two lines proofs that use very basic tools from integral calculus, it is very hard to see how the geometric intuition comes into play here. Where did we use the area canceling intuition in the first case, or that two copies of the area cover the original blue area in the second case?

More over, in the geometric intuition, it is very easy to see that it still works when we take other functions “similar” to , where we don’t know their integral\derivative, and function “similar” to . For example:

Here in the red is a periodic nonnegative function (like ), is the blue function, and the orange area is the product of . Looking at the image, it seems that the orange area is around of the original blue area. So if the blue area is infinite, then so is the orange area.

My goal in this post is to try and understand the geometric side of this problem and find simple conditions that make our intuition comes true. Here I will focus only on the second integral (with the absolute function), and will leave the first type as an exercise.

Before moving on, let me remark that multiplying by and taking the integral is quite an important operation, which is closely related to the subject of Fourier transforms. However, this is a more advanced material which is usually not seen when we first learn about improper integrals. Second, a general setting of this problem when multiplying by $\sin(x)$ (without the absolute value) is many times solved using what is called Dirichlet’s test, and I will talk a little bit about it in the end of this post.

## The intuition

Let us first try to attach our intuition some general idea of a proof. Consider the following picture using the example from above:

We know that the original light blue area is infinity, and if we can show that the new orange area is at least of it, then it is infinite as well. For that, we look on the first “bump” of area in (full) orange of the new function, and the first “missing” area in (full) blue that is not covered with the new function. If we can trust our eyes, then it seems that two copies of the orange area will cover the blue area.

We should note two points that make this covering argument work, even without knowing too much information about the function . First, the blue missing area cannot be too wide, because is periodic, so that the width of this blue area is bounded. Second, the blue area cannot be too high compared to the orange, because our blue function is monotonically decreasing.

We can repeat this argument for each of the bumps of area, to get that 3 copies of the orange area cover almost all of the original area, except a finite area in the beginning. This will ensure that the new area is infinite as well.

The problem now is that in the end we actually need to formalize this notion, and we cannot rely on only eyesight. In order to do that, let’s try to simplify our red function .

Remark: If you really want to prove the original problem with using this intuition, then note that (1) is in a sense a shift right of , and (2) we have that , so in a sense, each of these cover half of the area. What we want to do is generalize this notion without using trigonometric identities (because in general our functions will not be trigonometric functions!).

## The simplification step

For that, suppose that we can find a new function such that so that

.

It will then be enough to show that the second integral is infinite, and if we choose to be simple enough, we might even be able to do this. The best that we can hope is for to be constant, but the only nonnegative constant function smaller than is the zero function, which doesn’t help us. However, we can find such a which is piece wise constant:

Note that our intuition from before, namely that finitely many copies of the orange area “bumps” cover the original blue function still holds for the new function .

Before we continue, let us ask what conditions do we need for a general so that we can find such a function which is nonzero, piece wise constant and of course periodic.

Since in itself is periodic for some period , then we only need to define on the first period of (namely in ) and then extend it periodically (so that ). Next, since in itself is nonzero, then we can find some where , and for simplicity of notation assume that . Finally, if we assume that is also continuous, then there is some small enough so that if . We can now define to be

.

To conclude, if is periodic, nonnegative and strictly positive in some points, and finally continuous at these points, then there is such a function which is periodic, nonzero and piece wise constant.

Now we need to prove our claim that the orange area is infinite, but for the much simpler function which only has two values, and in our case these values are and . Just to make the computations even more simple, let’s define , so that only has two values 0 and 1, and we are left to show that the integral

.

A function which only has the two values 0 and 1 is called a characteristic function – namely the function characterizes the set on which it is 1.

## Proving for characteristic functions

Now that we reduced our problem to a characteristic function, we have the following image of the area:

Since the function is a very simple function, it is really easy to see that our intuition from before works. Namely, two more copies of the orange area will cover almost all of the light blue area, and we are left with a finite area in the beginning:

It follows that the blue area is smaller that the yellow (finite) area + the orange area, or alternatively the orange area is at least of the blue area minus the yellow area, so that it is at least , which completes our proof.

## Formalization

Now that we have seen the idea of this geometric proof, we want to write it down formally. We begin by giving the conditions for the (blue) function and the (red) function which we used during the proof so far.

Note that usually at this point, the conditions are more guesses than actually the “right” conditions. Usually these conditions are changed during the formalization process if we see that maybe they are not enough, or alternatively if we can ask for less and still get the result we wants.

For it seems that we needed:

- ,
- (monotonic decreasing to zero), and
- .

For the red function we needed that

- is periodic (and we denote the period by ),
- , and
- there is some point where and is continuous at that point.

In general, we need to require both functions to be integrable, since otherwise we have nothing to talk about, but if you are not comfortable with this condition, you may assume that both are piecewise continuous. We want to show that given these conditions, we have that

.

### Normalizing

In our proof sketch above, our first step was to simplify and build . Instead of using the exact way we showed above, I want to first try to simplify our notations and get rid of the constants and . You can prove this without this step, but this step is usually very helpful both when proving some result, and when reading someone’s else proof, because we don’t need to carry around these constants everywhere.

First, to get rid of , note that the integral on the segment is always finite, and doesn’t affect our result (It was the yellow area above). Since

,

we may restrict our attention to the part . Finally, setting and we have that

.

The new functions satisfy the conditions that we wanted from and further more we now have that and it is continuous there. Thus, in our proof we may assume that .

Next, to get rid of and we define the new functions and . The multiplication by just stretches the graph of by a factor of in the direction. In particular we get that . Next, the multiplication by stretch similarly in the direction so we get that

,

or in other words is 1-periodic. Finally, our integral is

,

so our new integral is infinity if and only if the previous integral is infinity.

To summarize, using these reduction steps, we may assume that we have as above, and in addition and .

### Construction and

Let be a large enough integer so that implies that (and we can find such since is continuous and ). We define in to be

,

and extend this definition to all of the real line by making 1-periodic, namely . Finally, define .

We can also write a more direct definition. Given a number , we write to be its fractional part (so for example ). With this notation we get that

.

By construction, we have that , so that

,

and we are left to show that the last integral is infinite.

### The covering argument

Up until now we only used the conditions on , and now we will use the conditions on . Using the fact that is monotonic decreasing, we get that for any we have that . Because is nonnegative we conclude that

.

These integrals are going to be the red copies that we added in the proof idea above.

You should now check that just moves the graph of to the right at distance , and if , then we can formally write it as

.

(EX: What happens when ?)

In particular, we have that is the constant function 1. We now have that

.

But is of course some (finite) integer, so we get that

,

which is exactly what we want to show, thus completing the proof.

## Final thoughts and remarks

At this point, after you read and understood both of the sketch of the proof and the proof itself, you should make sure that you know which part of the formalization correspond to which part of the sketch. Moreover, you should try to think how the step in the sketch led eventually to the formal step, because in the end this is what you want to be able to do by yourself.

Now that we have the formal proof, we can ask what else can we do with our new geometric approach. For example, can we weaken the conditions needed for and ? As an exercise, you should show that doesn’t have to be periodic. Indeed, the only place that we really needed it is in the covering argument, where we wanted to show that the orange “bump” can cover the blue “missing area”, and the periodicity meant that the the blue area is not too wide. So if we can say that the “bumps” cannot be too far away from each other, then the proof should still work. Of course, now the question is how to formalize it.

Secondly, here we used the approach where we simplify , but we can also do it with . Can you find a way to construct new function which is piecewise constant and ? If you can do it, then using the inequality , it is enough to prove that the second integral is infinite. If you can also make sure that is constant on the periods of , namely constant in each , then you will again get a very simple expression.

Finally, here we tried to generalize the result saying that . Try to do a similar generalization for the fact that converge.

This last exercise where we remove the absolute value is a very specific case of Dirichlet’s test. While in the proof here we only used the periodicity of , in this case our intuition was that we have both positive and negative areas which have cancellations, so we need a little extra. When the periodic function is , then we get this for free because for every positive wave (namely ) we have a negative wave (namely ) which have the exact same area. In particular, the integral , so that for all . This is a good condition to start with. However, if we change a “little bit” our periodic function, we might still hope this result to hold, and indeed, in Dirichlet’s test this condition changes to is uniformly bounded, instead of being the zero function.