Finding $\lim_{x\to 0} \frac{(1+\tan x)^{\frac{1}{x}}-e}{x}$ How would I go about solving this following limit?
$$\lim_{x\to 0} \frac{(1+\tan x)^{\frac{1}{x}}-e}{x}$$
My attempts:
Direct substitution yields the limit to be undefined, also ruling out the possibility of using L'Hospital's Rule.
I don't see any clever substitutions that can be made with this limit.
Would squeeze theorem help here? Maybe using the trig. identities:
$$-1 \le \cos x \le 1$$
and
$$-1 \le \cos x \le 1$$
EDIT
I attempted to break the limit down term by term.
So, for the first one:
$$y = \lim_{x\to 0} (1 + \tan x)^{1/x}$$
Taking the natural log of both sides:
$$\ln y = \lim_{x\to 0} \frac{\ln(1+\tan x)}{x}$$
Direct sub. yields $0/0$. Using L'Hospital's rule:
$$\ln y = \lim_{x\to 0} \frac{\frac{\sec^2{x}}{1+\tan x}}{1} = \frac{\sec^2{x}}{1+\tan x} = 1$$
Thus, $\ln y = 1$, so $y= e$
EDIT #2
Thanks to a random comment, it actually does help me:
$$\lim_{x\to 0} \frac{(1+\tan x)^{\frac{1}{x}}-e}{x}$$
$$\lim_{x\to 0} \frac{e-e}{0} = \frac{0}{0}$$
Thus, we can use L'Hospitals here:
$$\lim_{x\to 0} \frac{(\tan x+1)^{1/x} \left(\frac{\sec^2 x}{x(\tan(x)+1)}-\frac{\ln(\tan(x)+1))}{x^2}\right)}{1} = (\tan x+1)^{1/x} \left(\frac{\sec^2 x}{x(\tan(x)+1)}-\frac{\ln(\tan(x)+1))}{x^2}\right)$$
I haven't made any further progress, sadly.
Any help would be appreciated.
 A: You may write, for $x$ near $0$,
$$
\tan x=x+\frac{x^3}{3}+\mathcal{O}(x^5)
$$
$$
\log(1+\tan x)=x-\frac{x^2}{2}+\mathcal{O}(x^3)
$$
$$
\frac1x\log(1+\tan x)=1-\frac{x}{2}+\mathcal{O}(x^2)
$$ then
$$
e^{\frac1x\log(1+\tan x)}=e^{1-\frac{x}{2}+\mathcal{O}(x^2)}=e(1-\frac{x}{2}+\mathcal{O}(x^2))
$$ and
$$
\frac{(1+\tan x)^{\frac{1}{x}}-e}{x}=\frac{e(1-\frac{x}{2}+\mathcal{O}(x^2))-e}{x}=-\frac{e}{2}+\mathcal{O}(x)
$$ giving $\displaystyle -\frac{e}{2} $ as limit.
A: First observe asimtotic of $1+tan(x)$, it is 1+x+o(x).
Than find asimtotic of $(1+x)^{1/x} $= $e^{{\frac{1}{x}}{ln(1+x)}}$=$e^{1/x}$=
$e^{\frac{1}{x}*(x-x^2/2+o(x))}$, and that is like $e*e^{-x/2}$
Then we have in nominator asimtotic like: $e*e^{-x/2}-e=e*(e^{-x/2}-1)=e*(1-x/2+o(x)-1)=e*(-x/2)$
and your linit is like $ \lim_{x->0}\frac{e*(-x/2)}{x}=-e/2$
A: You almost have the idea. I will just hint that instead of letting $y$ be $\lim_{x \to 0} (1+\tan x)^{1/x}$, let it be the expression that you want to get the limit of. That is, 
let $y = \frac{(1+\tan x)^{1/x} - e}{x}$. Then take the natural log before taking the limit. 
A: i will use the maclaurin series $\ln(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3}+\cdots, \ \tan x = x + \frac{x^3}{3} + \cdots.$
 now we can expand 
