<s>[INST] How to evaluate $\lim\limits_{n\to\infty}\frac{1}{n}((x+\frac{a}{n})^2+(x+\frac{2a}{n})^2+...+(x+\frac{(n-1)a}{n})^2)$ I don't know how to transform the expression $\frac{1}{n}((x+\frac{a}{n})^2+(x+\frac{2a}{n})^2+...+(x+\frac{(n-1)a}{n})^2)$
The solution, after transformation is 
$\frac{n-1}{n}x^2+2\frac{1+...+(n-1)}{n^2}ax+\frac{1^2+...+(n-1)^2}{n^3}a^2$
Thanks for replies.
 [/INST] We have $$\lim\limits_{n\to\infty}\frac{1}{n}((x+\frac{a}{n})^2+(x+\frac{2a}{n})^2+...+(x+\frac{(n-1)a}{n})^2)=\lim\limits_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n-1}(x+\frac{k}{n}a)^2$$ and so we have that $$\lim\limits_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n-1}(x+\frac{k}{n}a)^2=\int_{0}^{1}(x+ta)^2 dt=x^2+\frac{a^2}{3}+ax+c$$
</s>