<s>[INST] Proof that $1+2+3+4+\cdots+n = \frac{n\times(n+1)}2$ Why is $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$ $\space$ ?
 [/INST] $$\sum_{i=0}^ni-\sum_{i=0}^{n-1}i=S_1(n)-S_1(n-1)=n,$$
so that $S_1(n)$ must be a polynomial of the second degree in $n$.
By the method of undeterminate coefficients, noting that there is no constant term as $S_1(0)=0$:
$$S_1(n)-S_1(n-1)=n=(an^2+bn)-(a(n-1)^2+b(n-1))=\\=2an+b-a,$$
and by identification
$$a=b=\frac12.$$
$$S_1(n)=\frac{n^2+n}2.$$
Let us generalize to the sum of squares,
$$S_2(n)-S_2(n-1)=n^2=(an^3+bn^2+cn)-(a(n-1)^3+b(n-1)^2+c(n-1))=\\=3an^2+(-3a+2b)n+a-b+c,$$
giving
$$a=\frac13,b=\frac12,c=\frac16.$$
$$S_2(n)=\frac{2n^3+3n^2+n}6.$$
For any power, you get a triangular system of equations where you recognize a part of Pascal's triangle, with alternating signs, as in the sum of cubes:
$$S_3(n)-S_3(n-1)=n^3=4an^3+(-6a+3b)n^2+(4a-3b+2c)n+(-a+b-c+d),$$
$$\color{blue}{4}a=1\\-\color{blue}{6}a+\color{blue}{3}b=0\\\color{blue}{4}a-\color{blue}{3}b+\color{blue}{2}c=0\\-\color{blue}{1}a\ +\color{blue}{1}b-\color{blue}{1}c+\color{blue}{1}d=0,$$
giving
$$a=\frac14,b=\frac12,c=\frac14,d=0.$$
$$S_3(n)=\frac{n^4+2n^3+n^2}4.$$
</s>