Perform the decomposition into partial fractions
#(x-1)/(x(x^4+1))=(Ax^3+Bx^2+C)/(x^4+1)+(D)/(x)#
#=((Ax^3+Bx^2+C)x+D(x^4+1))/(x(x^4+1))#
The denominators are the same, compare the numerators
#x-1=Ax^4+Bx^3+Cx+Dx^4+D#
Therefore, comparing the LHS and the RHS
#A+D=0#
#C=1#
#D=-1#
#B=0#
#A=-D=1#
So,
#(x-1)/(x(x^4+1))=(x^3+1)/(x^4+1)-1/(x)#
#int((x-1)dx)/(x(x^4+1))=int((x^3+1)dx)/(x^4+1)-int(1dx)/(x)#
#=int(x^3dx)/(x^4+1)+int(dx)/(x^4+1)-int(1dx)/(x)#
Let #u=x^4+1#, #=>#, #du=4x^3dx#
Therefore,
#int(x^3dx)/(x^4+1)=1/4int(du)/(u)=1/4lnu=1/4ln(x^4+1)#
#int(dx)/(x)=ln(|x|)#
#1/(x^4+1)=1/((x^2-sqrt2x+1)(x^2+sqrt2x+1))#
#=(Ax+B)/(x^2-sqrt2x+1)+(Cx+D)/(x^2+sqrt2x+1)#
#=((Ax+B)(x^2+sqrt2x+1)+(Cx+D)(x^2-sqrt2x+1))/((x^2-sqrt2x+1)(x^2+sqrt2x+1))#
The denominators are the same, we compare the numerators
#1=(Ax+B)(x^2+sqrt2x+1)+(Cx+D)(x^2-sqrt2x+1)#
Let #x=0#, #=>#, #1=B+D#
Coefficients of #x^3#, #=>#, #A+C=0#
Coefficients of #x#, #=>#, #sqrt2B+A+C-sqrt2D=0#
#=>#, #B=D#, #=>#,#B=D=1/2#
Coefficients of #x^2#, #=>#, #Asqrt2+B-sqrt2C+D=0#
#=>#, #A=-1/(2sqrt2)#
#=>#, #C=1/(2sqrt2)#
So,
#1/(x^4+1)=(-1/(2sqrt2)x+1/2)/(x^2-sqrt2x+1)+(1/(2sqrt2)x+1/2)/(x^2+sqrt2x+1)#
#=(sqrt2-x)/(2sqrt2(x^2-sqrt2x+1))+(sqrt2+x)/(2sqrt2(x^2+sqrt2x+1))#
#int(dx)/(x^4+1)=int((sqrt2-x)dx)/(2sqrt2(x^2-sqrt2x+1))+int((sqrt2+x)dx)/(2sqrt2(x^2+sqrt2x+1))#
#int((sqrt2-x)dx)/(2sqrt2(x^2-sqrt2x+1))=1/(4sqrt2)(-ln|2x^2-2sqrt2x+2|)+2arctan(2x-1)#
#int((sqrt2+x)dx)/(2sqrt2(x^2+sqrt2x+1))=1/(4sqrt2)(ln|2x^2+2sqrt2x+2|)+2arctan(2x+1)#