Simplify the integral using partial fractions:
#1/((1+x^2)(2+x^2)) = A/(1+x^2) +B/(2+x^2)#
#A(2+x^2) + B(1+x^2) = 1#
#x^2(A+B) + (2A+B) = 1#
#{ color(white)([)color(black)((A+B=0), (2A+B =1))]#
#{ color(white)([)color(black)((A= -B), (2A+B =1))]#
#{ color(white)([)color(black)((A= -B), (2A-A =1))]#
#{ color(white)([)color(black)((A= 1), (B=-1))]color(black)#
So:
#int (dx)/((1+x^2)(2+x^2)) = int (dx)/(1+x^2) - int (dx)/(2+x^2)#
Let's rewrite the second addendum as:
#int (dx)/(2+x^2) =1/sqrt(2) int (d(x/sqrt(2)))/(1+(x/sqrt(2))^2) #
and we have:
#int (dx)/((1+x^2)(2+x^2)) = arctan x -1/sqrt(2) arctan (x/sqrt(2))+C#