How do we integrate this ?

we are given
[tex] \int \:\frac{4}{\left(x+1\right)\left(x-1\right)^2}dx [/tex]
we can use partial fraction method
firstly , we will find partial fraction
[tex] \frac{1}{\left(x+1\right)\left(x-1\right)^2}:\quad \frac{1}{4\left(x+1\right)}-\frac{1}{4\left(x-1\right)}+\frac{1}{2\left(x-1\right)^2} [/tex]
[tex] =4\cdot \int \:\frac{1}{4\left(x+1\right)}-\frac{1}{4\left(x-1\right)}+\frac{1}{2\left(x-1\right)^2}dx [/tex]
now, we can distribute integral
[tex] =4\left(\int \frac{1}{4\left(x+1\right)}dx-\int \frac{1}{4\left(x-1\right)}dx+\int \frac{1}{2\left(x-1\right)^2}dx\right) [/tex]
now, we can solve each
[tex] =4\left(\frac{1}{4}\ln \left|x+1\right|-\frac{1}{4}\ln \left|x-1\right|-\frac{1}{2\left(x-1\right)}\right) [/tex]
[tex] =\ln \left|x+1\right|-\ln \left|x-1\right|-\frac{2}{x-1}+C [/tex]...........Answer