# What is wrong in the second method of computing limits?

We begin by considering the limit: $$\lim_x \to \frac{\pi}{2}}{\frac{\cos{x}}{\sin{x}-1}}$$ By applying L' Hôspital's rule to each side of the limit, we can prove that they are different and so the limit therefore does not exist. Furthermore, it can be proven like this: $$\lim_x \to \frac{\pi}{2}}{\frac{\cos{x}}{\sin{x}-1}}=\lim_x \to \frac{\pi}{2}}{\frac{\cos{x}(\sin{x}+1)}{-\cos^2{x}}}=\lim_x \to \frac{\pi}{2}}{\frac{\sin{x}+1}{-\cos{x}}}$$ and now by checking each side of the limit, I have definitively concluded that the limit does not exist. However, I got curious and tried a $$u$$-substitution, by setting $$u=\displaystyle x-\frac{\pi}{2}$$ and then of course $$u_0=\lim_{x \to \frac{\pi}{2}}{\left(\displaystyle x-\frac{\pi}{2}\right)}=0$$ and so the limit becomes: $$\lim_x \to \frac{\pi}{2}}{\frac{\cos{x}}{\sin{x}-1}}=\lim_{u \to 0}{\frac{\sin{x}}{-\cos{x}-1}}=0$$ What is the substitution not valid in the last method or why does it not work?

• Do you mean, $$\lim_x \to \frac{\pi}{2}}{\frac{\cos{x}}{\sin{x}-1}}=\lim_{u \to 0}{\frac{\sin{u}}{-\cos{u}-1}}=$$, and if so, where did $\lim_{u \to 0}{\frac{\sin{u}}{-\cos{u}-1}}=0$ come from? Jan 29 at 15:21
• You may also be interested in math.stackexchange.com/questions/1342202/… Jan 29 at 15:22
• The last limit should be that for $\frac{\sin u}{\cos u-1}$ Jan 29 at 15:25
• Nomenclature: L'Hôpital's rule, or L'Hospital's rule, but not L'Hôspital's rule. Jan 30 at 0:11
• Not strictly relevant to your question, but please do not put \displaystyle in the bottom of \lim. That is really a pain to the eye. Write instead simply \lim_{x\to\pi/2} to get $$\lim_{x\to\pi/2}$$ which looks way better. Jan 30 at 12:23

Your substitution was incorrect. $$\lim_{ x \to \frac{\pi}{2}}{\frac{\cos{x}}{\sin{x}-1}}=\lim_{u \to 0}{\frac{\cos(\color{red}{u+\frac{\pi}2})}{\sin(\color{red}{u+\frac{\pi}2})-1}}=\lim_{u \to 0}{\frac{-\sin{u}}{\cos{u}-1}}$$