Evaluate $\int\frac1x(\frac{1-√x}{1+√x})^{\frac12}dx$
My Attempt:
Inside the bracket, multiplying and dividing by $(1-√x)$,
$\int\frac1x\frac{1-√x}{(1-x)^{\frac12}}dx$
Putting $(1-x)^\frac12=t\implies 1-x=t^2\implies x=1-t^2\implies dx=-2tdt$
Thus, the integral becomes $\int{\frac{1-\sqrt{1-t^2}}{(1-t^2)(t)}(-2t)dt}=-2\int{\frac{1-\sqrt{1-t^2}}{1-t^2}dt}$
It can be written as $-2\int{\frac1{1-t^2}dt}+2\int{\frac1{\sqrt{1-t^2}}dt}$
Thus, my answer is $-\ln|\frac{1+t}{1-t}|+2\arcsin t+c$, where $t=\sqrt{1-x}$
But the answer neither matches with wolfram nor with this video solution.
What's going on here?
EDIT:
After Tony's comment, I plotted my answer on wolfram, and it doesn't match with wolfram's answer to original question.
Wolfram also gives derivative of my answer, which sort of matches with the original question but not exactly.
I think the issue here is of domain.
But in general, while substituting, we don't think of domain. Or do we? If yes, is there any general advice which could be applied to such questions?
Your solution does agree with WolframAlpha's (see the first listed alternate form):
$$\begin{align*} & -\ln\left|\frac{1+t}{1-t}\right| + 2 \arcsin t + C \\ &= - \ln\left|\frac{1+\sqrt{1-x}}{1-\sqrt{1-x}}\right| + 2\arcsin \sqrt{1-x} + C \\ &= - 2\operatorname{artanh} \sqrt{1-x} + 2\left(\frac\pi2-\arcsin \sqrt x\right) + C \\ &= -2\operatorname{artanh}\sqrt{1-x} - 2\arcsin \sqrt x + C \end{align*}$$
Make use of the identity, $$\arcsin x+\arcsin y=\arcsin\left( x\sqrt{1-y^2} + y\sqrt{1-x^2}\right)$$ as well as the logarithmic form of $\operatorname{artanh}$, $$\operatorname{artanh}z=\frac12 \ln\frac{1+z}{1-z}$$