This comes from a bigger problem :- $$ \text{Evaluate } \int\frac{dx}{1+x^4} $$
After making $ \int \frac {dx}{1+x^4} = \frac{dx}{(1+x^2)^2 - (\sqrt{2}x)^2} $ and then applying partial fraction method, I got :-
$$ \int \frac{dx}{1 + x^4} =\frac{1}{2 \sqrt{2}} \int \frac{x + \sqrt{2}}{x^2 + \sqrt{2}x + 1} dx - \frac{1}{2 \sqrt{2}} \int \frac{x - \sqrt{2}}{x^2 - \sqrt{2}x + 1} dx $$
Now, to the first integral, I tried making a u-substitution:-
$$ \text{Let }x^2 + \sqrt{2}x + 1 = u \\ \frac{du}{dx} = 2x + \sqrt{2} \\ \implies du = (2x + \sqrt{2}) dx \\ $$
As you can see, it is not the same as the numerator, which is $$ (x + \sqrt{2}) dx $$
Any hints on how to proceed ?
$x+\sqrt2 = \frac{1}{2}(2x+2\sqrt2) = \frac{1}{2}(2x+\sqrt2)+\frac{1}{2}\sqrt2$
Let $x^2+\sqrt2 \ x+1 = t \implies (2x+\sqrt2)dx = dt $
So, the integral is
$$I = \frac{1}{2}\int\frac{dt}{t}+\frac{1}{\sqrt2}\int\frac{dx}{(x^2+\sqrt 2 \ x+1)}$$
The first part gets evaluated into $\frac{1}{2}\ln t$. Convert the second part into $u^2+ a^2$ form which gets evaluated into $\frac{1}{a}\arctan(\frac{u}{a})$