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

The calculator will find the integral/antiderivative of $$$- \ln\left(x\right) + \frac{1}{\ln\left(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 \left(- \ln\left(x\right) + \frac{1}{\ln\left(x\right)}\right)\, dx$$$.

Solution

Integrate term by term:

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

This integral (Logarithmic Integral) does not have a closed form:

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

For the integral $$$\int{\ln{\left(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(x \right)}$$$ and $$$\operatorname{dv}=dx$$$.

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

The integral becomes

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

Apply the constant rule $$$\int c\, dx = c x$$$ with $$$c=1$$$:

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

Therefore,

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

Add the constant of integration:

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

Answer

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


Please try a new game Rotatly