# How do you find int (2-x)/((1-x)(1+x^2)) dx using partial fractions?

Jul 16, 2016

$- \frac{1}{2} \ln | 1 - x | + \frac{1}{4} \ln \left(1 + {x}^{2}\right) + \frac{3}{2} {\tan}^{- 1} x + c$

#### Explanation:

To break the fraction
$\frac{2 - x}{\left(1 - x\right) \left(1 + {x}^{2}\right)}$
into partial fractions, we assume

$\frac{2 - x}{\left(1 - x\right) \left(1 + {x}^{2}\right)} = \frac{A}{1 - x} + \frac{B x + C}{1 + {x}^{2}}$

Multiplying both sides by $\left(1 - x\right) \left(1 + {x}^{2}\right)$ yields the equation

$2 - x = A \left(1 + {x}^{2}\right) + B x \left(1 - x\right) + C \left(1 - x\right)$
$= \left(A + C\right) + \left(B - C\right) x + \left(A - B\right) {x}^{2}$

Comparing the coefficients of powers of $x$ on both sides gives

$A + C = 2$, $B - C = - 1 ,$ and $A - B = 0$.

It is easy to see that the solution of this set of equations is $A = B = \frac{1}{2} , C = \frac{3}{2}$, so that

$\frac{2 - x}{\left(1 - x\right) \left(1 + {x}^{2}\right)} = \frac{1}{2 \left(1 - x\right)} + \frac{\frac{1}{2} x + \frac{3}{2}}{1 + {x}^{2}}$

So the required integral is

$\int \frac{2 - x}{\left(1 - x\right) \left(1 + {x}^{2}\right)} \mathrm{dx}$
$= \int \frac{\mathrm{dx}}{2 \left(1 - x\right)} + \frac{3}{2} \int \frac{\mathrm{dx}}{1 + {x}^{2}} + \frac{1}{4} \int \frac{2 x \mathrm{dx}}{1 + {x}^{2}}$
$= - \frac{1}{2} \ln | 1 - x | + \frac{1}{4} \ln \left(1 + {x}^{2}\right) + \frac{3}{2} {\tan}^{- 1} x + c$