# Improper integral of $1/(x-1)$

Here is an example of my calculus book about improper integral: evaluate the integral of $$1/(x-1)$$ from $$0$$ to $$3$$. my question is why does it diverge when we can see clearly that if we substitute $$u= x-1$$ the the area from $$u=-1$$ to $$u = 1$$ will be zero (since $$1/u$$ is odd) and we will only have $$\ln 2$$ left... I know what the definition says but I want to know what is the logic behind it

You have to be careful when dealing with these kinds of improper integrals. Indeed, the integral$$I=\int\limits_0^3\frac {\mathrm dx}{x-1}$$diverges due to the singularity at $$x=1$$. However, if we consider the principal value, then the integral exists. In which case, let $$z=x-1$$ so that\begin{align*}\int\limits_0^3\frac {\mathrm dx}{x-1} & =\int\limits_{-1}^2\frac {\mathrm dz}z\\ & =\lim\limits_{\varepsilon\to0}\left[\int\limits_{-1}^{-\varepsilon}\frac {\mathrm dz}z+\int\limits_{\varepsilon}^2\frac {\mathrm dz}z\right]\\ & =\lim\limits_{\varepsilon\to0}\left[\log(-\varepsilon)-\log(-1)+\log 2-\log\varepsilon\right]\\ & =\lim\limits_{\varepsilon\to0}\log\left(\frac {-\varepsilon}{-1}\frac {2}{\varepsilon}\right)\\ & =\log 2\end{align*}

Therefore$$PV\int\limits_0^3\frac {\mathrm dx}{x-1}=\log 2$$

It is

$$\int_{-\infty}^\infty \frac{1}{x-1}\mathrm{d}x = \lim_{x \to \infty} \ln(x-1) - \lim_{x \to -\infty}\ln(x-1) = \infty - \infty$$

which is an undetermined formed and thus it diverges (meaning that the improper integral is undefined).

Problems like such arise when integrating over a contour which includes singularities of the integrating function, which in other words can be worked around via Cauchy ways of Complex Analysis.

You must be very careful when integrating functions that have singularities over the domain of integration (where the denominator is zero). Specifically, you must break the integral in pieces. Because this integral diverges on either side of the singularity, you cannot conclude that the portion from $$x = -1$$ to $$x = 1$$ is zero.

Consider $$\int_{-1}^{1} \frac{1}{x^{1/3}} dx.$$ This integral, although it has a singularity at zero, is in fact integrable (the above integral is finite). So a function need to be bounded over its domain to be integrable.

From the riemann or darboux definition of the integral you can't calculate the integral(as these necessarily require the integrand to be bounded but, $$\frac{1}{x}$$ is not bounded around $$x=0$$), you will have to use the lebegue definition with the neighborhood around $$0$$ as the principle one(if you don't get it, its fine). Intuitively you can view it much more simply as firstly imagine the integral with the change of variables as you did to $$\int_{-1}^{2}\frac{1}{x}dx=lim_{t\to0^-}\int_{-1}^{t}\frac{1}{x}dx+lim_{t\to0^+}\int_{t}^{1}\frac{1}{x}dx+\int_{1}^{2}\frac{1}{x}dx=ln2$$

Since you can visualize that $$lim_{t\to0^+}\int_{t}^{1}\frac{1}{x}dx$$ is the area above the x-axis covered under the rectangular hyperbola between $$x=0\ and\ x=1$$ which is equal but different in sign from $$lim_{t\to0^-}\int_{-1}^{t}\frac{1}{x}dx$$ which is area below the x-axis covered by the hyperbola. These in a would intuitively seem right to cancel as they are clearly symmetric and hence you would be left only with $$\int_{1}^{2}\frac{1}{x}dx=ln2$$ You are right.... in some sense. The improper integral in your question is undefined but the Cauchy principal value is $$\ln (2)$$.

The familiar integration formula $$\int \frac1u\,du =\ln|u|+C$$ is not really one formula - it's two formulas glued together, one on each side of the singularity at $$u=0$$. For positive $$u$$, $$\ln(u)+C$$ is an antiderivative. For negative $$u$$, $$\ln(-u)+C'$$ is an antiderivative. Note the two different constants as well.
Writing it all as one formula, with one constant, is a reasonable shortcut - as long as we never cross the singularity. If we do, the actual integral blows up to a $$\infty-\infty$$ indeterminate, represented in the formulas here by a difference of two arbitrary constants.

In the theory of improper integrals, we say that $$\int_0^3 \frac1{x-1}\,dx$$ is improper for two reasons; it's improper at $$1$$ from the right (and that part diverges), and it's improper at $$1$$ from the left (that part also diverges). Any one divergent piece is enough to make the whole integral diverge.