<s>[INST] Integrate $\int \frac{(1+x^2)dx}{(1−x^2)\sqrt{1+x^4}}$ Integrate $\displaystyle \int \frac{(1+x^2)dx}{(1−x^2)\sqrt{1+x^4}}$
I don't know how to do this one. I need some suggestions. Thank you! 
 [/INST] These types of integrals are best evaluated using a substitution of the form $$u = x - x^{-1}, \quad du = 1 + x^{-2} \, dx.$$  Note that $u^2 = x^2 + x^{-2} - 2$, and we can write the integrand as $$\frac{1+x^2}{(1-x^2)\sqrt{x^4+1}} dx = \frac{x^2(1+x^{-2}) \, dx}{x^2(x^{-1}-x)\sqrt{x^2+x^{-2}}} = -\frac{du}{u\sqrt{u^2+2}} = -\frac{u \, du}{u^2 \sqrt{u^2+2}}.$$  Now let $v = \sqrt{u^2+2}$, $dv = \frac{u}{\sqrt{u^2+2}} \, du$, and the given integral becomes $$\begin{align*} \int \frac{dv}{2-v^2} &= \frac{\log(v+\sqrt{2}) - \log(v-\sqrt{2})}{2\sqrt{2}} + C \\ &= \frac{1}{2\sqrt{2}} \log \left| \frac{\sqrt{x^2+x^{-2}} + \sqrt{2}}{\sqrt{x^2+x^{-2}} - \sqrt{2}} \right| + C \\ &= \frac{1}{2\sqrt{2}} \log \left| \frac{\sqrt{x^4+1}+\sqrt{2}x}{\sqrt{x^4+1}-\sqrt{2}x} \right| + C. \end{align*}$$
</s>