Xét \(n^3-n=n\left(n^2-1\right)\)
\(=n\left(n^2-n+n-1\right)=n\left[n\left(n-1\right)+\left(n-1\right)\right]\)
\(=n.\left(n-1\right)\left(n+1\right)\)
Vì \(n^3-n=\left(n-1\right)n\left(n+1\right)\)
\(\Rightarrow n^3=\left(n-1\right)n\left(n+1\right)+n\)
Thay vào ta có :
\(1^3+2^3+...+n^3\)\(=0.1.2+1+1.2.3+2+...+\left(n-1\right)n\left(n+1\right)+n\)
\(=1.2.3+2.3.4+...+\left(n-1\right)n\left(n+1\right)+\left(1+2+...+n\right)\)
Đặt \(S=1.2.3+2.3.4+...+\left(n-1\right)n\left(n+1\right)\)
\(\Rightarrow4S=1.2.3.4+2.3.4.\left(5-1\right)+...+\left(n-1\right)n\left(n+1\right)\)\(\left[\left(n+2\right)-\left(n-2\right)\right]\)
\(\Rightarrow4S=\left(n-1\right)n\left(n+1\right)\left(n+2\right)\)
\(\Rightarrow S=\frac{\left(n-1\right)n\left(n+1\right)\left(n+2\right)}{4}\)
Đặt \(B=1+2+3+...+n\)
\(\Rightarrow B=\frac{n\left(n+1\right)}{2}=\frac{2.n\left(n+1\right)}{4}\)
\(\Rightarrow1^3+2^3+...+n^3=B+S=\frac{\left(n-1\right)n\left(n+1\right)\left(n+2\right)+2\left(n+1\right)n}{4}\)