Find $\int\frac{\sqrt{2-x-x^2}}{x^2}dx$ Find $\int\frac{\sqrt{2-x-x^2}}{x^2}dx$

Let $I=\int\frac{\sqrt{2-x-x^2}}{x^2}dx$
I took $\sqrt{2-x-x^2}$ as first function and $\frac{1}{x^2}$ as the second function and integrated it by parts,
$I=\int\frac{\sqrt{2-x-x^2}}{x^2}dx=\sqrt{2-x-x^2}\int\frac{1}{x^2}dx-\int\frac{-1-2x}{2\sqrt{2-x-x^2}}\times\frac{-1}{x}dx$
$=\sqrt{2-x-x^2}\times\frac{-1}{x}-\frac{1}{2}\int\frac{1+2x}{x\sqrt{2-x-x^2}}dx$
Now i put $x=\frac{1}{t}$ in the integral $\int\frac{1+2x}{x\sqrt{2-x-x^2}}dx$ to get
$I=\sqrt{2-x-x^2}\times\frac{-1}{x}+\frac{1}{2}\int\frac{(t+2)dt}{t\sqrt{2t^2-t-1}}$
I do not know how to solve it further.
 A: Let $$\displaystyle I = \int \frac{\sqrt{2-x-x^2}}{x^2}dx = \int \sqrt{2-x-x^2}\cdot \frac{1}{x^2}dx\;, $$ Now Using Integration by parts
$$\displaystyle I = -\frac{\sqrt{2-x-x^2}}{x}-\int\frac{1+2x}{2\sqrt{2-x-x^2}}\cdot \frac{1}{x}dx $$
So $$\displaystyle I = -\frac{\sqrt{2-x-x^2}}{x}-\underbrace{\int\frac{1}{\sqrt{2-x-x^2}}dx}_{J}-\underbrace{\int\frac{1}{x\sqrt{2-x-x^2}}dx}_{K}$$
So for Calculation of $$\displaystyle J = \int\frac{1}{\sqrt{2-x-x^2}}dx = \int\frac{1}{\sqrt{\left(\frac{3}{2}\right)^2-\left(\frac{2x+1}{2}\right)^2}}dx$$
Now Let $\displaystyle \left(\frac{2x+1}{2}\right)=\frac{3}{2}\sin \phi\;,$ Then $\displaystyle dx = \frac{3}{2}\cos \phi d\phi$
So we get $$\displaystyle J = \int 1d\phi = \phi+\mathcal{C_{1}} = \sin^{-1}\left(\frac{2x+1}{3}\right)+\mathcal{C}$$
Similarly for calculation of $$\displaystyle K = \int \frac{1}{x\sqrt{2-x-x^2}}dx$$
Put $\displaystyle x=\frac{1}{u}$ and $\displaystyle dx = -\frac{1}{u^2}dt$
So we get $$\displaystyle K = -\int\frac{1}{\sqrt{2u^2-u-1}}du = -\frac{1}{\sqrt{2}}\int\frac{1}{\sqrt{\left(u-\frac{1}{4}\right)^2-\left(\frac{3}{4}\right)^2}}dx$$
So we get $$\displaystyle J = -\frac{\sqrt{2}}{3}\ln\left|\left(u-\frac{1}{4}\right)+\sqrt{\left(u-\frac{1}{4}\right)^2-\left(\frac{3}{4}\right)^2}\right|+\mathcal{C_{2}}$$
So we get $$\displaystyle J = -\frac{\sqrt{2}}{3}\ln\left|\left(\frac{1}{x}-\frac{1}{4}\right)+\sqrt{\left(\frac{1}{x}-\frac{1}{4}\right)^2-\left(\frac{3}{4}\right)^2}\right|+\mathcal{C_{2}}$$
So $$\displaystyle I = -\frac{\sqrt{2-x-x^2}}{x}-\sin^{-1}\left(\frac{2x+1}{3}\right)+\frac{\sqrt{2}}{3}\ln\left|\left(\frac{1}{x}-\frac{1}{4}\right)+\sqrt{\left(\frac{1}{x}-\frac{1}{4}\right)^2-\left(\frac{3}{4}\right)^2}\right|+\mathcal{C}$$
A: Let $$\displaystyle I = \int \frac{\sqrt{2-x-x^2}}{x^2}dx = \int\frac{\sqrt{(x+2)(1-x)}}{x^2}dx$$
Now Let $\displaystyle (x+2) = (1-x)t^2\;,$ Then $\displaystyle x = \frac{t^2-2}{t^2+1} = 1-\frac{3}{t^2+1}$
So $$\displaystyle dx = \frac{6t}{(t^2+1)^2}dt$$ and $$\displaystyle (1-x) = \frac{3}{t^2+1}$$
So Integral $$\displaystyle I = 18\int\frac{t^2}{(t^2+1)\cdot (t^2-2)^2}dt = 6\int\frac{(t^2+1)-(t^2-2)}{(t^2+1)\cdot (t^2-2)^2}dt$$
so we get $$\displaystyle I = 6\int\frac{1}{(t^2-2)^2}dt-6\int\frac{1}{(t^2+1)(t^2-2)}dt$$
