Question is $\newcommand{\dd}{\,\mathrm{d}}$
$$\int \frac{x^2 - 1}{(x^2+1)\sqrt{x^4+1}} \dd x$$
Solution given in book $$\int \frac{1-\frac{1}{x^2}}{\left(x+\frac{1}{x}\right)\cdot\sqrt{x^2+\frac{1}{x^2}}}\dd x$$
$$\int \frac{1-\frac{1}{x^2}}{\left(x+\frac{1}{x}\right)\cdot\sqrt{\left(x+\frac{1}{x}\right)^2-2}}\dd x$$
Let $t=x+\frac{1}{x} $
$$\int \frac{1}{t\cdot\sqrt{t^2-2}}\dd t$$
$$\frac{1}{2} \mathrm{arcsec}\left(\frac{x-\frac{1}{x}}{\sqrt{2}}\right) + C$$
If there was not any square root in the question then I could have used partial fractions to solve this.
But now I cannot think of any other way to do this.
So is there any other solution to this problem?
“If there wasn’t a square root there...” is not proper justification for there being an easier way to do something. For example I could find an elementary antiderivative of $\sin(x^2)$ if only there wasn’t a sine. This is the most straightforward way, once you can use the $x\pm\frac1x$ trick then this integral is almost trivial. I’m sure there’s another way to do this, perhaps rationalize and then partial fraction $$\sqrt{x^4+1}\left(\frac{x^2-1}{(x^2+1)(x^4+1)}\right)$$ Or maybe do something awful like $x^2=\tan\theta$ or $x^2=\sinh\theta$. All of these ideas would be a jumping off point but antiderivatives are unique so they will be some form of what you already found.