Why is $-\log(x)$ integrable over the interval $[0, 1]$ but $\frac{1}{x}$ not integrable? I don't understand why some functions that contain a singularity in the domain of integration are integrable but others are not.
For example, consider $f(x) = -\log(x)$ and $g(x) = \frac{1}{x}$ on the interval $[0, 1]$. These functions look very similar when they are plotted but only $f(x)$ can be integrated.


*

*What is the precise mathematical reason(s) that makes some functions with singularities integrable while others are not?

*Are $\log$ functions the only functions with singularities that can be integrated or are there other types of functions with singularities that can be integrated?

 A: It's just whether or not the area under the curve is finite or not. It's doesn't matter that there is an asymptote.
You might consider the area under the curves $y=e^{-x}$ and $y=1/x$ for $x>0$. These are really the same two curves you mention, just along the other axis.
It's akin to the idea that an infinite series may or may not converge; just because there are infinitely many terms in a series  doesn't mean the series must diverge.
A: Think about it this way - what's the inverse?
$$y = \frac{1}{x}; x = \frac{1}{y}$$
$$y = -\log x; x = e^{-y}$$
Looking at it this way, it's clear that as $y$ shoots off to infinity, $x$ approaches zero much faster in one case than in the other.
A: The key is how fast the function is diverging.
Regarding your two examples, $-\log$ is going really fast close to the $y$-axis so it is integrable, but not $x\mapsto \frac {1}{x}$.


*

*You have $$\int_a^1 -\log(x)\mathrm dx=a(1-\log(a))+1\xrightarrow[a\to 0^+]{} 1<\infty.$$ So this function is integrable.

*You have $$\int_a^1 \frac 1x\mathrm dx=-1+\frac 1{a^2}\xrightarrow[a\to 0^+]{} +\infty.$$ So this function is not integrable.
Regarding your second question, $\log$ functions are absolutely not the only one. To convince yourself, take for instance $x\mapsto \frac 1{\sqrt{x}}$ on $(0,1)$.
A: Simple: $\quad -\log x=_0 o\Bigl(\dfrac1{\sqrt x}\Bigr)$ and the integral of $\dfrac 1{\sqrt x}$ on [0,1] is convergent.
