Calculating a limit with exponent and trig function I got this limit to calculate:
$$
\lim_{x\to\frac{\pi}{2}}(\tan x)^\frac{1}{x-\frac{\pi}{2}}
$$
I'm trying to solve it with De L'Hopitals rule and the first step should be this, I guess:
$$
\lim_{x\to\frac{\pi}{2}}e^\frac{\ln(\tan x)}{x-\frac{\pi}{2}}
$$
Then I'm trying to solve the limit of the exponent:
$$
\lim_{x\to\frac{\pi}{2}}\frac{\ln(\tan x)}{x - \frac{\pi}{2}}
$$
In the last step I inversed the function in the denominator of the exponent. Next I do:
$$
\lim_{x\to\frac{\pi}{2}}\frac{\frac{1}{\tan x}*\frac{1}{\cos^2x}}{1} = \lim_{x\to\frac{\pi}{2}}\frac{1}{\tan x\cos^2x}= \lim_{x\to\frac{\pi}{2}}=...
$$
Skipping a few calculations, in the end I get
$$
\lim_{x\to\frac{\pi}{2}}\frac{1}{2\cos x\sin^3x}
$$
Which would mean the limit of the exponent = infinity, but the answer sheet says it's 2. I have a strong feeling I did something wrong in one of the first steps, however I'm unable to find out what exactly...
 A: Something's broken.  First, if $x$ is a bit bigger than $\pi/2$, then $\tan x$ is negative which makes the exponential really hard to deal with.  So the limit only makes sense "from the left."
In that case, there's something odd with the steps you skipped.  $\tan x \cos^2 x = \sin x \cos x =\frac{1}{2}\sin 2x.$
A: $$L=\lim_{x \to \pi/2} (\tan x)^{1/(x-\pi/2)}$$
Lrt $x-\pi/2=y$
Then $$L=\lim_{y\to 0} (-\cot y)^{1/y}=\lim_{y \to 0} (-1/y)^{1/y}$$
Left limit $$L=\lim_{y\to 0^-} (\infty)^{-\infty}=0$$
Right limit $$\lim_{y \to 0^+} (-1/y)^{1/y}\to (-\infty)^{ \infty} \to \infty.$$
So the linit does not exist.
A: Being,
$$\lim_{x \to \frac{\pi}{2}^-} \tan^{\frac{1}{x - \frac{\pi}{2}}}{\left(x \right)} = \lim_{x \to \frac{\pi}{2}^-} e^{\ln{\left(\tan^{\frac{1}{x - \frac{\pi}{2}}}{\left(x \right)} \right)}}=\lim_{x \to \frac{\pi}{2}^-} e^{\frac{\ln{\left(\tan{\left(x \right)} \right)}}{x - \frac{\pi}{2}}}=\lim_{x \to \frac{\pi}{2}^-} e^{\frac{\ln{\left(\tan{\left(x \right)} \right)}}{x - \frac{\pi}{2}}} = e^{\lim_{x \to \frac{\pi}{2}^-} \frac{\ln{\left(\tan{\left(x \right)} \right)}}{x - \frac{\pi}{2}}}$$
and after
$$\lim_{x \to \frac{\pi}{2}^-} \frac{\ln{\left(\tan{\left(x \right)} \right)}}{x - \frac{\pi}{2}} = -\infty$$
hence:
$$\lim_{x \to \frac{\pi}{2}^-} \tan^{\frac{1}{x - \frac{\pi}{2}}}{\left(x \right)} = 0$$
For $x\to\frac{\pi}{2}^+, \ln(\tan (x))\to \nexists$ because $\tan(x)<0$.
Therefore the limit not exist.
