$$\int \sqrt{\frac{x}{2-x}}dx$$
can be written as:
$$\int x^{\frac{1}{2}}(2-x)^{\frac{-1}{2}}dx.$$
there is a formula that says that if we have the integral of the following type:
$$\int x^m(a+bx^n)^p dx,$$
then:
- If $p \in \mathbb{Z}$ we simply use binomial expansion, otherwise:
- If $\frac{m+1}{n} \in \mathbb{Z}$ we use substitution $(a+bx^n)^p=t^s$ where $s$ is denominator of $p$;
- Finally, if $\frac{m+1}{n}+p \in \mathbb{Z}$ then we use substitution $(a+bx^{-n})^p=t^s$ where $s$ is denominator of $p$.
If we look at this example:
$$\int x^{\frac{1}{2}}(2-x)^{\frac{-1}{2}}dx,$$
we can see that $m=\frac{1}{2}$, $n=1$, and $p=\frac{-1}{2}$ which means that we have to use third substitution since $\frac{m+1}{n}+p = \frac{3}{2}-\frac{1}{2}=1$ but when I use that substitution I get even more complicated integral with square root. But, when I tried second substitution I have this:
$$2-x=t^2 \Rightarrow 2-t^2=x \Rightarrow dx=-2tdt,$$
so when I implement this substitution I have:
$$\int \sqrt{2-t^2}\frac{1}{t}(-2tdt)=-2\int \sqrt{2-t^2}dt.$$
This means that we should do substitution once more, this time:
$$t=\sqrt{2}\sin y \Rightarrow y=\arcsin\frac{t}{\sqrt{2}} \Rightarrow dt=\sqrt{2}\cos ydy.$$
So now we have:
\begin{align*} -2\int \sqrt{2-2\sin^2y}\sqrt{2}\cos ydy={}&-4\int\cos^2ydy = -4\int \frac{1+\cos2y}{2}dy={} \\ {}={}& -2\int dy -2\int \cos2ydy = -2y -\sin2y. \end{align*}
Now, we have to return to variable $x$:
\begin{align*} -2\arcsin\frac{t}{2} -2\sin y\cos y ={}& -2\arcsin\frac{t}{2} -2\frac{t}{\sqrt{2}}\sqrt\frac{2-t^2}{2}={} \\ {}={}& -2\arcsin\frac{t}{2} -\sqrt{t^2(2-t^2)}. \end{align*}
Now to $x$:
$$-2\arcsin\sqrt{\frac{2-x}{2}} - \sqrt{2x-x^2},$$
which would be just fine if I haven't checked the solution to this in workbook where the right answer is:
$$2\arcsin\sqrt\frac{x}{2} - \sqrt{2x-x^2},$$
and when I found the derivative of this, it turns out that the solution in workbook is correct, so I made a mistake and I don't know where, so I would appreciate some help, and I have a question, why the second substitution works better in this example despite the theorem i mentioned above which says that I should use third substitution for this example?