We have,
I=∫1x4+x2+1dx
I=∫1(x2−x+1)(x2+x+1)dx
I=12∫x(x2+x+1)dx−12∫x(x2−x+1)dx
I=14∫2x+1−1(x2+x+1)dx−12∫2x−1+1(x2−x+1)dx
I=−14∫2x−1(x2−x+1)dx−14∫1(x2−x+1)dx+14∫2x+1(x2+x+1)dx+14∫1(x2+x+1)dx
I=−14∫2x−1(x2−x+1)dx+14∫1(x−12)2+34dx+14∫2x+1(x2+x+1)dx+14∫1(x+12)2+34dx
I=−14∫2x−1(x2−x+1)dx+14∫1(x−12)2+(√32)2dx+14∫2x+1(x2+x+1)dx+14∫1(x+12)2+(√32)2dx
I=−14ln(x2−x+1)+14⎡⎢ ⎢ ⎢ ⎢⎣1√32tan−1⎛⎜ ⎜ ⎜ ⎜⎝x−12√32⎞⎟ ⎟ ⎟ ⎟⎠⎤⎥ ⎥ ⎥ ⎥⎦+14ln(x2+x+1)+14⎡⎢ ⎢ ⎢ ⎢⎣1√32tan−1⎛⎜ ⎜ ⎜ ⎜⎝x+12√32⎞⎟ ⎟ ⎟ ⎟⎠⎤⎥ ⎥ ⎥ ⎥⎦+C
I=−14ln(x2−x+1)+12√3tan−1(2x−1√3)+14ln(x2+x+1)+12√3tan−1(2x+1√3)+C
I=−14ln(x2−x+1)+14ln(x2+x+1)+12√3tan−1(2x−1√3)+12√3tan−1(2x+1√3)+C
Hence, this is the answer.