<s>[INST] Calculus limit homework problem $$ \lim_{n→\infty} \frac1 n \left(\left(a + \frac 1 n\right)^2 + \left(a + \frac 2 n\right)^2 + ... + \left(a + \frac{n-1}{n}\right)^2\right)$$ 
$$ \text{hint: }\  1^2 + 2^2 + ... + n^2 = \frac{n(n+1)(2n+1)}{6} $$
I can't figure out how to find this problem's limit. Does anybody have ideas?
 [/INST] \begin{align*}
 & \; \; \; \lim_{n\to \infty}\frac 1 n \left(  \left(a + \frac 1 n \right )^2 + \dots +\left(a + \frac {n-1} n \right )^2 \right ) \\ 
 &= \lim_{n\to \infty} \frac 1 n \left( (n-1)a^2  + 2 a \left( \frac 1 n + \dots  + \frac{n-1}{n} \right ) + \left( \frac {1^n}{n^2} + \dots + \frac{(n-1)^2}{n^2}\right )\right )\\ 
 &= \lim_{n\to \infty}\frac{(n-1)a^2}{n} + 2a \frac{n(n-1)}{ 2 n^2} + \frac{n(n-1)(2n-1)}{6n^3}\\ 
 &= a^2 + a + \frac 1 3 \\
\end{align*}
Also it can be evaluated via converting it into Integral noticing that as $n\to \infty $  as
$$\lim_{n\to \infty}\frac 1 n \left(  \left(a + \frac 1 n \right )^2 + \dots +\left(a + \frac {n-1} n \right )^2 \right )= \lim_{n\to \infty } \frac 1 n  \sum_{i=0}^{n-1} \left( a + \frac i n \right )^2= \int_0^1 \left( a + x \right )^2 dx = a^2 + a + \frac 1 3 $$
</s>