Find $\int \frac{dx}{\sqrt{(1-2x-x^2)}}$ completing square.
$$=\int \frac{dx}{\sqrt{-(x+1)^2+2}}$$
I know that $\int \frac{dx}{\sqrt{x^2+a}}=\ln|x+\sqrt{x^2+a}|+C$
but here we have $-(x+1)^2$.
So with method shown in the image I tried to take out formula for $-(x+1)^2$
but in the image $t^2+a$'s are cancelling which didn't happen in the example that I tried.

Let $1+x=\sqrt{2}t,$ $dx=\sqrt{2}dt$ so we have
$$\int \frac{dx}{\sqrt{-(x+1)^2+2}}=\int\frac{\sqrt{2}dt}{\sqrt{2-2t^2}}=\int\frac{1}{\sqrt{1-t^2}}dt$$
Now let $t=\sin(v), dt=\cos(v)dv$ which gives
$$\int\frac{1}{\sqrt{1-t^2}}dt=\int\frac{\cos(v)}{\sqrt{1-\sin^2(v)}}dv=\int dv=...$$
Note: substituting $1+x=\sqrt{2}\sin(v)$ gets you directly to the last integral.