Don't know how to solve limits that have tan(x) as a power. I have these two problems.
The first one is:
$$\lim_{x \to \pi/2} \left(\frac{2x} \pi\right)^{\tan(x)}$$
and the second one is:
$$\lim_{x \to \pi/4} (\tan(x))^{\tan(2x)}$$
The way I'm trying to solve them is by taking the natural logarithm of both sides and then trying to apply l'Hôpital's rule on the limit's side. However, in both cases, I found myself stuck trying to figure out how to find the limit of the denominator, which happens to be $$\frac{1} {\tan x}$$ And $$\frac{1}{\tan(2x)}$$.
 A: Let $$L_1=\lim_{x \to \pi/2} \left(\frac{2x} \pi\right)^{\tan(x)}.$$
This means that
$$\begin{align}\ln L_1&=\lim_{x \to \pi/2} \tan x\ln\left(\frac{2x} \pi\right)\\
&=\lim_{x \to \pi/2}\frac{\ln\left(\frac{2x} \pi\right)}{\frac{1}{\tan x}}=\lim_{x \to \pi/2}\frac{\ln\left(\frac{2x} \pi\right)}{\cot x}\\
&=\lim_{x \to \pi/2}\frac{\frac{1}{x}}{-\operatorname{cosec}^2 x}\\
&=-\frac{2}{\pi}
\end{align}$$
where I used L'Hopitals rule in the $3$rd line. So the way I got rid of $\frac{1}{\tan x}$ was by writing it as $\cot x$.
Can you do the other one now?

I hope that was helpful. If you have any questions please don't hesitate to ask.
A: use l'hopital to differentiate the denominators as well as the numerator and then compute the limit.
follow : https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule
A: Note that $\lim_{x \to \pi/2} \tan(x) $ does not exist, since $\lim_{x \to \pi/2^-} \tan(x) = +\infty $ and $\lim_{x \to \pi/2^+} \tan(x) = -\infty $. But this is not a serious problem, since $\lim_{x \to \pi/2} \dfrac{1}{\tan(x)} = 0$. So you have an indet $\dfrac{0}{0}$ and you can apply l'hopital's rule.
