Evaluate $\int \dfrac{dx}{(1+x)\sqrt{1+2x-x^2}}$ 
$$\int \dfrac{dx}{(1+x)\sqrt{1+2x-x^2}}$$

I completed the square:
$\int \dfrac{dx}{(1+x)\sqrt{2-(x-1)^2}}$
And then substituted $\sqrt 2\sin θ = x-1$ which gives
$\int \dfrac{dθ}{\sqrt2 \sinθ + 2}$
But now I'm stuck. Can someone please help?
 A: If you have a rational function involving trigonometric functions, try a Weierstrass substitution.
$$t=\tan\left(\frac {\theta}2\right)\qquad\mathrm d\theta=\frac {2}{1+t^2}\,\mathrm dt\qquad\sin\theta=\frac {2t}{1+t^2}$$
Hence
$$\begin{align*}\int\frac {\mathrm d\theta}{2+\sqrt{2}\sin\theta} & =\int\frac {\mathrm dt}{t^2+t\sqrt{2}+1}\\ & =\int\frac {\mathrm dt}{\left(t+\frac 1{\sqrt{2}}\right)^2+\frac 12}\end{align*}$$
Can you complete the rest?

Another Approach
I also want to bring to light another possible substitution that, as far as I'm aware, isn't normally taught in a school setting (at least I didn't get taught this).
If you're daring enough and complacent with a large amount of algebraic manipulation up-front, then another possible solution would be to enforce an Euler Substitution of the Second Kind.
The substitution states that for an integral whose integrand is a purely rational function (i.e., no trigonometric terms)
$$\int R\left(x, \sqrt{ax^2+bx+c}\right)\,\mathrm dx$$
Where we impose the condition $c>0$, then an Euler substitution of the Second Kind gives
$$\sqrt{ax^2+bx+c}=xt+\sqrt{c}\qquad\qquad x=\frac {2t\sqrt{c}-b}{a-t^2}$$
In this case, since we have $c>0$, then our substitution is simply
$$\sqrt{1+2x-x^2}=xt+1\qquad\qquad x=\frac {2(1-t)}{1+t^2}$$
With this given substitution for $x$, we have that
$$x+1=\frac {3-2t+t^2}{1+t^2}\qquad\sqrt{1+2x-x^2}=\frac {1+2t-t^2}{1+t^2}\qquad\mathrm dx=\frac {2(t^2-2t-1)}{(1+t^2)^2}\,\mathrm dt$$
Right from the get-go, we can see that a lot of terms will cancel, which is the impressive nature of Euler Substitutions
$$\begin{align*}\int\frac {\mathrm dx}{(1+x)\sqrt{1+2x-x^2}} & =-2\int\frac {1+2t-t^2}{(1+t^2)^2}\frac {1+t^2}{t^2-2t+3}\frac {1+t^2}{1+2t-t^2}\,\mathrm dt\\ & =-2\int\frac {\mathrm dt}{(t-1)^2+2}\\ & =\sqrt{2}\arctan\left(\frac {1-t}{\sqrt2}\right)+C\end{align*}$$
Substituting our expression back in, then we get an impressive result
$$\int\frac {\mathrm dx}{(1+x)\sqrt{1+2x-x^2}}=\sqrt{2}\arctan\left(\frac {1+x-\sqrt{1+2x-x^2}}{x\sqrt2}\right)+C$$
Confirmed by Wolfram Alpha
A: Another method: Start with $x=\dfrac 1t$ so $dx=\dfrac{-1}{t^2}dt$. We have \begin{align}\int \dfrac{dx}{(1+x)\sqrt{1+2x-x^2}}&= \int \dfrac{\frac{-dt}{t^2}}{\left(1+\dfrac 1t\right)\sqrt{1+\dfrac2t-\dfrac {1}{t^2}}}\\&= \int \dfrac{-dt}{(1+t)\sqrt{t^2+2t-1}}.\end{align} Now use $t+1=u$ so $dt=du$.
$$\int \frac{-du}{u\sqrt{u^2-2}}$$ which can be solved by putting $u^2-2=p$.

EDIT: Another, maybe more useful, substitution would be $x+1=v$.
A: You may continue with $\theta=\frac\pi2+t$
\begin{align}\int \frac{1}{\sqrt2 \sin\theta+ 2}d\theta
= &\int \frac{1}{\sqrt2 \cos t+ 2}dt= \int \frac{1}{2\sqrt2 \cos^2\frac t2+ 2-\sqrt2}dt\\
=&\int \frac{2d(\tan\frac t2)}{(2-\sqrt2)\tan^2\frac t2+(2+\sqrt2)}=\sqrt2\tan^{-1}\frac{\tan\frac t2}{\sqrt2+1}+C
\end{align}
Or, simply integrate as follows
$$\int \frac{dx}{(1+x)\sqrt{1+2x-x^2}}
= \int \frac{d(\frac{x}{1+x})}{\sqrt{1-2(\frac{x}{1+x})^2}}= \frac1{\sqrt2}\sin^{-1} \frac{\sqrt2x}{1+x}+C
$$
