Find $\lim\limits_{x\to\frac\pi2}(1-\sin x)\tan^2 x.$ I'm stuck finding following limit.
$$\lim_{x\to\frac\pi2}(1-\sin x)\tan^2 x.$$
Attempt: I tried to use L'Hopital rule but I cant find the solution

I usually advise to “go at $0$”: do the substitution $x=\pi/2-t$, so the limit becomes
$$
\lim_{t\to0}(1-\cos t)\cot^2t=
\lim_{t\to0}\frac{1-\cos t}{\sin^2t}\cos^2t=
\lim_{t\to0}\frac{1-\cos t}{t^2}\frac{t^2}{\sin^2t}\cos^2t
$$
If you want to use l'Hôpital, do
$$
\lim_{x\to\pi/2}\frac{1-\sin x}{\cot^2x}
\overset{\mathrm{(H)}}{=}
\lim_{x\to\pi/2}\frac{-\cos x}{-2\cot x/\sin^2x}
$$
Now simplify.
