How can a doubly improper integral become a singly improper integral after substitution?
If we take $x=\sin^2{t}$ then:
$$\int_0^1\frac{1}{x\sqrt{1-x}}dx=2\int_0^{\pi/2}\csc{t}dt$$
On the lefthand side the integral is doubly improper on both the lower ($0$) and upper ($1$) bound. But after substitution the new integral is only improper at the lower bound ($0$). How come? What happened to the improper upper bound?
The same happens if you consider $$ \int_0^1\frac{1}{\sqrt{x}}\,dx $$ with the substitution $\sqrt{x}=t$ or $x=t^2$ that transforms the integral into $$ \int_0^1\frac{2t}{t}\,dt=\int_0^1 2\,dt=2 $$ no longer an improper integral.
Note that an antiderivative of $1/\sqrt{x}$ is $2\sqrt{x}$, which is not differentiable at $x$.