How to determine $\lim_{x\to \frac{\pi}{2}^-}{(\tan x)^{x-\frac{\pi}{2}}}$ Could anyone help me with this trigonometric limit? I'm trying to evaluate it using L'Hôpital's rule.
I tried the following:
$y = x - \frac{\pi}{2}$ and as x approaches $\frac{\pi}{2}$, $y$ approaches $0$
so I got $\lim_{x\to \frac{\pi}{2}^-}{(\tan (y + \frac{\pi}{2}))^y}$
I am stuck at deriving to get a $\frac{0}{0}$
 A: Here are the steps
$$ \lim\limits_{x\to\frac{\pi}{2}^-} \left(\tan x\right)^{x-\frac{\pi}{2}} $$
Let $z=x-\frac{\pi}{2}$, so now we have
$$\lim\limits_{z\to 0^-} \left(\tan\left(z+\frac{\pi}{2}\right)\right)^{z}=\lim\limits_{z\to 0^-} \left(-\cot z\right)^{z}$$
$$=\lim\limits_{z\to 0^-} \exp\left(\ln\left(-\cot z\right)^{z}\right)=\lim\limits_{z\to 0^-} \exp\left(z\ln\left(-\cot z\right)\right)$$
$$ =\exp\left(\lim\limits_{z\to 0^-} \left[z\ln\left(-\cot z\right)\right]\right)=\exp\left(\lim\limits_{z\to 0^-} \left[\frac{\ln\left(-\cot z\right)}{\dfrac{1}{z}}\right]\right) $$
$$ = \exp\left(\lim\limits_{z\to 0^-} \left[\frac{\frac{d}{dz}[\ln\left(-\cot z\right)]}{\frac{d}{dz}\left[\dfrac{1}{z}\right]}\right]\right)= \exp\left(\lim\limits_{z\to 0^-} \left[\frac{-\csc(z)\sec(z)}{-\dfrac{1}{z^2}}\right]\right) $$
$$ = \exp\left(\lim\limits_{z\to 0^-} \left[z^2\csc(z)\sec(z)\right]\right)= \exp\left(\lim\limits_{z\to 0^-} \left[\frac{z^2}{\sin(z)\cos(z)}\right]\right)
$$
$$= \exp\left(\lim\limits_{z\to 0^-} \left[\frac{z^2}{\sin(z)}\right]\cdot \lim\limits_{z\to 0^-}\left[\frac{1}{\cos(z)}\right]\right)=\exp\left(\lim\limits_{z\to 0^-} \left[\frac{\frac{d}{dz}\left[z^2\right]}{\frac{d}{dz}[\sin(z)]}\right]\cdot \left[\frac{1}{\cos(0)}\right]\right)
$$
$$ =\exp\left(\lim\limits_{z\to 0^-} \left[\frac{2z}{\cos(z)}\right]\cdot 1\right) =\exp\left(\frac{0}{1}\right)=\exp\left(0\right)=1 $$
A: Hint: First apply $\log$ to the expression in the limit.
A: make a change of variable $$\pi/2 - x = 1/u, y = (\tan x )^{x-\pi/2} = \left(\tan(\pi/2 - 1/u)\right)^{-1/u} = \left(\frac{\cos 1/u}{\sin 1/u}\right)^{-1/u}$$ taking the logarithm gives $$\ln y = -\frac{\ln(u+ \cdots   )}{u} \to 0 \text{ as } u \to \infty. $$
therefore $$\lim_{x \to \pi/2-} (\tan x )^{\pi/2 - x} = 1$$
