Limit with Arithmetico-geometric sequence It is given that $$ 
L=\lim _{k \rightarrow \infty}\left\{\frac{e^{\frac{1}{k}}+2 e^{\frac{2}{k}}+3 e^{\frac{3}{k}}+\cdots+k e^{\frac{k}{k}}}{k^2}\right\}
$$
I tried solving it but I am stuck on this, but it seems to be that numerator is an arithmetico-geometric sequence.
Solution to this problem was given something like this:
$$s=-\dfrac{e^{\frac{1}{k}}(e-1)}{(e^{\frac{1}{k}}-1)^2}+\dfrac{ke^{1+\frac{1}{k}}}{e^{\frac{1}{k}}-1} \tag{1}\label{1}$$ where $s$ is sum of AGP series in the numerator.
So $$\begin{align}
   L &= \displaystyle\lim_{k \to \infty}  \dfrac{s}{k^2} \\
     &= -(e+1)+e \tag{2}\label{2}
\end{align}$$
So I am having difficulty in understanding \eqref{1} and \eqref{2}
Any other aliter solution and help is appreciated.
 A: $L$ is a Riemann sum. It is helpful to rewrite $L$ as
$$
L=\lim _{k \rightarrow \infty}\left\{\frac{\frac1k e^{\frac{1}{k}}+ \frac2k e^{\frac{2}{k}}+\frac3k e^{\frac{3}{k}}+\cdots+ \frac kk e^{\frac{k}{k}}}{k}\right\}
$$
by moving one division by $k$ to the numerator. Now, letting $f(x) = x e^x$, we have
$$
    L = \lim_{k\to \infty} \sum_{i=1}^k \frac{ f(\frac ik)}{k} = \int_0^1 f(x)\,dx.
$$
By integration by parts, $\int x e^x \,dx = (x-1) e^x + C$, so $L = 0 e^1 - (-1) e^0 = 1$.
A: You can notice that the numerator is a so called "derivative of a geometric sum" $$ \sum_{k=1}^n k e^{\frac{k}{n}} = e^\frac{1}{n}\sum_{k=1}^n k (e^\frac{1}{n})^{k-1} $$ which has a nice closed form formula (because this is the derivative of a geometric sum and we know how to compute a geometric sum!).
Indeed,
\begin{align}
x\sum_{k=1}^n kx^{k-1} &= x\sum_{k=1}^n \frac{d}{dx}(x^k) \\
&= x \frac{d}{dx}(\sum_{k=1}^nx^k) \\
&= x \frac{d}{dx}(x\frac{1-x^{n}}{1-x}) \\
&= \frac{x(nx^{n+1}-(n+1)x^n+1)}{(1-x)^2}
\end{align}
And we just have to plug in $x=e^\frac{1}{n}$.
Which gives you the numerator. Then it's just a matter of using the elementary limits to get the final result.