$\begin{align}
\ln(1 + \tan x) &= \tan x - \frac{\tan^2 x}{2} +\frac{\tan^3 x}{3} + \cdots \\ 
&= x + \frac{x^3}{3}+\cdots -\frac{x^2}{2}+\cdots + \frac{x^3}{3} + \cdots\\ 
&= x - \frac{x^2}{2} + \cdots
\end{align}$
therefore $\frac{1}{x} \ln(1 + \tan x) = 1 - \frac{x}{2} + \cdots$  exponentiating 
the last result gives $$(1 + \tan x)^{1/x} = ee^{- x/2 + \cdots} = e\{1- x/2 + \cdots  \}$$
finally, $$\lim_{x \to 0}\frac{(1 + \tan x)^{1/x} - e}{x} = -\frac{e}{2}  $$
A: One more way: rewrite the limit as (take $g(x) = (1+\tan x)^{\frac{1}{x}}$
$$
\lim_{x \to 0} \lim_{\epsilon \to 0} \frac{(1+\tan(x+\epsilon))^{\frac{1}{x+\epsilon}} - (1+\tan \epsilon)^\frac{1}{\epsilon}}{x} = 
\lim_{\epsilon \to 0}\lim_{x \to 0}\frac{(1+\tan(\epsilon +x))^{\frac{1}{\epsilon +x}} - (1+\tan \epsilon)^\frac{1}{\epsilon}}{x}\\
=\lim_{\epsilon \to 0}g'(\epsilon)
$$
You can do it since $g(x)$ is a continuous function. Now take the Taylor series expansion of $\tan \epsilon$ and you will get the result.  
A: Let's proceed in the following manner $$\begin{aligned}L &= \lim_{x \to 0}\frac{(1 + \tan x)^{1/x} - e}{x}\\
&= \lim_{x \to 0}\dfrac{\exp\left(\dfrac{\log(1 + \tan x)}{x}\right) - e}{x}\\
&= e\cdot\lim_{x \to 0}\dfrac{\exp\left(\dfrac{\log(1 + \tan x)}{x} - 1\right) - 1}{x}\\
&= e\cdot\lim_{x \to 0}\dfrac{\exp z - 1}{x}\text{ (putting }z = \dfrac{\log(1 + \tan x)}{x} - 1)\\
&= e\cdot\lim_{z \to 0}\dfrac{\exp z - 1}{z}\cdot\lim_{x \to 0}\frac{z}{x}\\
&= e\cdot 1\cdot\lim_{x \to 0}\frac{z}{x}\\
&= e\cdot\lim_{x \to 0}\frac{\log(1 + \tan x) - x}{x^{2}}\\
&= e\cdot\lim_{x \to 0}\left\{\frac{\log(1 + \tan x) - \tan x}{x^{2}} + \frac{\tan x - x}{x^{2}}\right\}\\
&= e\cdot\lim_{x \to 0}\frac{\log(1 + \tan x) - \tan x}{x^{2}} + e\cdot\lim_{x \to 0}\frac{\tan x - x}{x^{2}}\\
&= e\cdot\lim_{x \to 0}\frac{\log(1 + \tan x) - \tan x}{x^{2}} + e\cdot 0\\
&= e\cdot\lim_{x \to 0}\frac{\log(1 + \tan x) - \tan x}{\tan^{2}x}\cdot\frac{\tan^{2}x}{x^{2}}\\
&= e\cdot\lim_{x \to 0}\frac{\log(1 + \tan x) - \tan x}{\tan^{2}x}\cdot 1\\
&= e\cdot\lim_{t \to 0}\frac{\log(1 + t) - t}{t^{2}}\text{ (putting }t = \tan x)\\
&= e\cdot\lim_{t \to 0}\dfrac{\left(t - \dfrac{t^{2}}{2} + \cdots\right) - t}{t^{2}} = -\frac{e}{2}\end{aligned}$$ I have used the following limits $$\lim_{x \to 0}\frac{\log(1 + \tan x)}{x} = \lim_{x \to 0}\frac{\log(1 + \tan x)}{\tan x}\cdot \frac{\tan x}{x} = 1$$ so that $z \to 0$ $$\lim_{x \to 0}\frac{\tan x - x}{x^{2}} = 0$$ which can be proved using inequalities $\sin x < x < \tan x$ for $x \in (0, \pi/2)$ (although the proof is slightly tricky but easily available in MSE). Finally in the last step Taylor series for $\log (1 + t)$ is used.
Update: Proof for $$\lim_{x \to 0}\frac{\tan x - x}{x^{2}} = 0$$ Clearly we can consider only the case $x \to 0^{+}$ because the function under consideration is odd and the letting $x \to 0^{-}$ will only change the sign of the answer (which wont matter as the answer would come out as $0$). Now we can see that $$\begin{aligned}A &= \lim_{x \to 0^{+}}\frac{\tan x - x}{x^{2}}\\
&= \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}} + \lim_{x \to 0^{+}}\frac{x - x\cos x}{x^{2}}\\
&= \lim_{x \to 0^{+}}\frac{\sin x - x}{x^{2}} + \lim_{x \to 0^{+}}x\cdot\frac{1 - \cos x}{x^{2}}\\
&= \lim_{x \to 0^{+}}\frac{\sin x - x}{x^{2}} + 0 \cdot\frac{1}{2}\\
&= \lim_{x \to 0^{+}}\frac{\sin x - x}{x^{2}}\\\end{aligned}$$ Next we have the inequality $$\sin x < x < \tan x = \frac{\sin x}{\cos x}$$ for $0 < x < \pi/2$ and hence $$\cos x < \frac{\sin x}{x} < 1$$ or $$\frac{\cos x - 1}{x} < \frac{\sin x - x}{x^{2}} < 0$$ Now taking limits as $x \to 0^{+}$ and noting that $$\frac{\cos x - 1}{x} = -2\cdot\frac{\sin^{2}(x/2)}{(x/2)^{2}}\cdot\frac{(x/2)^{2}}{x} \to 0$$ we get $$A = \lim_{x \to 0^{+}}\frac{\sin x - x}{x^{2}} = 0$$
A: EDIT:
Here's a method which ends up involving very little computation.  Notice that you've shown that the function
$$f(x) = \begin{cases}(1+\tan x)^\frac{1}{x} & x\not= 0\\ e & x=0 \end{cases}$$
is continuous, and that the limit you want to calculate is precisely $f'(0)$.  If we define $g$ by
$$g(x) = \begin{cases}\frac{1}{x}\ln(1+\tan x) & x\not= 0 \\ 1 & x=0 \end{cases}$$
Then $f(x) = e^{g(x)}$, so if $g'(0)$ exists, we will have at once that
$$f'(0) = e^{g(0)}g'(0)$$
by the chain rule.  We have that
$$g'(0) = \lim_{x\to0} \frac{\frac{1}{x}\ln(1+\tan x) - 1}{x} = \lim_{x\to0} \frac{\ln(1+\tan x) - x}{x^2}$$
A single application of L'Hospital's rule yields
$$\lim_{x\to0} \frac{\frac{\sec^2x}{1+\tan x} - 1}{2x} = \lim_{x\to0} \frac{(1-\tan x) - 1}{2x}$$
or
$$\lim_{x\to0} -\frac{\sin x}{2x\cos x}$$
which is easily seen to be $-\frac{1}{2}$.  Thus, $f'(0)$ (the limit we wish to calculate) is
$$f'(0) = -\frac{e}{2}$$

