First of all, let's try to factorize #x^4+1#.
#x^4+1=x^4+1+2x^2-2x^2=(x^4+2x^2+1)-2x^2=#
#=(x^2+1)^2-(sqrt2x)^2=(x^2+1-sqrt2x)(x^2+1+sqrt2x)#.
So, since these two quadratic polynomials can't be further factorized, we have to find #A,B,C,D#:
#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))/(x^2-sqrt2x+1)+((Cx+D)(x^2-sqrt2x+1))/(x^2+sqrt2x+1)=#
#(Ax^3+sqrt2Ax^2+Ax+Bx^2+sqrt2Bx+B+Cx^3-sqrt2Cx^2+Cx+Dx^2-sqrt2Dx+D)/((x^2-sqrt2x+1)(x^2+sqrt2x+1))#,
the two numerators are:
#1=x^3(A+C)+x^2(sqrt2A+B-sqrt2C+D)+x(A+sqrt2B+C-sqrt2D)+B+D#
and, for the identity of the two polynomial:
#A+C=0#
#sqrt2A+B-sqrt2C+D=0#
#A+sqrt2B+C-sqrt2D=0#
#B+D=1#
So:
#A=-C# and #B=1-D# put in the second equation:
#sqrt2(-C)+1-D-sqrt2C+D=0rArr2sqrt2C=1rArr#
#C=1/(2sqrt2)=1/(2sqrt2)*sqrt2/sqrt2=sqrt2/4# and so #A=-sqrt2/4#
and the third equation becomes:
#-sqrt2/4+sqrt2(1-D)+sqrt2/4-sqrt2D=0rArr#
#sqrt2-sqrt2D-sqrt2D=0rArr2sqrt2D=sqrt2rArrD=1/2# and so: #B=1/2#.
Our integral becomes:
#int((-sqrt2/4x+1/2)/(x^2-sqrt2x+1)+(sqrt2/4x+1/2)/(x^2+sqrt2x+1))dx=#
#=-sqrt2/4int(x-1/2*4/sqrt2)/(x^2-sqrt2x+1)dx+#
#+sqrt2/4int(x+1/2*4/sqrt2)/(x^2+sqrt2x+1)dx=#
#=-sqrt2/4*1/2int(2x-1/2*4/sqrt2*2)/(x^2-sqrt2x+1)dx+#
#+sqrt2/4*1/2int(2x+1/2*4/sqrt2*2)/(x^2+sqrt2x+1)dx=#
#=-sqrt2/8int(2x-4/sqrt2)/(x^2-sqrt2x+1)dx+#
#+sqrt2/8int(2x+4/sqrt2)/(x^2+sqrt2x+1)dx=#
#=-sqrt2/8int(2x-sqrt2+sqrt2-4/sqrt2*sqrt2/sqrt2)/(x^2-sqrt2x+1)dx+#
#+sqrt2/8int(2x+sqrt2-sqrt2+4/sqrt2*sqrt2/sqrt2)/(x^2+sqrt2x+1)dx=#
#=-sqrt2/8int(2x-sqrt2+sqrt2-2sqrt2)/(x^2-sqrt2x+1)dx+#
#+sqrt2/8int(2x+sqrt2-sqrt2+2sqrt2)/(x^2+sqrt2x+1)dx=#
#=-sqrt2/8int(2x-sqrt2)/(x^2-sqrt2x+1)dx+#
#-sqrt2/8*(-sqrt2)int1/(x^2-sqrt2x+1)dx+#
#+sqrt2/8int(2x+sqrt2)/(x^2+sqrt2x+1)dx+#
#+sqrt2/8*(sqrt2)int1/(x^2+sqrt2x+1)dx#.
The first and the third of these last four integrals are easy, remembering that:
#int(f'(x))/f(x)dx=ln|f(x)|+c#
So:
#(1)=-sqrt2/8ln(x^2-sqrt2x+1)+c# and
#(3)=sqrt2/8ln(x^2+sqrt2x+1)+c#.
For the second integral:
#(2)=sqrt2/8*sqrt2int1/(x^2-sqrt2x+1)dx#
let's take the denominator:
#x^2-sqrt2x+1=x^2-sqrt2x+1/2-1/2+1=(x-1/sqrt2)^2+1/2=#
#=1/2[2(x-1/sqrt2)^2+1]=1/2[(sqrt2(x-1/sqrt2))^2+1]=#
#=1/2[(sqrt2x-1)^2+1]#
And so, remembering that:
#int(f'(x))/(1+[f(x)]^2)dx=arctanf(x)+c#
#(2)=sqrt2/8intsqrt2/(1/2[(sqrt2x-1)^2+1])dx=#
#=sqrt2/8*2arctan(sqrt2x-1)+c=sqrt2/4arctan(sqrt2x-1)+c#.
With similar counts the fourth integral becomes:
#(4)=sqrt2/4arctan(sqrt2x+1)+c#.
NOW the last thing to do is to calcultate the defined integral:
#int_0^2 1/(1+x^4)dx=#
#=[-sqrt2/8ln(x^2-sqrt2x+1)+sqrt2/4arctan(sqrt2x-1)+sqrt2/8ln(x^2+sqrt2x+1)+sqrt2/4arctan(sqrt2x+1)]_0^2=#
#=-sqrt2/8ln(5-2sqrt2)+sqrt2/4arctan(2sqrt2-1)+sqrt2/8ln(5+2sqrt2)+sqrt2/4arctan(2sqrt2+1)+#
#-(-sqrt2/8ln1+sqrt2/4arctan(-1)+sqrt2/8ln1+sqrt2/4arctan(1))=#
#=-sqrt2/8ln(5-2sqrt2)+sqrt2/4arctan(2sqrt2-1)+sqrt2/8ln(5+2sqrt2)+sqrt2/4arctan(2sqrt2+1)-sqrt2/4(-pi/4)-sqrt2/4pi/4#.
I hope that my passages are clear and correct! If there are questions...I am here!