Question regarding a proof from previous post.

Regarding this answer, how did we get that the $M_i = \left(\frac in\right)^2$, where the $M_i$ is defined in the linked post.


Since $f(x) = x^2$ is increasing on the $i$th interval $[\frac{i - 1}{n}, \frac{i}{n}]$, the largest value it attains is the value at the right end-point, in this case $M_i = f(\frac{i}{n}) = (\frac{i}{n})^2$.