<s>[INST] Evaluate the limit $\displaystyle\lim_{x \to 0}\frac{(e-\left(1 + x\right)^{1/x})}{\tan x}$. How to evaluate the following limit
$$\displaystyle\lim_{x\to 0} \dfrac{e-\left(1 + x\right)^{1/x}}{\tan x}$$
I have tried to solve it using L-Hospital's Rule, but it creates utter mess.
Thanks for your generous help in advance.
 [/INST] This is more a comment than an answer since previous answers show how to obtain the limit.
In the same spirit as abel's anwer, let me use a few more terms (keeping abel's notation) $$\ln y = \frac 1 x\ln(1 + x) =1-\frac{x}{2}+\frac{x^2}{3}+O\left(x^3\right) $$ $$y=e-\frac{e x}{2}+\frac{11 e x^2}{24}+O\left(x^3\right)$$ $$e-y=\frac{e x}{2}-\frac{11 e x^2}{24}+O\left(x^3\right)$$ $$\tan(x)=x+\frac{x^3}{3}+O\left(x^4\right)$$ $$\dfrac{e-\left(1 + x\right)^{\frac{1}{x}}}{\tan x}=\frac{\frac{e x}{2}-\frac{11 e x^2}{24}+O\left(x^3\right) }{x+\frac{x^3}{3}+O\left(x^4\right) }\approx \frac{\frac{e }{2}-\frac{11 e x}{24} }{1+\frac{x^2}{3} }\approx (\frac{e }{2}-\frac{11 e x}{24})(1-\frac{x^2}{3})$$  This will give $$\dfrac{e-\left(1 + x\right)^{\frac{1}{x}}}{\tan x}=\frac{e}{2}-\frac{11 e x}{24}+O\left(x^2\right)$$ which shows the limit but also the manner it is approached.
Edit
Just as a side result, suppose that you need to solve for $x$ the equation $$\dfrac{e-\left(1 + x\right)^{\frac{1}{x}}}{\tan x}=1$$ the given first order expansion gives an extimate of the solution $$x\approx\frac{12 (e-2)}{11 e}\approx 0.288$$ while the exact solution is $\approx 0.339$.
</s>