Given the integral,
∫1(x+1)(x2+1)dx
using partial fraction we get,
∫1(x+1)(x2+1)dx=∫[12(x+1)−x−12(x2+1)]dx=12∫1x+1dx−12∫x−1x2+1dx
Now, for ∫1x+1dx
Let, u=x+1⇒dudx=1⇒du=dx
Substituting the values of u and du we get,
∫1x+1dx=∫1udu=ln(u)=ln(x+1)
for ∫x−1x2+1dx
Expanding the integral,
∫x−1x2+1dx=∫xx2+1dx−∫1x2+1dx
Again, for ∫xx2+1dx
Let,
u=x2+1⇒dudx=2x⇒dx=12xdu∴∫xx2+1dx=12∫1udu=ln(u)2=ln(x2+1)2
And
∫1x2+1dx=arctan(x)∴∫xx2+1dx−∫1x2+1dx=ln(x2+1)2−arctan(x)
So,
12∫1x+1dx−12∫x−1x2+1dx=ln(x+1)2−ln(x2+1)4+arctan(x)2∴∫1(x+1)(x2+1)dx=ln(x+1)2−ln(x2+1)4+arctan(x)2+C.