9.12. Calculate in the same way the sums $S_{2}(n)=1^{2}+$ $+2^{2}+\ldots+n^{2}$ and $S_{3}(n)=1^{3}+2^{3}+\ldots+n^{3}$.
9.12. By summing the equalities \((k+1)^{3}=k^{3}+3 k^{2}+3 k+1\) for \(k=1,2, \ldots, \ldots, n\), we get \((n+1)^{3}=1+3 S_{2}(n)+3 S_{1}(n)+n\). Therefore,

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

By summing the equalities \((k+1)^{4}=k^{4}+4 k^{3}+6 k^{2}+4 k+1\) for \(k=1,2, \ldots, \ldots, n\), we get \((n+1)^{4}=1+4 S_{3}(n)+6 S_{2}(n)+4 S_{1}(n)+n\). Therefore, \(4 S_{3}(n)=(n+1)^{4}-n(n+1)(2 n+1)-2 n(n+1)-(n+1)=n^{2}(n+1)^{2}\).