Integral of $$$\frac{x}{\left(1 - x\right)^{2}}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \frac{x}{\left(1 - x\right)^{2}}\, dx$$$.
Solution
Rewrite the numerator of the integrand as $$$x=-1\left(1 - x\right)+1$$$ and split the fraction:
$${\color{red}{\int{\frac{x}{\left(1 - x\right)^{2}} d x}}} = {\color{red}{\int{\left(- \frac{1}{1 - x} + \frac{1}{\left(1 - x\right)^{2}}\right)d x}}}$$
Integrate term by term:
$${\color{red}{\int{\left(- \frac{1}{1 - x} + \frac{1}{\left(1 - x\right)^{2}}\right)d x}}} = {\color{red}{\left(\int{\frac{1}{\left(1 - x\right)^{2}} d x} - \int{\frac{1}{1 - x} d x}\right)}}$$
Let $$$u=1 - x$$$.
Then $$$du=\left(1 - x\right)^{\prime }dx = - dx$$$ (steps can be seen »), and we have that $$$dx = - du$$$.
Therefore,
$$- \int{\frac{1}{1 - x} d x} + {\color{red}{\int{\frac{1}{\left(1 - x\right)^{2}} d x}}} = - \int{\frac{1}{1 - x} d x} + {\color{red}{\int{\left(- \frac{1}{u^{2}}\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{1}{u^{2}}$$$:
$$- \int{\frac{1}{1 - x} d x} + {\color{red}{\int{\left(- \frac{1}{u^{2}}\right)d u}}} = - \int{\frac{1}{1 - x} d x} + {\color{red}{\left(- \int{\frac{1}{u^{2}} d u}\right)}}$$
Apply the power rule $$$\int u^{n}\, du = \frac{u^{n + 1}}{n + 1}$$$ $$$\left(n \neq -1 \right)$$$ with $$$n=-2$$$:
$$- \int{\frac{1}{1 - x} d x} - {\color{red}{\int{\frac{1}{u^{2}} d u}}}=- \int{\frac{1}{1 - x} d x} - {\color{red}{\int{u^{-2} d u}}}=- \int{\frac{1}{1 - x} d x} - {\color{red}{\frac{u^{-2 + 1}}{-2 + 1}}}=- \int{\frac{1}{1 - x} d x} - {\color{red}{\left(- u^{-1}\right)}}=- \int{\frac{1}{1 - x} d x} - {\color{red}{\left(- \frac{1}{u}\right)}}$$
Recall that $$$u=1 - x$$$:
$$- \int{\frac{1}{1 - x} d x} + {\color{red}{u}}^{-1} = - \int{\frac{1}{1 - x} d x} + {\color{red}{\left(1 - x\right)}}^{-1}$$
Let $$$u=1 - x$$$.
Then $$$du=\left(1 - x\right)^{\prime }dx = - dx$$$ (steps can be seen »), and we have that $$$dx = - du$$$.
So,
$$- {\color{red}{\int{\frac{1}{1 - x} d x}}} + \frac{1}{1 - x} = - {\color{red}{\int{\left(- \frac{1}{u}\right)d u}}} + \frac{1}{1 - x}$$
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{1}{u}$$$:
$$- {\color{red}{\int{\left(- \frac{1}{u}\right)d u}}} + \frac{1}{1 - x} = - {\color{red}{\left(- \int{\frac{1}{u} d u}\right)}} + \frac{1}{1 - x}$$
The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:
$${\color{red}{\int{\frac{1}{u} d u}}} + \frac{1}{1 - x} = {\color{red}{\ln{\left(\left|{u}\right| \right)}}} + \frac{1}{1 - x}$$
Recall that $$$u=1 - x$$$:
$$\ln{\left(\left|{{\color{red}{u}}}\right| \right)} + \frac{1}{1 - x} = \ln{\left(\left|{{\color{red}{\left(1 - x\right)}}}\right| \right)} + \frac{1}{1 - x}$$
Therefore,
$$\int{\frac{x}{\left(1 - x\right)^{2}} d x} = \ln{\left(\left|{x - 1}\right| \right)} + \frac{1}{1 - x}$$
Simplify:
$$\int{\frac{x}{\left(1 - x\right)^{2}} d x} = \frac{\left(x - 1\right) \ln{\left(\left|{x - 1}\right| \right)} - 1}{x - 1}$$
Add the constant of integration:
$$\int{\frac{x}{\left(1 - x\right)^{2}} d x} = \frac{\left(x - 1\right) \ln{\left(\left|{x - 1}\right| \right)} - 1}{x - 1}+C$$
Answer
$$$\int \frac{x}{\left(1 - x\right)^{2}}\, dx = \frac{\left(x - 1\right) \ln\left(\left|{x - 1}\right|\right) - 1}{x - 1} + C$$$A