$\bf{My\; Solution::}$ Dado $$\displaystyle \int\frac{(x-1)\cdot \sqrt{x^4+2x^3-x^2+2x+1}}{x^2(x+1)}dx = \int\frac{(x^2-1)\cdot \sqrt{x^4+2x^3-x^2+2x+1}}{x^2(x^2+2x+1)}dx$$
Arriba multiplicamos ambos $\bf{N_{r}}$ y $\bf{D_{r}}$ por $(x+1).$
$$\displaystyle = \int\frac{\left(1-\frac {1}{x^2}\right)\cdot \sqrt{x^2\cdot \left(x^2+2x-1+\frac{2}{x}+\frac{1}{x^2}\right)}}{ \left(x+2+\frac{1}{x}\right)}dx$$
Ahora dejemos $ \displaystyle \left(x+\frac{1}{x}\right) = t\;,$ Entonces $\displaystyle \left(1-\frac{1}{x^2}\right)dx = dt$
Tan Integral $$\displaystyle = \int\frac{\sqrt{t^2+2t-3}}{t+2}dt = \frac{t^2+2t-3}{(t+2)\sqrt{t^2+2t-3}}dt = \int\frac{t(t+2)-3}{(t+2)\sqrt{t^2+2t-3}}dt$$
Tan Integral $$\displaystyle = \underbrace{\int\frac{t}{\sqrt{t^2+2t-3}}dt}_{I} - \underbrace{\int\frac{3}{(t+2)}\cdot \frac{1}{\sqrt{t^2+2t-3}}dt}_{J}..........\color{\red}\checkmark.$$
Así que $$\displaystyle I = \int\frac{t}{\sqrt{t^2+2t-3}}dt = \int\frac{(t+1)-1}{\sqrt{(t-1)^2-2^2}} = \int\frac{(t-1)}{\sqrt{(t-1)^2-2^2}}-\int\frac{1}{\sqrt{(t-1)^2-2^2}}dt$$
Ahora dejemos $(t-1) = z\;\;,$ Entonces $dt = dz$
Así que $$\displaystyle I = \int\frac{z}{\sqrt{z^2-2^2}}dz-\int\frac{1}{\sqrt{z^2-2^2}}dz = \sqrt{z^2-4}-\ln \left|(t+1)+\sqrt{t^2+2t-3}\right|$$
Ahora $$\displaystyle J = 3\int\frac{1}{(t+2)\sqrt{t^2+2t-3}}dt = 3\int\frac{1}{(t+2)\sqrt{(t+2)^2-2(t+2)+1-4}}$$
Ahora dejemos $(t+2) = u\;,$ Entonces $dt = du$ e integral $$\displaystyle = 3\int\frac{1}{u\sqrt{u^2-2u+1-4}}=3\int\frac{1}{u\sqrt{(u-1)^2-4}}du$$
Ahora $\displaystyle (u-1) = 2\sec \theta \;, $ Entonces $du= 2\sec \theta \cdot \tan \theta.$
Ahora, después de eso, puedes resolverlo.