Limit of $\lim_{x\to\infty} (1+\frac{f(x)}{x})^x$ for $f(x) = o(x)$ I am well aware of the theorem which states that $\lim_{x\to\infty} (1+\frac{r}{x})^x = e^r$ for a constant $r$, however I am faced with with the question of if $f(x)= o(x)$ (using little o notation) what is the limit $\lim_{x\to\infty}(1+\frac{f(x)}{x})^x$?
This winds up in the indeterminate form $(1+0)^\infty$.
I expect but am having trouble proving that this limit becomes $\lim_{x\to\infty}(1+\frac{f(x)}{x})^x = \lim_{x\to\infty} (e^{f(x)})$ which might or might not simplify further based on $f$.
If the question is too general and too dependent on the nature of $f$, then for a specific case consider $f = -\frac{1}{2} \ln x$ which I expect $\lim_{x\to\infty}(1-\frac{\ln x}{2x})^x = \lim_{x\to\infty} e^{-\frac{1}{2}\ln x} = \lim_{x\to\infty} x^{-\frac{1}{2}} = 0$
Plugging in test values seems to support my claim, however of course proof by example is invalid.
 A: It is best to go via logs. Let $L$ be the desired limit. Then $$\begin{aligned}\log L &= \log\left\{\lim_{x \to \infty}\left(1 + \frac{f(x)}{x}\right)^{x}\right\}\\
&= \lim_{x \to \infty}\log\left(1 + \frac{f(x)}{x}\right)^{x}\text{ (by continuity of }\log)\\
&= \lim_{x \to \infty}x\log\left(1 + \frac{f(x)}{x}\right)\\
&= \lim_{x \to \infty}x\cdot\frac{f(x)}{x}\cdot\dfrac{\log\left(1 + \dfrac{f(x)}{x}\right)}{\dfrac{f(x)}{x}}\\
&= \lim_{x \to \infty}f(x)\cdot\lim_{x \to \infty}\dfrac{\log\left(1 + \dfrac{f(x)}{x}\right)}{\dfrac{f(x)}{x}}\\
&= \lim_{x \to \infty}f(x)\cdot\lim_{y \to 0}\frac{\log(1 + y)}{y}\text{ (by putting }y = f(x)/x)\\
&= \lim_{x \to \infty}f(x)\end{aligned}$$ It follows that the desired limit exists only when $\lim\limits_{x \to \infty}f(x) = A$ exists and then the desired limit is $L = e^{A}$.
Update: Readers may have failed to notice a minor but subtle error which I spotted just now. The step where I try to multiply and divide by $f(x)/x$ is invalid when $f(x)=0$ for infinitely many large values of $x$ without any bound. In this case also the result holds good, but needs more analysis. If $\lim_{x\to\infty}f(x)$ exists then it must be $0$ and in this case the proof can be easily completed by showing that $\log L=0$ so that $L=1$ (a good example of such a function is $f(x)=(\sin\pi x)/x$). In case $f(x)$ does not tend to a limit when $x\to\infty$, then it can be seen that the limit corresponding to $\log L$ does not exist and hence $L$ does not exist (an example of this case would be $f(x)=\sqrt{x}\sin\pi x$).
A: Let $y = \left(1+\dfrac{f(x)}x\right)^x$. We then have
$$z=\ln(y) = x \ln \left(1+\dfrac{f(x)}x\right) = \dfrac{\ln \left(1+\dfrac{f(x)}x\right)}{1/x}$$
Since $f(x) - o(x)$, we can use L'Hospital to see what we get
$$\dfrac{\dfrac1{1+\dfrac{f(x)}x}\left(\dfrac{xf'(x)-f(x)}{x^2}\right)}{-1/x^2} = \dfrac{f(x)-xf'(x)}{1+\dfrac{f(x)}x}$$
Since you have your $f(x) = o(x)$, we have
$$\lim_{x \to \infty} \dfrac{\ln \left(1+\dfrac{f(x)}x\right)}{1/x} = \lim_{x \to \infty}(f(x)-xf'(x))$$
Hence, if $f(x) = o(x)$, we have
$$\lim_{x \to \infty} \left(1+\dfrac{f(x)}x\right)^x = \exp\left( \lim_{x \to \infty}(f(x)-xf'(x)) \right)$$
A: I cannot attach a file in a comment, i post it as a new answer, but it is not one!
