Integrate $I= \int \frac{x^2 -1}{x\sqrt{1+ x^4}}\,\mathrm d x$ 
$$I= \int \frac{x^2 -1}{x\sqrt{1+ x^4}}\,\mathrm d x$$

My Endeavour :
\begin{align}I&= \int \frac{x^2 -1}{x\sqrt{1+ x^4}}\,\mathrm d x\\ &= \int \frac{x}{\sqrt{1+ x^4}}\,\mathrm d x -  \int \frac{1}{x\sqrt{1+ x^4}}\,\mathrm d x\end{align}
\begin{align}\textrm{Now,}\;\;\int \frac{x}{\sqrt{1+ x^4}}\,\mathrm d x &= \frac{1}{2}\int \frac{2x^3}{x^2\sqrt{1+ x^4}}\,\mathrm dx\\ \textrm{Taking}\,\,(1+ x^4)= z^2\,\,\textrm{and}\,\, 4x^3\,\mathrm dx= 2z\,\mathrm dz\,\, \textrm{we get} \\ &= \frac{1}{2}\int \frac{z\,\mathrm dz}{\sqrt{z^2-1}\, z}\\ &= \frac{1}{2}\int \frac{\mathrm dz}{\sqrt{z^2-1}}\\ &= \frac{1}{2}\ln|z+ \sqrt{z^2 -1}|\\ &= \frac{1}{2}\ln|\sqrt{1+x^4}+ x^2|\\ \textrm{Now, with the same substitution, we get in the second integral}\\ \int \frac{1}{x\sqrt{1+ x^4}}\,\mathrm d x &= \frac{1}{2}\int \frac{2x^3}{x^4\sqrt{1+ x^4}}\,\mathrm dx\\ &= \frac{1}{2}\int \frac{z\,\mathrm dz}{( z^2 -1)\;z} \\ &=\frac{1}{2}\int \frac{\mathrm dz}{ z^2 -1} \\ &=\frac{1}{2^2}\, \ln \left|\frac{ z+1}{z-1}\right| \\ &= \frac{1}{2^2}\, \ln \left|\frac{ \sqrt{1+ x^4}+1}{\sqrt{1+ x^4}-1}\right|\;.\end{align}
So, \begin{align}I&=\int \frac{x^2 -1}{x\sqrt{1+ x^4}}\,\mathrm d x \\ &=\frac{1}{2}\, \ln|\sqrt{1+x^4}+ x^2|- \frac{1}{2^2}\, \ln \left|\frac{ \sqrt{1+ x^4}+1}{\sqrt{1+ x^4}-1}\right| + \mathrm C\;.\end{align}
Book's solution:
\begin{align}I&=\int \frac{x^2 -1}{x\sqrt{1+ x^4}}\,\mathrm d x \\ &= \ln\left\{\frac{1+x^2 + \sqrt{1+x^4}}{x}\right\} + \mathrm C\;.\end{align}
And my hardwork's result is nowhere to the book's answer :(
Can anyone tell me where I made the blunder?

Here is another approach.
Let $x^2=\tan(\phi)$
$$
\begin{align}
\int\frac{x^2-1}{x\sqrt{1+x^4}}\,\mathrm{d}x
&=\frac12\int\frac{x^2-1}{x^2\sqrt{1+x^4}}\,\mathrm{d}x^2\\
&=\frac12\int\frac{\tan(\phi)-1}{\tan(\phi)\sec(\phi)}\,\mathrm{d}\tan(\phi)\\
&=\frac12\int(\sec(\phi)-\csc(\phi))\,\mathrm{d}\phi\\
&=\frac12\log(\sec(\phi)+\tan(\phi))+\frac12\log(\csc(\phi)+\cot(\phi))+C\\
&=\frac12\log\left(\sqrt{1+x^4}+x^2\right)+\frac12\log\left(\sqrt{1+\frac1{x^4}}+\frac1{x^2}\right)+C\\
&=\log\left(\sqrt{1+x^4}+x^2\right)-\log(x)+C
\end{align}
$$
