57. Find the sum of the squares of the first $n$ numbers of the natural series.

## Heron's Problem. From the treatise

Find the sum of the squares of the first $n$ numbers of the natural series.
57. Archimedes solved this problem in the following form.

![](https://cdn.mathpix.com/cropped/2024_05_21_926f0bb262c8f9569516g-085.jpg?height=49&width=1362&top_left_y=1209&top_left_x=353)
It goes as follows: if the excess is equal to the smallest of all, and if other lines, each equal to the largest of the lines of the first row, are taken in the same number as the first, then the sum of the squares on the lines equal to the largest, added to the square on the largest and added to the area enclosed between the smallest of the lines and the line composed of all unequal lines, is equal to three times the sum of the squares constructed on the unequal lines. In modern notation, this is

![](https://cdn.mathpix.com/cropped/2024_05_21_926f0bb262c8f9569516g-085.jpg?height=397&width=377&top_left_y=1292&top_left_x=1336)

Fig. 26. The proposition can be written as follows: taking the length of the smallest of all straight lines as the unit of length, we obtain the identity:

$$
\begin{aligned}
& n \cdot n^{2}+n^{2}+(1+2+3+\ldots+n)= \\
& \quad=3\left(1^{2}+2^{2}+3^{2}+\ldots+n^{2}\right)
\end{aligned}
$$

This identity can easily be transformed into a form that provides the answer to the question posed in problem 57. Specifically, summing the arithmetic progression \(1+2+3+\ldots+n\), we get:

$$
n^{2}(n+1)+\frac{n(n+1)}{2}=3\left(1^{2}+2^{2}+3^{2}+\ldots+n^{2}\right)
$$

from which

$$
1^{2}+2^{2}+3^{2}+\ldots+n^{2}=\frac{n(n+1)(2 n+1)}{6}
$$

This identity can also be derived directly, for example, using the identity:

$$
n^{3}-(n-1)^{3}=3 n^{2}-3 n+1
$$

By giving \(n\) the values \(1, 2, 3, \ldots, n\), we obtain:

$$
\begin{gathered}
1^{3}-0^{3}=3 \cdot 1^{2}-3 \cdot 1+1 \\
2^{3}-1^{3}=3 \cdot 2^{2}-3 \cdot 2+1 \\
3^{3}-2^{3}=3 \cdot 3^{2}-3 \cdot 3+1 \\
\cdot \dot{1}+\dot{0} \cdot \dot{\cdot} \cdot \dot{n}+1
\end{gathered}
$$

Summing these, we get:

$$
n^{3}=3\left(1^{2}+2^{2}+3^{2}+\ldots+n^{2}\right)-3(1+2+3+\ldots+n)+n
$$

Denoting the desired sum of squares by \(S_{n}\), we get:

$$
n^{3}=3 S_{n}-\frac{3 n(n+1)}{2}+n
$$

Solving for \(S_{n}\) and simplifying, we find:

$$
S_{n}=\frac{n(n+1)(2 n+1)}{6}
$$

Heron of Alexandria (2nd or 1st century BC); in his book "Dioptra," the well-known formula for expressing the area of a triangle given its sides is first presented:

$$
\triangle=\sqrt{\frac{a \cdot b+c}{2} \cdot \frac{a \cdot b-c}{2} \cdot \frac{a+c-b}{2} \cdot \frac{b+c-a}{2}}
$$

Heron provides a complex but unique proof of this formula.