# Iōng-chiá:Kiatgak

### Sum of cubes in Archimedes way

First part, to decompose each cubic into a sum of squares, then compose them from different direction.

Let ${\displaystyle S_{n}=\sum _{k=1}^{n}k^{2}={\frac {1}{3}}n^{3}+{\frac {1}{2}}n^{2}+{\frac {1}{6}}n}$

so ${\displaystyle n^{3}=3S_{n}-{\frac {3}{2}}n^{2}-{\frac {1}{2}}n}$

apply it to ${\displaystyle n^{3}...1^{3}}$

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

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

...

${\displaystyle 2^{3}=3[1^{2}+2^{2}]-{\frac {3}{2}}2^{2}-{\frac {1}{2}}2}$

${\displaystyle 1^{3}=3[1^{2}]-{\frac {3}{2}}1^{2}-{\frac {1}{2}}1}$

To sum these n identities, let

${\displaystyle R_{n}=\sum _{k=1}^{n}k^{3}=3[1^{2}*n+2^{2}*(n-1)+...+(n-1)^{2}*2+n^{2}*1]-{\frac {3}{2}}S_{n}-{\frac {1}{2}}T_{n}}$

${\displaystyle R_{n}=3X_{n}-{\frac {3}{2}}S_{n}-{\frac {1}{2}}T_{n}}$

where ${\displaystyle T_{n}=\sum _{k=1}^{n}k=1+2+...+n={\frac {1}{2}}n(n+1)}$

${\displaystyle X_{n}=3[1^{2}*n+2^{2}*(n-1)+...+(n-1)^{2}*2+n^{2}*1]}$

Second part, make use of ${\displaystyle (a+b)^{3}=a^{3}+3a^{2}b+3ab^{2}+b^{3}}$; apply it to ${\displaystyle (n+1)^{3}}$:

${\displaystyle (n+1)^{3}=[1+n]^{3}=1^{3}+3*1^{2}*n+3*1*n^{2}+n^{3}}$

${\displaystyle (n+1)^{3}=[2+(n-1)]^{3}=2^{3}+3*2^{2}*(n-1)+3*2*(n-1)^{2}+(n-1)^{3}}$

...

${\displaystyle (n+1)^{3}=[n+1]^{3}=n^{3}+3*n^{2}*1+3*n*1^{2}+1^{3}}$

To sum these n identities,

${\displaystyle n(n+1)^{3}=R_{n}+3\left[1^{2}*n+2^{2}*(n-1)+...+(n-1)^{2}*2+n^{2}*1\right]+3\left[1^{2}*n+2^{2}*(n-1)+...+(n-1)^{2}*2+n^{2}*1\right]+R_{n}}$

${\displaystyle n(n+1)^{3}=2R_{n}+2*3X_{n}}$

OK, easy part now, to merge the results of first part and second part, we can get

${\displaystyle \sum _{k=1}^{n}k^{3}={\frac {1}{4}}n^{2}(n+1)^{2}}$

BTW, Archimedes would use ${\displaystyle (n-1)^{3}}$ at first part, and use ${\displaystyle n^{3}}$ at second part.