<s>[INST] How to find $\int \frac{x^2-1}{x^3\sqrt{2x^4-2x^2+1}} dx$ How to find ?$$\int \frac{x^2-1}{x^3\sqrt{2x^4-2x^2+1}} dx$$ 
I tried using the substitution $x^2=z$.But that did not help much.
 [/INST] You can apply $u=x^2$ :
$$\int \frac{x^2-1}{x^3\sqrt{2x^4-2x^2+1}} dx=\frac{1}{2}\int \frac{x^2-1}{x^4\sqrt{2x^4-2x^2+1}} 2xdx=\frac{1}{2}\int \frac{u-1}{u^2\sqrt{2u^2-2u+1}} du$$
Now note that :
$$\int \frac{u-1}{u^2\sqrt{2u^2-2u+1}} du=\int \frac{u-1}{u^2\sqrt{2(u^2-u)+1}} du$$
we can substitute $v=\frac{1}{u}$ :
$$\int \frac{u-1}{u^2\sqrt{2(u^2-u)+1}} du=\int \frac{1-u}{\sqrt{2(u^2-u)+1}} \frac{-du}{u^2}=\int \frac{1-\frac{1}{v}}{\sqrt{2(\frac{1}{v^2}-\frac{1}{v})+1}} dv\\=\int \frac{\frac{v-1}{v}}{\sqrt{\frac{2-2v+v^2}{v^2}}}dv=\int \frac{v-1}{\sqrt{v^2-2v+2}}dv$$
Substitute $y=v^2-2v+2$ and you should be able to finish.
</s>