Find the following limit: $$\lim_{x\to 0}\frac{(1+x)^{1/x}-e}{x} \tag{1}$$
The following is my approach, although is full of incorrect assumptions (statements etc). $$f(x)= \lim_{h\to 0}(1+x+h)^{1/(x+h)}\\$$
From here we can say $f(0) = e$.
$$\ln(f(x)) = \lim_{h\to 0}\frac{1}{x+h}\ln(1+x+h)$$
Near $x=0$, we can use the series of logarithm: $$\ln(f(x)) = \lim_{h\to 0}\frac{1}{x+h}\left(x+h-\frac{(x+h)^2}{2}...\right)$$
Differentiating we get:
$$\frac{f'(x)}{f(x)} = \lim_{h\to 0}-\frac{1}{2} +\frac{x+h}{3} ... \tag{2}$$
Now we note that $(1)$ is actually $f'(0)$ (?) and so from $(2)$ we get:
$$f'(0) =\frac{-1}{2} f(0) = \frac{-e}{2}$$
While the answer is seemingly correct, the method is absolutely not. It looks like this is fluke than anything else.
I also tried computing taylor series of $(1+x)^{1/x}$ near $x=0$ but couldn't do it.