1/(x^3+x^2+x+1)=1/(x^2(x+1)+(x+1))=1/((x+1)(x^2+1))=f(x)/(x+1)+g(x)/(x^2+1), where f and g are functions of x that allow us to split the expression into partial fractions. Let f(x)=ax+b and g(x)=cx+d, then (ax+b)(x^2+1)+(cx+d)(x+1)=1 and ax^3+ax+bx^2+b + cx^2+cx+dx+d=1. So a=0 ( no x^3 term), b+c=0 (no x^2 term), a+c+d=0 (no x term), b+d=1.
From these c=-b, so 0-b+d=0 and b=d, but b+d=1 so b=d=1/2 and c=-1/2. f(x)=1/2 and g(x)=-x/2+1/2. Thus:
1/((x+1)(x^2+1))=1/(2(x+1))+(1-x)/(2(x^2+1))=1/(2(x+1))+1/(2(x^2+1))-x/(2(x^2+1)). Each term is integrable:
(1/2)int(1/(x+1))+(1/2)int(1/(x^2+1))-(1/4)int(2x/(x^2+1))=
(1/2)ln(x+1)+(1/2)tan^-1(x)-(1/4)ln(x^2+1)+k, where k is the integration constant.
The log terms can be combined: (1/4)ln((x+1)^2/(x^2+1))+(1/2)tan^-1(x)+k.