Here's a continuation of your use of L'Hospital's rule.  
You have
$$\lim_{x\to 0} \frac{(1+\tan x)^\frac{1}{x} - e}{x} = \lim_{x\to0} (\tan x+1)^{1/x} \left(\frac{\sec^2 x}{x(\tan(x)+1)}-\frac{\ln(\tan(x)+1))}{x^2}\right)$$
Since you've already show that  $\lim_{x\to0} (\tan x+1)^{1/x} = e$, we can clean this up to obtain
$$e\lim_{x\to0}\frac{x\sec^2x - (1+\tan x)\ln(1+\tan x)}{x^2(1+\tan x)} = e\lim_{x\to0}\frac{x-(\cos^2x+\sin x \cos x)\ln(1+\tan x)}{x^2(\cos^2x+\sin x \cos x)}$$
Since $\cos^2x + \sin x \cos x \to 1$ as $x\to0$, we may remove it from the denominator (based on the rules for limit arithmetic), yielding
$$e\lim_{x\to0}\frac{x-(\cos^2x+\sin x \cos x)\ln(1+\tan x)}{x^2}$$
We can then apply L'Hospital's rule again to get
$$e\lim_{x\to0} \frac{1 - \left[-2\cos x \sin x - \cos^2x + \sin^2x)\ln(1+\tan x) + (\cos^2 x + \sin x \cos x)\frac{\sec^2x}{1+\tan x}\right]}{2x}$$
After applying various trigonometric identities, this simplifies to
$$e\lim_{x\to0}\frac{(\sin 2x - \cos 2x)\ln(1+\tan x)}{2x}$$
or
$$e\lim_{x\to0}\frac{\sin 2x\ln(1+\tan x)}{2x}  - e\lim_{x\to0}\frac{\cos 2x\ln(1+\tan x)}{2x} $$
which, since $\cos 2x \to 0$ and $\frac{\sin 2x}{2x} \to 1$, is
$$-e\lim_{x\to0}\frac{\ln(1+\tan x}{2x}$$
Which, after one final application of L'Hospital's rule, comes to
$$-e\lim_{x\to0}\frac{\sec^2x}{2(1+\tan x)} = -\frac{e}{2}$$
