Compute the limit of $\sum\limits_{k=1}^{n} \left(\frac{k}{n^2}\right)^{1+k/n^2}$ when $n\to\infty$ 
Compute the limit
  $$\lim_{n\to\infty} \sum_{k=1}^{n} \left(\frac{k}{n^2}\right)^{\frac{k}{n^2} + 1}$$

At a first look, I only thought of Riemann sums, but I don't see how I may apply it. What else could I do? I need some hints, suggestions.
 A: 1. Upper bound For every $1\leqslant k\leqslant n$, 
$$
\left(\frac{k}{n^2}\right)^{1+\frac{k}{n^2}}\leqslant\frac{k}{n^2}.
$$
Summing up these and using the fact that the sum of the $n$ first positive integers is $\frac12n(n+1)$, one sees that the $n$th sum $S_n$ is such that
$$
S_n\leqslant\sum_{k=1}^n\frac{k}{n^2}=\frac{n+1}{2n}.
$$
2. Lower bound For every $1\leqslant k\leqslant n$, 
$$
\left(\frac{k}{n^2}\right)^{1+\frac{k}{n^2}}\geqslant\left(\frac{k}{n^2}\right)^{1+\frac1{n}}.
$$
The usual comparison of a sum with an integral, plus the fact that the function $u:x\mapsto x^{1+1/n}$ is increasing on $(0,1)$, yield
$$
S_n\geqslant n^{-1-1/n}\sum_{k=1}^nu(k/n)\geqslant n^{-1/n}\int_0^1u(x)\,\mathrm dx=\frac{n^{1-1/n}}{2n+1}.
$$
3. Coda The upper and lower bounds of $S_n$, which are valid for every $n\geqslant1$, both converge to $\frac12$ when $n\to\infty$ hence the gendarmes theorem ensures that $\lim\limits_{n\to\infty}S_n=\frac12$.
A: Let
$$\begin{align}x=\frac{k}{n^2}=O(\frac{1}{n})\end{align}$$
and when $n$ is sufficiently large,
$$\begin{align}
(\frac{k}{n^2})^{\frac{k}{n^2}}=e^{x \log{x}}=1+O(x\log x)
\end{align}$$
where the big O constant is absolute.
$$\begin{align}
O(\sum_{k=1}^{n}\frac{k}{n^2}\frac{k}{n^2}\log{\frac{k}{n^2}})=O(\sum_{k=1}^{n}\frac{k}{n^2}\frac{k}{n^2}\log{k})+O(\sum_{k=1}^{n}\frac{k}{n^2}\frac{k}{n^2}\log{n^2})=o(1)
\end{align}$$
Hence the principle part of the sum is
$$\begin{align}
\sum_{k=1}^{n}\frac{k}{n^2}=\frac{1}{2}+o(1)
\end{align}$$
Q.E.D.
A: Yes, Riemann looks like a good idea. Using $n$ equidistant points with distances $\frac1{n^2}$ in the interval $\left[0,\frac1n\right]$, we expect
$$\tag{1}\int_0^{\frac1n} x^{x+1} dx\approx \frac1{n^2}\sum_{k=1}^n \left(\frac k{n^2}\right)^{\frac k{n^2}+1}.$$
More specifically, the derivative of the integrand $f(x):=x^{x+1}=\exp((x+1)\ln x)$ is $f'(x)=(\ln x + 1+\frac1x)x^{x+1}$. Note that $\ln x + 1 + \frac1x=-y+1+e^y$ with $y=-\ln x$ and $y\to+\infty$ as $x\to 0^+$. For sufficiently small $x$ the exponential in $y$ will dominate the polynomial in $y$, i.e. $f'$ will be positive and hence $f$ strictly increasing.
Therefore, the $\approx$ in $(1)$ can be gotten rid of for sufficiently big $n$ as follows:
$$\tag{2}\int_0^{\frac1n} x^{x+1} dx\le \frac1{n^2}\sum_{k=1}^n \left(\frac k{n^2}\right)^{\frac k{n^2}+1}\le\int_{\frac1{n^2}}^{\frac1n+\frac1{n^2}} x^{x+1} dx.$$
We may additionally assume that $\frac1n+\frac1{n^2}\le 1$ and hence that the integrand is $\le x^1$. This makes the right hand side integral of $(2)$
$$\le \int_{\frac1{n^2}}^{\frac1n+\frac1{n^2}} x dx=\frac12\left(\left(\frac1n+\frac1{n^2}\right)^2-\left(\frac1{n^2}\right)^2\right)=\frac{n+2}{2n^3}$$
Thus for almost all $n$
$$\tag{3}\sum_{k=1}^n \left(\frac k{n^2}\right)^{\frac k{n^2}+1}\le\frac{n+2}{2n}=\frac12+\frac1n.$$
For $0\le x\le \frac1n<1$ we have $x^{x+1}\ge x^{1+\frac1n}$, therefore the left hand side of $(2)$ is
$$ \ge \int_0^{\frac1n}x^{1+\frac1n}dx=\frac1{2+\frac1n}\cdot\left(\frac1n\right)^{2+\frac1n}$$
and hence for almost all $n$ 
$$\tag{4}\sum_{k=1}^n \left(\frac k{n^2}\right)^{\frac k{n^2}+1}\ge \frac1{2+\frac1n}\sqrt[n]n.$$
Since $\sqrt[n]n\to 1$, the bounds in $(3)$ and $(4)$ both converge to $\frac12$, hence finally
$$\lim_{n\to\infty}\sum_{k=1}^n \left(\frac k{n^2}\right)^{\frac k{n^2}+1}=\frac12.$$
A: Let $a_r=\left(\frac{r}{n^2}\right)^{1+\frac{r}{n^2}};b_r=\frac{r}{n^2}.$
$\lim_{n\to\infty} b_r=\lim_{n\to\infty}\sum_{r=1}^{n}\frac{r}{n^2}=\lim_{n\to\infty}\frac{n^2+n}{2n^2}=\frac12$
Now $|\sum a_r-\sum b_r|\le \sum|a_r-b_r|=\sum\frac{r}{n^2}\left(1-\left(\frac{r}{n^2}\right)^{\frac{r}{n^2}}\right)\le\sum \frac 1n\left(1-\left(\frac{1}{n}\right)^{\frac{1}{n}}\right)=1-\left(\frac{1}{n}\right)^{\frac{1}{n}}$
$\implies \lim_{n\to\infty}|\sum a_r-\sum b_r|=0\implies\lim_{n\to\infty}\sum a_r=\lim_{n\to\infty}\sum b_r=\frac12$
A: Let $x: = \frac {k} {n^2}$. Then, we have $$\lim_{n\to\infty} \sum_{k=1}^{n} \left(\frac{k}{n^2}\right)^{\left(\frac{k}{n^2} + 1\right)} = \lim_{n\to\infty} n^2 \int_{1/n^2}^{1/n} x^{x + 1}\, dx.$$ Trapezoidal rule (in quadrature) gives $$\int_{1/n^2}^{1/n} x^{x + 1}\, dx = \frac {1} {2} \left(\frac {1} {n} - \frac {1} {n^2} \right) \left(\left(\frac {1} {n}\right)^{1 + \frac {1} {n}} + \left(\frac {1} {n^2}\right)^{1 + \frac {1} {n^2}}\right) + R_n,$$ where $R_n \to 0$.
This is $$= \frac {1} {2 n^2} (n - 1) \left (\left(\frac {1} {n}\right)^{1 + \frac {1} {n}} + \left(\frac {1} {n}\right)^{2 + \frac {2} {n^2}}\right) + R_n = \frac {n - 1} {2 n^3} \left (\left(\frac {1} {n}\right)^{\frac {1} {n}} + \left(\frac {1} {n}\right)^{1 + \frac {2} {n^2}}\right) + R_n.$$ Since $$\left (\left(\frac {1} {n}\right)^{\frac {1} {n}} + \left(\frac {1} {n}\right)^{1 + \frac {2} {n^2}}\right) \to 1 \qquad \text{and} \qquad R_n \to 0,$$ we have $$\int_{1/n^2}^{1/n} x^{x + 1}\, dx \to \frac {n - 1} {2 n^3}.$$ Hence, $$\sum_{k=1}^{n} \left(\frac{k}{n^2}\right)^{\left(\frac{k}{n^2} + 1\right)} \to \frac {n - 1} {2 n} \to \frac {1} {2}.$$
