# If the improper integral $\int_{a}^{b}|f|dx$ exists then so does $\int_{a}^{b}fdx$

Suppose $f$ is (Riemann) integrable over $[c,b]$ for every $c\in (a,b)$ and the improper integral $\int_{a}^{b}|f|dx$ exists. Then $\int_{a}^{b}fdx$ also exists. Does the inverse hold?

Here is what I've tried.

We know $|f|=f^++f^-$ (the positive and negative part of $f$, which are integrable over any $[c,b]$). By Comparison Test, $\int_{a}^{b}f^+dx$ and $\int_{a}^{b}f^-dx$ exist. Hence the improper integral of $f=f^+-f^-$ exists.

Is this okay?

Would anyone help me with the counterexample of the inverse? I'd appreciate it so much.

• Looks OK to me. While using comparison test you need to be aware that $f^{+}, f^{-}$ are non-negative functions. Inverse is not guaranteed to hold. Because it may happen that integrals for $f^{+}, f^{-}$ diverge to $\infty$ but integral of their difference (i.e. integral of $f$) converges. – Paramanand Singh May 8 '16 at 4:44
• Obviously untrue if $a=-\infty$. Then, $\int_{-\infty}^0\frac{\sin(x)}{x}\,dx$ is a convergent improper integral, but it is not absolutely convergent. – Mark Viola May 8 '16 at 4:58
• It appears from comment of @Dr.MV as well as the answer by Peter that people are assuming $a, b$ to be in extended real number system. My previous comment is based on the assumption that $a, b$ are real numbers and I was assuming that the "improper"ness of the integral is not due to unbounded intervals, but rather due to unbounded nature of function being integrated. I hope OP should clarify what his assumptions are about $a, b$. – Paramanand Singh May 8 '16 at 8:40
• @ParamanandSingh $a,b$ are real numbers indeed. Perhaps the example of Peter with the change $y=1/x$ works? The integral would be $\int_{0}^1y\sin (1/y)dy$ i think. – Talexius May 8 '16 at 16:05
• OK in that case my first comment holds as it is. Also if you put $y = 1/x$ in Peter's example, you get $\int_{0}^{1}(1/y)\sin(1/y)\,dy$. Thus Peter's counter-example shows that the inverse does not hold. – Paramanand Singh May 8 '16 at 16:11

Counterexample: $\int_1^\infty {\sin x\over x} dx$