Evaluate the limit: $$\lim_{x\to \frac {\pi}{2}} \frac {\cos x}{\log (x-\frac {\pi}{2} +1)}$$
... The given function takes indeterminate form $(\frac {0}{0})$ when $x=\frac {\pi}{2}$. Let $x-\frac {\pi}{2}=y$, $x=y+\frac {\pi}{2}$. As $x\to \frac {\pi}{2}$; $y\to 0$. Now, $$=\lim_{y\to 0} \frac {\cos (y+\frac {\pi}{2})}{\log (y+1)}$$ $$=\lim_{y\to 0} \frac {-\sin \frac {\pi}{2}}{\log (y+1)}$$
With your substitution we obtain: $$\lim_{y\rightarrow0}\frac{-\sin{y}}{\ln(1+y)}=\lim_{y\rightarrow0}\frac{-\sin{y}}{y}\lim_{y\rightarrow0}\frac{y}{\ln(1+y)}=-1\cdot1=-1$$