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!
 A: $$\lim_{x\to0}\frac{\log\frac{\tan x}x}{\sin^2x}\stackrel{l'H}=\lim_{x\to0}\frac{\frac x{\tan x}\frac{x\sec^2x-\tan x}{x^2}}{2\sin x\cos x}=\lim_{x\to0}\frac {\frac1{\sin x\cos x}-\frac1x}{2\sin x\cos x}=$$
$$=\lim_{x\to0}\frac{x-\sin x\cos x}{\underbrace{2x\sin^2x\cos^2x}_{=\frac x2\sin^22x}}\stackrel{l'H}=\lim_{x\to0}\frac{\overbrace{1-\cos^2 x+\sin^2x}^{2\sin^2x}}{\frac12\sin^22x+\underbrace{x\sin2x\cos2x}_{=x\sin4x}}\stackrel{l'H}=\lim_{x\to0}\frac{2\sin2x}{2\sin4x+4x\cos4x}=$$
$$\stackrel{l'H}=\lim_{x\to0}\frac{4\cos2x}{12\cos4x-16x\sin4x}=\frac4{12}=\frac13$$
and the limit is $\;\;e^{1/3}\;$
A: Lemma: Suppose $\lim\limits_{x\to0}xy(x)=a$, then
$$
\lim_{x\to0}(1+x)^y=e^a\tag{1}
$$
Proof: For any $\epsilon\gt0$, there is a $\delta\gt0$ so that if $|x|\le\delta$, then
$$
a-\epsilon\le xy\le a+\epsilon\tag{2}
$$
Then, for $|x|\le\delta$,
$$
(1+x)^{\frac{a-\epsilon}x}\le(1+x)^y\le(1+x)^{\frac{a+\epsilon}x}\tag{3}
$$
and taking the limit of $(3)$ as $x\to0$, we get
$$
e^{a-\epsilon}\le\lim_{x\to0}(1+x)^y\le e^{a+\epsilon}\tag{4}
$$
Since $(4)$ is true for any $\epsilon\gt0$, we have $(1)$.
QED

As shown in this answer,
$$
\lim_{x\to0}\frac{x-\sin(x)}{x-\tan(x)}=-\frac12\tag{5}
$$
Applying $\frac1{1-x}$, which is continuous at $x=-\frac12$, to $(5)$ yields
$$
\lim_{x\to0}\frac{\tan(x)-x}{\tan(x)-\sin(x)}=\frac23\tag{6}
$$
Since $\frac{\tan(x)-\sin(x)}{\sin^3(x)}=\frac1{\cos(x)(\cos(x)+1)}$, we get
$$
\begin{align}
\lim_{x\to0}\frac{\tan(x)-x}{x\sin^2(x)}
&=\left(\lim_{x\to0}\frac{\tan(x)-x}{\tan(x)-\sin(x)}\right)\left(\lim_{x\to0}\frac{\tan(x)-\sin(x)}{\sin^3(x)}\right)\left(\lim_{x\to0}\frac{\sin(x)}x\right)\\
&=\frac23\cdot\frac12\cdot1\\[3pt]
&=\frac13\tag{7}
\end{align}
$$

Therefore, applying $(1)$ and $(7)$, we get
$$
\begin{align}
\lim_{x\to0}\left(\frac{\tan(x)}x\right)^{1/\sin^2(x)}
&=\lim_{x\to0}\left(1+\frac{\tan(x)-x}x\right)^{1/\sin^2(x)}\\[6pt]
&=e^{1/3}\tag{8}
\end{align}
$$
A: You have an indeterminate form of kind $1^{\infty}.$ You can solve this type of problems via:
$$\lim_{x\to a} f(x)^{g(x)}=e^{\lim_{x\to a} (f(x)-1)g(x)}.$$
Edit
If $\lim_{x\to a}f(x)=1$ then it is $$\lim_{x\to a} f(x)^{g(x)}=\lim_{x\to a} (1+f(x)-1)^{\dfrac{f(x)-1}{f(x-1)}g(x)}=\lim_{x\to a} \left( (1+f(x)-1)^{\dfrac{1}{f(x)-1}}\right)^{f(x-1)g(x)}.$$
Now, it is $$\lim_{x\to a} \left( (1+f(x)-1)^{\dfrac{1}{f(x)-1}}\right)=e.$$
So, if $\lim_{x\to a} (f(x)-1)g(x)$ exists we have $$\lim_{x\to a} f(x)^{g(x)}=e^{\lim_{x\to a} (f(x)-1)g(x)}.$$
End of the edit
In this case,
$$\begin{align}\lim_{x\to 0}\left(\dfrac{\tan x}{x}-1\right)\dfrac{1}{\sin^2 x} & \\ &= \lim_{x\to 0}\dfrac{\tan x-x}{x\sin^2 x} \\ &=\lim_{x\to 0}\dfrac{\dfrac{1}{\cos^2 x}-1}{\sin^2 x+2x\sin x\cos x}
\\& =\lim_{x\to 0}\dfrac{\sin^2 x}{\cos^2 x(\sin^2 x+2x\sin x\cos x)}\\&=\lim_{x\to 0}\dfrac{\sin x}{\cos^2 x(\sin x+2x\cos x) }\\&
=\lim_{x\to 0}\dfrac{\cos x}{-2\cos x\sin x(\sin x+2x\cos x)+\cos^2x(3\cos x-2x\sin x) }\\&=\dfrac 13.\end{align}$$
A: 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}$.
