# Can we integrate discontinuous functions

Does it make sense to integrate the function $f(x) = 6$ for $x\in [0,1)$ and $f(x) = 1/x$ for $x$ in $(1,\infty)$?

Does it make sense to integrate the function $f(x) = 6$ for $x\in [0,1]$ and $f(x) = 12/x$ for $x$ in $[1,\infty)$?

What's the difference?

-
What is discontinuous about these functions? Only $1/x$ and $12/x$ have a single discontinuity at $x = 0$, but $0 \notin [1,\infty)$. –  TMM Mar 11 '12 at 15:14
I want to integrate from $0$ to $\infty$. –  seporhau Mar 11 '12 at 15:54
A finite number of points of discontinuity make no difference. In fact, a "small" (technically, measure $0$) infinite set of points of discontinuity makes no difference. The thing that makes your integral diverge is not the point of discontinuity. It is the fact that $1/x$ decreases too slowly, so that informally the area under $y=1/x$, from $x=a$ to "infinity," is always infinite. –  André Nicolas Mar 11 '12 at 21:21

These are what is called improper integrals. You integrate them by taking limits of finite integrals. For your second example we would let

$$\int_{[1,\infty)}\frac{12}{x}\, dx=\lim_{b\to\infty}\int_1^b\frac{12}{x}\,dx.$$

If you carryout the integration, you are left with

$$\lim_{b\to\infty}(\ln(b)-\ln(1).$$

Since that limit does not exist, we say that it doesn't converge. If you try the same thing with $f(x)=\frac{12}{x^2}$, you will get a limit that does exist and we would call the integral convergent. To deal with integrals over open intervals, we would take limits again:

$$\int_{(0,1]}f(x)\,dx = \lim_{a\to 0}\int_a^1f(x)\,dx.$$

-