We need
intdx/(x^2+1)=arctan(x)∫dxx2+1=arctan(x)
As the degree of the numerator is greater than the degree of the denominator, perform a long division first.
(x^5+3x^2+1)/(x^4-1)=x+(3x^2+x+1)/(x^4-1)x5+3x2+1x4−1=x+3x2+x+1x4−1
Perform a decomposition into partial fractions
(3x^2+x+1)/(x^4-1)=(3x^2+x+1)/((x^2+1)(x+1)(x-1))3x2+x+1x4−1=3x2+x+1(x2+1)(x+1)(x−1)
=(Ax+B)/(x^2+1)+C/(x+1)+D/(x-1)=Ax+Bx2+1+Cx+1+Dx−1
=((Ax+B)(x+1)(x-1)+C(x^2+1)(x-1)+D(x^2+1)(x+1))/((x^2+1)(x+1)(x-1))=(Ax+B)(x+1)(x−1)+C(x2+1)(x−1)+D(x2+1)(x+1)(x2+1)(x+1)(x−1)
The denominators are the same , compare the numerators
3x^2+x+1=(Ax+B)(x+1)(x-1)+C(x^2+1)(x-1)+D(x^2+1)(x+1)3x2+x+1=(Ax+B)(x+1)(x−1)+C(x2+1)(x−1)+D(x2+1)(x+1)
Let x=1x=1, =>⇒, 5=4D5=4D, =>⇒, D=5/4D=54
Let x=-1x=−1, =>⇒, 3=-4C3=−4C, =>⇒, C=-3/4C=−34
Let x=0x=0, =>⇒, 1=-B-C+D1=−B−C+D, =>⇒, B=5/4+3/4-1=1B=54+34−1=1
Coefficients of x^3x3
0=A+C+D0=A+C+D, =>⇒, A=-C-D=3/4-5/4=-1/2A=−C−D=34−54=−12
Therefore,
(x^5+3x^2+1)/(x^4-1)=x+(-1/2x+1)/(x^2+1)+(-3/4)/(x+1)+(5/4)/(x-1)x5+3x2+1x4−1=x+−12x+1x2+1+−34x+1+54x−1
So,
int((x^5+3x^2+1)dx)/(x^4-1)=intxdx+int((-1/2x+1)dx)/(x^2+1)+int(-3/4dx)/(x+1)+int(5/4dx)/(x-1)∫(x5+3x2+1)dxx4−1=∫xdx+∫(−12x+1)dxx2+1+∫−34dxx+1+∫54dxx−1
intxdx=x^2/2∫xdx=x22
int(-3/4dx)/(x+1)=-3/4ln(|x+1|)∫−34dxx+1=−34ln(|x+1|)
int(5/4dx)/(x-1)=5/4ln(|x-1|)∫54dxx−1=54ln(|x−1|)
int((-1/2x+1)dx)/(x^2+1)=-1/4int(2xdx)/(x^2+1)+intdx/(x^2+1)=-1/4ln(x^2+1)+arctanx∫(−12x+1)dxx2+1=−14∫2xdxx2+1+∫dxx2+1=−14ln(x2+1)+arctanx
Finally,
int((x^5+3x^2+1)dx)/(x^4-1)=x^2/2-3/4ln(|x+1|)+5/4ln(|x-1|)-1/4ln(x^2+1)+arctanx+C∫(x5+3x2+1)dxx4−1=x22−34ln(|x+1|)+54ln(|x−1|)−14ln(x2+1)+arctanx+C