# Let's do some calculus! (32)

Calculus Level 4

If $a_i \in \mathbb{R}$, where $i \in \left\{ 1,2,3,4,5,\cdots,n \right\}$, then find the value of $x$ for which the expression $\displaystyle \sum_{i=1}^n {(x-{a_i})}^2$ assumes its minimum value.

Bonus: Can this be solved this without calculus?