Calculate exponential limit involving trigonometric functions Calculate the following limit:
$$\lim_{x \rightarrow 0} \left( \frac{\tan x}{x} \right) ^ \frac{1}{\sin^2 x}$$
I know the result must be $\sqrt[3]{e}$ but I don't know how to get it. I've tried rewriting the limit as follows:
$$\lim_{x \rightarrow 0} e ^ {\ln {\left( \frac{\tan x}{x} \right) ^ \frac{1}{\sin^2 x}}} = \lim_{x \rightarrow 0} e ^ {\frac{1}{\sin^2 x} \ln {\left( \frac{\tan x}{x} \right)}}$$
From this point, I applied l'Hospital's rule but got $1$ instead of $\sqrt[3]{e}$.
Thank you!

To evaluate 
$$
\lim_{x\rightarrow 0}\left(\frac{\tan(x)}{x}\right)^{\frac{1}{\sin^2(x)}}
$$
we first observe that $\lim_{x\rightarrow 0}\frac{\tan(x)}{x}=\lim_{x\rightarrow 0}\frac{1}{\cos(x)}\frac{\sin(x)}{x}$.  Both of these factors approach $1$ as $x$ approaches $0$.  On the other hand, since $\sin(x)$ approaches $0$ as $x$ approaches $0$, this limit is of the form $1^\infty$.  We now consider exponentiation:
$$
\lim_{x\rightarrow 0}\left(\frac{\tan(x)}{x}\right)^{\frac{1}{\sin^2(x)}}
=\operatorname{exp}\left(\lim_{x\rightarrow 0}\frac{1}{\sin^2(x)}\ln\left(\frac{\tan(x)}{x}\right)\right).
$$
We now investigate the limit:
$$
\lim_{x\rightarrow 0}\frac{1}{\sin^2(x)}\ln\left(\frac{\tan(x)}{x}\right).
$$
Since we have seen that $\frac{\tan(x)}{x}$ approaches $1$, the logarithm approaches $0$, so this is of indeterminate form $\frac{0}{0}$ and l'Hopital's rule applies.  Therefore,
\begin{align*}
\lim_{x\rightarrow 0}\frac{1}{\sin^2(x)}\ln\left(\frac{\tan(x)}{x}\right)&=
\lim_{x\rightarrow 0}\frac{1}{2\sin(x)\cos(x)}\frac{1}{\frac{\tan(x)}{x}}\frac{x\cos^2(x)-\sin(x)(\cos(x)-x\sin(x))}{x^2}\\
&=\lim_{x\rightarrow 0}\frac{x-\sin(x)\cos(x)}{2x\sin^2(x)}
\end{align*}
This is, again, an indeterminate form of $\frac{0}{0}$, so we can apply l'Hopital's rule again to get
\begin{align*}
\lim_{x\rightarrow 0}\frac{x-\sin(x)\cos(x)}{2x\sin^2(x)}&=\lim_{x\rightarrow 0}\frac{1-\cos^2(x)+\sin^2(x)}{2\sin^2(x)+2x\sin(x)\cos(x)}\\
&=\lim_{x\rightarrow 0}\frac{2\sin^2(x)}{2\sin^2(x)+4x\sin(x)\cos(x)}\\
&=\lim_{x\rightarrow 0}\frac{\sin(x)}{\sin(x)+2x\cos(x)}
\end{align*}
Once again, this is of an indeterminate form $\frac{0}{0}$.  So, we apply l'Hopital's rule one last time to get
\begin{align*}
\lim_{x\rightarrow 0}\frac{\sin(x)}{\sin(x)+2x\cos(x)}&=\lim_{x\rightarrow 0}\frac{\cos(x)}{\cos(x)+2\cos(x)-2x\sin(x)}=\frac{1}{3}.
\end{align*}
Therefore, the original limit is $e^{1/3}$.
