<s>[INST] Integration of $\int\frac{x^2-1}{\sqrt{x^4+1}} \, dx$ Integration of $\displaystyle \int\frac{x^2-1}{\sqrt{x^4+1}} \,dx$
$\bf{My\; Try}$:: Let $x^2=\tan \theta$ and $\displaystyle 2xdx = \sec^2 \theta \, d\theta\Rightarrow dx = \frac{\sec^2 \theta}{2\sqrt{\tan \theta}} \, d\theta$
$$
\begin{align}
& = \int\frac{\tan \theta - 1}{\sec \theta}\cdot \frac{\sec^2 \theta}{2\sqrt{\tan \theta}} \, d\theta = \frac{1}{2}\int \frac{\left(\tan \theta - 1\right)\cdot \sec \theta}{\sqrt{\tan \theta}} \, d\theta \\
& = \frac{1}{2}\int \left(\sqrt{\tan \theta}-\sqrt{\cot \theta}\right)\cdot \sec \theta  \, d\theta
\end{align}
$$
Now i did not understand how can i solve it
Help me
Thanks
 [/INST] 
Use binomial expansions of the expressions in respective integrals as given in the previous solution of the problem.
</s>