Does $(1 + f(x))^x \to e^k$ if $xf(x) \to k$? It's well known that $\displaystyle{\lim_{x \to \infty} \left(1 + \frac{k}{x}\right)^x = e^k}$.

Suppose $xf(x) \to k$ as $x \to \infty$. Do we necessarily have $(1 + f(x))^x \to e^k$?

If $f$ happens to be differentiable, and if we also have $\displaystyle{\frac{f'(x)}{-x^{-2}} \to k}$, then the answer to the above question is yes, as can be seen by an application of L'Hopital's rule. But without assuming this second limit exists, I don't think L'Hopital's rule is relevant.
If it's any easier, I'd also be interested in the answer for the special case when $k = 1$.

This is a problem I thought of as I was solving problem 3.2.1(b) (page 72) from "Problems in Mathematical Analysis I" by Kaczor and Nowak.
 A: If $\lim_{x\to\infty}xf(x)=k$, then $\lim_{x\to\infty}f(x)=0$ and $f(x)=\frac{k+o(1)}{x}$.


METHODOLOGY $1$:
We assume in the following that $k>0$ although analogous analysis applies for $k< 0$. Note that we can write
$$\begin{align}
\left(1+f(x)\right)^x&=\left(1+\frac kx +o\left(\frac{1}{x}\right)\right)^x\\\\
&=\left(1+\frac kx \right)^x\left(1+\frac {o\left(\frac{1}{x}\right)}{1+\frac kx}\right)^x\tag1
\end{align}$$
Now, applying Bernoulli's Inequality reveals (for $x$ sufficiently large)
$$\begin{align}
\left(1+\frac {o\left(\frac{1}{x}\right)}{1+\frac kx}\right)^x\ge 1+\frac{o\left(1\right)}{1+\frac kx}\tag2
\end{align}$$
In addition, we have from Bernoulli's Inequality (for $x$ sufficiently large)
$$\begin{align}
\left(1+\frac {o\left(\frac{1}{x}\right)}{1+\frac kx}\right)^x\le \frac1{\left(1-\frac {o\left(\frac{1}{x}\right)}{1+\frac kx}\right)^x}\le \frac1{1-\frac{o\left(1\right)}{1+\frac kx}}\tag3
\end{align}$$
Putting together $(2)$ and $(3)$ and applying the squeeze theorem we find that
$$\lim_{x\to\infty}\left(1+\frac {o\left(\frac{1}{x}\right)}{1+\frac kx}\right)^x=1\tag4$$
Finally, using $(4)$ in $(1)$ yields the coveted limit
$$\lim_{x\to\infty}\left(1+f(x)\right)^x=e^k$$


METHODOLOGY $2$:
We begin by writing
$$\begin{align}
\left(1+f(x)\right)^x&=e^{x\log(1+f(x))}\\\\
&=e^{x\left(f(x)+O\left(f(x)^2\right)\right)}\tag5
\end{align}$$
Letting $x\to \infty$ in $(5)$, we find that
$$\lim_{x\to\infty}\left(1+f(x)\right)^x=e^k$$
as was to be shown!

Alternatively, since we can write
$$\frac{f(x)}{1+f(x)}\le \log(1+f(x))\le f(x)$$
Then we have the inequalities
$$e^{xf(x)/(1+f(x))}\le \left(1+f(x)\right)^x\le e^{xf(x)}$$
whence application of the squeeze theorem yields
$$\lim_{x\to\infty}\left(1+f(x)\right)^x=e^k$$
