<s>[INST] 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.
 [/INST] 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}.$$
</s>