Limit of $\sqrt[x]{\frac{\tan x}{x}}$ as $x \to 0$ I am trying to calculate the Limit
$$\lim_{x \to 0} \sqrt[x]{\frac{\tan x}{x}}$$
Wolfram Alpha says it's $1$. But I get
$$\lim_{x \to 0} \sqrt[x]{\frac{\tan x}{x}}$$
$$= \exp \lim_{x \to 0} \ln \left(\left(\frac{\tan x}{x}\right)^{1/x}\right)$$
$$= \exp \lim_{x \to 0} \frac{\ln(\tan(x)) - \ln(x)}{x}$$
Using L'Hospital:
$$= \exp \lim_{x \to 0} \frac{\frac{1}{\tan(x)\cos^2(x)} - \frac{1}{x}}{1}$$
$$= \exp \lim_{x \to 0} \frac{1}{\sin(x)\cos(x)} - \frac{1}{x}$$
$$= \exp \lim_{x \to 0} \frac{1}{\sin(2x)} - \frac{1}{x}$$
$$= \exp \lim_{x \to 0} \frac{x - \sin(2x)}{\sin(2x) x}$$
But when I calculate
$$\lim_{x \to 0} \frac{x - \sin(2x)}{\sin(2x) x}$$ with Wolfram Alpha I get $\pm \infty$ . So the limit of $\lim_{x \to 0} \sqrt[x]{\frac{\tan x}{x}}$ should be $e^{\pm \infty} = 0 \text{ or } \infty \neq 1$. Which is both wrong.
Where is my mistake?
 A: You can also use Taylor expansions
$$\tan (x)=x+\frac{x^3}{3}+ ...$$
$$\frac{\tan (x)}{x}=1+\frac{x^2}{3}+ ...$$
$$\left(\frac{\tan (x)}{x}\right)^{\frac{1}{x}}=1+\frac{x}{3}+ ... $$
A: $\sin x \cos x = \frac{\sin 2x}{2}$, instead of just $\sin 2x$
A: If $L$ is the limit to be evaluated then we have $$\begin{aligned}\log L &= \log\left(\lim_{x \to 0}\sqrt[x]{\frac{\tan x}{x}}\right)\\
&= \lim_{x \to 0}\log\left(\sqrt[x]{\frac{\tan x}{x}}\right)\text{ (by continuity of }\log)\\
&= \lim_{x \to 0}\dfrac{\log\left(\dfrac{\tan x}{x}\right)}{x}\\
&= \lim_{x \to 0}\dfrac{\log\left(1 + \dfrac{\tan x}{x} - 1\right)}{\dfrac{\tan x}{x} - 1}\cdot\dfrac{\dfrac{\tan x}{x} - 1}{x}\\
&= \lim_{x \to 0}1\cdot\frac{\tan x - x}{x^{2}}\text{ (because }y = \frac{\tan x}{x} - 1 \to 0\text{ and }\lim_{y \to 0}\frac{\log(1 + y)}{y} = 1)\\
&= \lim_{x \to 0}\frac{\sin x - x\cos x}{x^{2}\cos x}\\
&= \lim_{x \to 0}\frac{\sin x - x\cos x}{x^{2}\cdot 1}\\
&= \lim_{x \to 0}\frac{\sin x - x}{x^{2}} + x\cdot\frac{1 - \cos x}{x^{2}}\\
&= 0 + 0\cdot \frac{1}{2} = 0\end{aligned}$$ The first limit is calculated here without any series expansion or LHR and the second limit is pretty standard based on $1 - \cos x = 2\sin^{2}(x/2)$ and using $\lim_{x \to 0}\dfrac{\sin x }{x} = 1$. It follows that $L = e^{0} = 1$.
Update: It is also possible to use the approach of the linked answer above to calculate the limit $$\lim_{x \to 0}\frac{\tan x - x}{x^{2}}$$ Clearly if $0 < x < \dfrac{\pi}{2}$ then we have $\sin x < x < \tan x$ so that $$0 < \frac{\tan x - x}{x^{2}} < \frac{\tan x - \sin x}{x^{2}} = \tan x\cdot\frac{1 - \cos x}{x^{2}}$$ Taking limits as $x \to 0^{+}$ and using Squeeze Theorem we get $$\lim_{x \to 0^{+}}\frac{\tan x - x}{x^{2}} = 0$$ And to handle $x \to 0^{-}$ we can put $ x = -y$ and get the left hand limit also as $0$.
