Evaluate limit without using L'H rule I was revising teacher's notes about L'H rule and I came across this limit.

$$\lim_{x \to \frac{\pi}{2}} \frac{x-\frac{\pi}{2}}{\sqrt{1-\sin x}}$$

The teacher tried to evaluate without L'H to demonstrate L'H is necessary here but I can't explain the first passage he did:
$$\lim_{x \to \frac{\pi}{2}} \frac{x-\frac{\pi}{2}}{\sqrt{1-\sin x}} = \lim_{x \to \frac{\pi}{2}} \frac{1}{\frac{-\cos x}{2\sqrt{1-\sin x}}}$$
Can you please help me?
 A: Hint
$\dfrac\pi2-x=2y$
$$\lim_{y\to0}\dfrac{-2y}{\sqrt{1-\cos2y}}=-\sqrt2\lim_{...}\dfrac y{|\sin y|}$$
So, the limit doesn't exist
A: Hint: Put $t=x-{\pi \over 2}$, then you got
$$\lim_{t \to 0} \frac{t}{\sqrt{1-\cos t}}$$
Now write $s=t/2$, so $t=2s$...
A: Here is a way without L'Hospital using 


*

*$\lim_{y\to 0}\frac{\sin y}{y} = 1$ (which can be shown without L'Hospital) and

*$\cos (y+ \frac{\pi}{2}) = -\sin y$
$$\frac{x-\frac{\pi}{2}}{\sqrt{1-\sin x}}= \underbrace{\frac{x-\frac{\pi}{2}}{|\cos x|}}_{\stackrel{y = x - \frac{\pi}{2}}{=} \frac{y}{|\sin y|}
\begin{cases}
\stackrel{y \to 0^+}{\longrightarrow} & 1 \\
\stackrel{y \to 0^-}{\longrightarrow} & -1 \\
\end{cases}}
\cdot \sqrt{1+\sin x}
\begin{cases}
\stackrel{x \to (\frac{\pi}{2})^+}{\longrightarrow} & \sqrt{2} \\
\stackrel{x \to (\frac{\pi}{2})^-}{\longrightarrow} & -\sqrt{2} \\
\end{cases}$$
So, only the one-sided limits exist and are different.
A: Let $h=x-\pi/2\implies h\to 0$ as $x\to \pi/2$ $$\begin{aligned}\lim_{x\to \pi/2}\dfrac{x-\pi/2}{\sqrt{1-\sin x}}&=\lim_{h\to 0}\dfrac{h}{\sqrt{1-\cos h}}\cdot\dfrac{\sqrt{1+\cos h}}{\sqrt{1+\cos h}}\\&=\lim_{h\to 0}\dfrac{h}{\mid\sin h\mid}\cdot\lim_{h\to 0}\sqrt{1+\cos h}\end{aligned}$$
Define $f(h)=\dfrac{h\sqrt{1+\cos h}}{\mid \sin h\mid}$. Note that since $\lim_{h\to 0^+}f(h)\ne \lim_{h\to 0^-}f(h)$, the limit does not exist.
