∫cot−1(1+x+x2)dx
=xcot−1(1+x+x2)−∫(−2x−1)x(x2+x+1)2+1dx
=xcot−1(1+x+x2)−∫(−2x2(x2+x+1)2+1−x(x2+x+1)2+1)dx
=xcot−1(1+x+x2)+2∫x2(x2+x+1)2+1dx+∫x(x2+x+1)2+1dx
-----------------------------------------------------------------------------------------------------
∫x2(x2+x+1)2+1dx
=15∫2x−1x2+1dx−25∫x−1x2+2x+2dx
=−ln(x2+2x+2)5+ln(x2+1)5+4tan−1(x+1)5−tan−1(x)5
-----------------------------------------------------------------------------------------------------
∫x(x2+x+1)2+1dx
=15∫x+2x2+1dx−15∫x+4x2+2x+2dx
=−ln(x2+2x+2)10+ln(x2+1)10−3tan−1(x+1)5+2tan−1(x)5
-------------------------------------------------------------------------------------------------------
=xcot−1(1+x+x2)+2∫x2(x2+x+1)2+1dx+∫x(x2+x+1)2+1dx
=xcot−1(1+x+x2)−ln(x2+2x+2)2+ln(x2+1)2+tan−1(x+1)+C