TITLE: Integral becomes improper after a substitution
QUESTION [10 upvotes]: I'm suprised about the following phenomenon which I would like to discuss with you. Consider the proper integral
$$\int_{\pi/4}^{\pi/2}\frac{1}{\sin(x)}dx.$$
Since $\sin(x)$ is a diffeomorphism on the interval $(\pi/4,\pi/2)$ we can make the substitution $\phi(x):=\arcsin(x)$. Since $d\phi(x)=\frac{dx}{\cos(\arcsin(x))}=\frac{dx}{\sqrt{1-x^2}}$ we get:
$$\int_{\pi/4}^{\pi/2}\frac{1}{\sin(x)}dx=\int_{1/\sqrt{2}}^{1}\frac{1}{x\cdot \sqrt{1-x^2}}dx.$$
Suddenly the integral becomes improper, which feels somehow 'wrong' to me. But I do not think that there is a mistake in the argumentation which leads from the initial integral to the improper, new one.
Do you know further examples similar to the above one? I hope someone of you can help me to eliminate my 'uncomfortable' or 'wrong' freeling about this situation, for -as the calculation shows- the situation is quite natural.
Best wishes
edit: Another (maybe more familiar) notation to write the substitution would be:
$z:=\sin(x)\Rightarrow dz=\cos(x)dx=\sqrt{1-z^2}dx\Rightarrow \frac{dz}{\sqrt{1-z^2}}=dx$. Hence we get the integral
$$\int_{1/\sqrt{2}}^{1}\frac{1}{z\cdot\sqrt{1-z^2}}dz$$

REPLY [2 votes]: The change of variable that you chose induces the "improperness", as the derivative of $\sin(x)$ vanishes at $x=\pi/2$, so that $dz=\cos(x)\,dx$ degenerates.
You have a similar phenomenon with the substitution $x=e^t$ in the integral below:
$$\int_0^1\,dx=\int_{-\infty}^0 e^{t}\,dt=e^t\Big|_{-\infty}^0.$$