### A question asked by Shubham Ranjan

Evaluate $\lim_{x \to 0} \frac{e - (1 + x)^{\frac{1}{x}}}{\tan x}$

$\lim_{x \to 0} \frac{e - (1 + x)^{\frac{1}{x}}}{\tan x}$

$= \lim_{x \to 0} \cos x \cdot \frac{e - (1 + x)^{\frac{1}{x}}}{\sin x}$

$= \lim_{x \to 0} \cos x \cdot\ \lim_{x \to 0} \frac{e - (1 + x)^{\frac{1}{x}}}{\sin x}$

$= \lim_{x \to 0} \frac{e - (1 + x)^{\frac{1}{x}}}{\sin x}$

$= \lim_{x \to 0} \frac{(1+x)^{\left(\frac{1}{x} - 1\right)}((1+x) \ln(1+x) -x))}{x^2\cos x}$ (LHopital Rule)

$= \lim_{x \to 0} \frac{(1+x)^{\left(\frac{1}{x} - 1\right)}((1+x) \ln(1+x) - x))}{x^2}$

$= \lim_{x \to 0} (1+x)^{\left(\frac{1}{x} - 1\right)} \cdot \lim_{x \to 0} \frac{ (1+x) \ln(1+x) - x}{x^2}$

$\lim_{x \to 0} (1+x)^{\left(\frac{1}{x} - 1\right)}$

$= \lim_{x \to 0} (1+x)^{\frac{1}{x}} (1 + x)^{- 1}$

$= \lim_{x \to 0} (1+x)^{\frac{1}{x}} \lim_{x \to 0} (1 + x)^{- 1}$

$= e \cdot 1 = e$

and,

$\lim_{x \to 0} \frac{(1+x) \ln(1+x) - x}{x^2}$

$= \lim_{x \to 0} \frac{\ln(x+1)}{2x}$ (LHopital Rule)

$= \lim_{x \to 0} \frac{1}{2(x+1)}$ (LHopital Rule)

$= \lim_{x \to 0} \frac{1}{2}$

So,

$= \lim_{x \to 0} (1+x)^{(\frac{1}{x} - 1)} \cdot \lim_{x \to 0} \frac{ (1+x) \ln(1+x) - x}{x^2} = \frac{e}{2}$