Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Prove there exists a function $f$ such that $$\int_1^{\infty}f(x)\,dx\text{ converges, but }\int_1^{\infty}|f(x)|\,dx\text{ diverges.}$$

Similarly, prove that there exists a function $g$ such that $$\int_0^1 g(x)\,dx\text{ converges, but }\int_0^1|g(x)|\,dx\text{ diverges.}$$

All I am able to understand in the first part, is to take an example. I am thinking of something like $(1/2)^n$? I am not sure how to account for the absolute values, and when they say prove, can I just find an example only? I am having trouble of thinking of such a function.

share|cite|improve this question
"Prove" in this context means "find an example and prove that it works." What do you know about the conditional convergence of alternating series? – Qiaochu Yuan Apr 24 '11 at 0:45

Hint: for the first part, think of the series $\log 2=1-\frac{1}{2}+\frac{1}{3}-\ldots$. It converges (and we know to what) but taking the absolute value of each term yields the harmonic series $1+\frac{1}{2}+\frac{1}{3}+\ldots$ which diverges. Can you turn that into an integral? Yes, one way to prove something exists is to exhibit it. For the second part, informally $0=\frac{1}{\infty}$, so maybe you can transform your $f$ in some way to get $g$.

Added: Try $f(x)=\frac{(-1)^{\lfloor x+1 \rfloor}}{\lfloor x \rfloor}$ (I missed some formatting in the comment). If you integrate this from $1$ to $\infty$, each segment of the form $[n,n+1)$ gives one term in the expansion of $\log 2$. Then taking the absolute value gives the harmonic series.

share|cite|improve this answer
So, for the first part, if I consider log(2), then I would need to prove this and somewhat need to use Abel's Theorem? – mary Apr 24 '11 at 1:03
I am not understanding the second part – mary Apr 24 '11 at 1:03
@user8917: no, can you find a function that integrates to make the series for log(2)? The negative terms come because the function is less than zero. Then when you take the absolute value of $f$, the negative terms become positive and the integral diverges like the harmonic series. – Ross Millikan Apr 24 '11 at 1:34
Second hint: If you want to make a function that integrates this way, how about a series of steps? – Ross Millikan Apr 24 '11 at 2:26
How can we transform f to get g? What sort of transformation are we looking for? – mary Apr 24 '11 at 4:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.