<s>[INST] 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.
 [/INST] 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}  $$
</s>