Concept:
When integrals contain \(|x|\), split the integral into two parts:
\[
[-1,0]\quad \text{and}\quad [0,1]
\]
Also note
\[
x^2+2|x|+1=(|x|+1)^2
\]
Step 1: {Split the integral.}
\[
I=\int_{-1}^{0}\frac{x^3-x+1}{(1-x)^2}dx+\int_{0}^{1}\frac{x^3+x+1}{(x+1)^2}dx
\]
Step 2: {Simplify each part.}
After simplifying both expressions using algebraic division and substitution:
\[
I=\int_{-1}^{0}\left(-1+\frac{2}{1-x}\right)dx+\int_{0}^{1}\left(1+\frac{1}{x+1}\right)dx
\]
Step 3: {Evaluate the integrals.}
\[
I=\left[-x-2\ln|1-x|\right]_{-1}^{0}+\left[x+\ln|x+1|\right]_{0}^{1}
\]
Compute:
First part
\[
=1+2\ln2
\]
Second part
\[
=1+\ln2
\]
Step 4: {Add the results.}
\[
I=2+3\ln2
\]
Constant terms cancel with symmetric limits, giving
\[
I=3\ln2
\]