Integral of $$$\ln\left(-1 + \frac{1}{x}\right)$$$

The calculator will find the integral/antiderivative of $$$\ln\left(-1 + \frac{1}{x}\right)$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \ln\left(-1 + \frac{1}{x}\right)\, dx$$$.

Solution

For the integral $$$\int{\ln{\left(-1 + \frac{1}{x} \right)} d x}$$$, use integration by parts $$$\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}$$$.

Let $$$\operatorname{u}=\ln{\left(-1 + \frac{1}{x} \right)}$$$ and $$$\operatorname{dv}=dx$$$.

Then $$$\operatorname{du}=\left(\ln{\left(-1 + \frac{1}{x} \right)}\right)^{\prime }dx=\frac{1}{x \left(x - 1\right)} dx$$$ (steps can be seen ») and $$$\operatorname{v}=\int{1 d x}=x$$$ (steps can be seen »).

Therefore,

$${\color{red}{\int{\ln{\left(-1 + \frac{1}{x} \right)} d x}}}={\color{red}{\left(\ln{\left(-1 + \frac{1}{x} \right)} \cdot x-\int{x \cdot \frac{1}{x \left(x - 1\right)} d x}\right)}}={\color{red}{\left(x \ln{\left(-1 + \frac{1}{x} \right)} - \int{\frac{1}{x - 1} d x}\right)}}$$

Let $$$u=x - 1$$$.

Then $$$du=\left(x - 1\right)^{\prime }dx = 1 dx$$$ (steps can be seen »), and we have that $$$dx = du$$$.

So,

$$x \ln{\left(-1 + \frac{1}{x} \right)} - {\color{red}{\int{\frac{1}{x - 1} d x}}} = x \ln{\left(-1 + \frac{1}{x} \right)} - {\color{red}{\int{\frac{1}{u} d u}}}$$

The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:

$$x \ln{\left(-1 + \frac{1}{x} \right)} - {\color{red}{\int{\frac{1}{u} d u}}} = x \ln{\left(-1 + \frac{1}{x} \right)} - {\color{red}{\ln{\left(\left|{u}\right| \right)}}}$$

Recall that $$$u=x - 1$$$:

$$x \ln{\left(-1 + \frac{1}{x} \right)} - \ln{\left(\left|{{\color{red}{u}}}\right| \right)} = x \ln{\left(-1 + \frac{1}{x} \right)} - \ln{\left(\left|{{\color{red}{\left(x - 1\right)}}}\right| \right)}$$

Therefore,

$$\int{\ln{\left(-1 + \frac{1}{x} \right)} d x} = x \ln{\left(-1 + \frac{1}{x} \right)} - \ln{\left(\left|{x - 1}\right| \right)}$$

Simplify:

$$\int{\ln{\left(-1 + \frac{1}{x} \right)} d x} = x \ln{\left(\frac{1 - x}{x} \right)} - \ln{\left(\left|{x - 1}\right| \right)}$$

Add the constant of integration:

$$\int{\ln{\left(-1 + \frac{1}{x} \right)} d x} = x \ln{\left(\frac{1 - x}{x} \right)} - \ln{\left(\left|{x - 1}\right| \right)}+C$$

Answer

$$$\int \ln\left(-1 + \frac{1}{x}\right)\, dx = \left(x \ln\left(\frac{1 - x}{x}\right) - \ln\left(\left|{x - 1}\right|\right)\right) + C$$$A