Answer
$$\frac{1}{4} \ln |x-1|-\frac{1}{4} \ln |x+1|+\frac{1}{2} \frac{1}{x+1}+C$$
Work Step by Step
Given $$\int \frac{d x}{x^{3}+x^{2}-x-1}$$
Since
\begin{aligned}
\frac{1}{x^{3}+x-x-1} &=\frac{1}{(x-1)(x+1)^{2}} \\
&=\frac{\mathrm{A}}{x-1}+\frac{\mathrm{B}}{x+1}+\frac{\mathrm{C}}{(x+1)^{2}} \\
1 &=(x+1)^{2} \mathrm{A}+\mathrm{B}(x-1)(x+1)+\mathrm{C}(x-1)
\end{aligned}
Then
\begin{align*}
\text{at } x&=1\ \ \ \ \to A= \frac{1}{4} \\
\text{at } x&=-1\ \ \ \ \to B=\frac{-1}{4}\\
\text{at } x&=0\ \ \ \ \to C=\frac{-1}{2}
\end{align*}
Hence
\begin{aligned}
\int \frac{d x}{x^{3}+x-x-1} &=\frac{1}{4} \int \frac{1}{x-1} d x-\frac{1}{4} \int \frac{1}{x+1} d x-\frac{1}{2} \int \frac{1}{(x+1)^{2}} d x\\
&= \frac{1}{4} \ln |x+1-2|-\frac{1}{4} \ln |x+1|+\frac{1}{2} \frac{1}{x+1}+C
\end{aligned}