Integral of $$$\frac{2 - x}{1 - x}$$$

The calculator will find the integral/antiderivative of $$$\frac{2 - x}{1 - x}$$$, 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 \frac{2 - x}{1 - x}\, dx$$$.

Solution

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

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

The integral becomes

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

Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=-1$$$ and $$$f{\left(u \right)} = \frac{u + 1}{u}$$$:

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

Expand the expression:

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

Integrate term by term:

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

Apply the constant rule $$$\int c\, du = c u$$$ with $$$c=1$$$:

$$- \int{\frac{1}{u} d u} - {\color{red}{\int{1 d u}}} = - \int{\frac{1}{u} d u} - {\color{red}{u}}$$

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

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

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

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

Therefore,

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

Add the constant of integration (and remove the constant from the expression):

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

Answer

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


Please try a new game Rotatly