$$ \lim_{x\to o} \frac{(1+x)^{\frac1x}-e+\frac{ex}{2}}{ex^2} $$
(can this be duplicate? I think not)
I tried it using many methods
$1.$ Solve this conventionally taking $1^\infty$ form in no luck
$2.$ Did this, expand $ {(1+x)^{\frac1x}}$ using binomial theorem got $\frac13$ then grouped coefficients of $x^0$ and it cancelled with $e$ then took coefficient of $x$ cancelled with $\frac{ex}{2}$ and so on
very messy right ? at last I got $\frac13$ but that's not the expected answer!
I must have went wrong somewhere can anyone help me with this.
let $y = \left(1 + \frac1n\right)^n.$ taking logarithm, we get $$\begin{align} \ln y &= n\ln\left(1 + \frac 1n \right)\\ &= n \left(\frac 1n - \frac1{2n^2} +\frac1{3n^3}+\cdots \right) \\ & = 1 - \frac1{2n} + \frac{1}{3n^2}+ \cdots \end{align}$$ therefore $$\begin{align} y &= ee^{-\frac1{2n}} e^{\frac1{3n^2}}\\ &=e\left(1-\frac{1}{2n}+ \frac1{8n^2}+\cdots\right) \left(1+\frac{1}{3n^2}+\cdots\right) \\ &=e\left(1- \frac1{2n} +\frac{11}{24n^2} + \cdots\right) \end{align}$$
from this we get $$n^2\left(y - e + \frac e{2n}\right) = \frac{11e}{24} + \cdots $$ and $$\lim_{x \to 0}\frac{(1+ x)^{\frac1x}- e + \frac{ex}2}{ex} =\frac{11}{24}. $$