What is wrong with this integral reasoning?
Solution 1:
To explicitly check that they differ by a constant, subtract them:
\begin{align*} &\frac{1}{2}\log \frac{x^4+x^2\sqrt{x^4+1}}{1+\sqrt{x^4+1}} - \log \frac{x^2-1+\sqrt{x^4+1}}{x}\\ &= \frac{1}{2} \log \frac{1-x^2+x^4-\sqrt{1+x^4} + x^2\sqrt{1+x^4}}{x^2}\\ &\qquad - \frac{1}{2} \log \frac{2-2x^2+2x^4-2\sqrt{1+x^4}+2x^2\sqrt{1+x^4}}{x^2}\\ &=\frac{1}{2}\log \frac{1}{2}, \end{align*}
where I get the first term by rationalizing the denominator and the second by the identity $\log a = \frac{1}{2}\log a^2.$
Solution 2:
I have differentiated your answer and the book's answer. They are both equal to the integrand. So your work is indeed correct.
In fact, the book's answer can be considered wrong since it lacks an absolute value around the argument to $ln$, whereas your answer does not need one there since the argument to $ln$ in your expression is strictly positive.
Solution 3:
The two expressions are equal up to a constant.
Take from your answer $$\frac{x^2(x^2+\sqrt{x^4+1})}{1+\sqrt{x^4+1}}$$ and multiply top and bottom by $\sqrt{x^4+1}-1$ you get
$$\frac{x^4-x^2+1+(x^2-1)\sqrt{x^4+1}}{x^2}=\frac{1}{2}\frac{(x^2-1+\sqrt{x^4-1})^2}{x^2}$$
So $$\frac{1}{2} \ln \frac{x^2(x^2+\sqrt{x^4+1})}{1+\sqrt{x^4+1}}= \frac{1}{2} \ln \frac{1}{2}\frac{(x^2-1+\sqrt{x^4-1})^2}{x^2}=\frac{1}{2}\ln \frac{1}{2}+\frac{1}{2} \ln \frac{(x^2-1+\sqrt{x^4-1})^2}{x^2}= \frac{1}{2}\ln \frac{1}{2}+\ln \frac{x^2-1+\sqrt{x^4-1}}{x}$$