先分解部分分式:
设1/(x+1)(x^2+1)=a/(x+1)+(bx+c)/(x^2+1)
去分母:1=a(x^2+1)+(bx+c)(x+1)
1=(a+b)x^2+(b+c)x+a+c
对比系数得:a+b=0,b+c=0,a+c=1
解得:a=c=0.5,b=-0.5
所以1/(x+1)=0.5/(x+1)+(-0.5x+0.5)/(x^2+1)
=0.5/(x+1)-0.5x/(x^2+1)+0.5/(x^2+1)
积分得:
原函数=0.5ln|x+1|-0.25ln(x^2+1)+0.5arctanx+C