Lengthy integration problem $$ \int\frac{x^3+3x+2}{(x^2+1)^2(x+1)} \, dx$$
I managed to solve the problem using partial fraction decomposition.
But that approach is pretty long as it creates five variables. Is there any other shorter method to solve this problem(other than partial fractions)? 
I also tried trigonometric substitution and creating the derivative of the denominator in the numerator... but it becomes even longer. Thanks in advance!!
Just to clarify: (My partial fraction decomposition)
$$\frac{x^3+3x+2}{(x^2+1)^2(x+1)}= \frac{Ax+B}{x^2+1} + \frac{Cx+D}{(x^2+1)^2} + \frac{E}{x+1}$$

HINT:
$$x^3+3x+2=x^3+x+2x+2=x(x^2+1)+2(x+1)$$
$$\dfrac{x^3+3x+2}{(x^2+1)^2(x+1)}=\dfrac x{(x^2+1)(x+1)}+\dfrac2{(x^2+1)^2}$$
For the second set $x=\tan y$
For the first 
Method$\#1:$
write the numerator as $$x\cdot\dfrac{(x^2+1)-(x^2-1)}2$$
Method$\#2:$
set $x=\tan y$ to find $$\int\dfrac{\sin y}{\sin y+\cos y}dx$$
Now express $\sin y=A(\sin y+\cos y)+B\cdot\dfrac{d(\sin y+\cos y)}{dy}$
Can you derive the values of the arbitrary constants $A,B?$
