Has anyone heard of this maths formula and where can I find the proof to check my proof is correct? $\sum^n_{i = 1}i + \sum^{n-1}_{i=1}i = n^2$

The formula basically is:

The sum of all integers before and including $n$, plus all the integers up to and including $n-1$.

This will find $n^2$.

$$ \sum^n_{i = 1}i + \sum^{n-1}_{i=1}i = n^2 $$


Solution 1:

$$\begin{array}{ccccccc}&&&\square&&&\\ &&\blacksquare&\square&\square\\ &\blacksquare&\blacksquare&\square&\square&\square\\ \blacksquare&\blacksquare&\blacksquare&\square&\square&\square&\square \end{array} \left.\rightarrow\quad \begin{array}{cccc} \square&\blacksquare&\blacksquare&\blacksquare\\ \square&\square&\blacksquare&\blacksquare\\ \square&\square&\square&\blacksquare\\ \square&\square&\square&\square \end{array}\quad\right\}n\\ $$


In numbers,

$$\underbrace{\begin{array}{lrrrrrrrrr} &n&+&n-1&+&n-2&+&\cdots&+&1\\ +&0&+&1&+&2&+&\cdots&+&n-1\\ \hline &n&+&n&+&n&+&\cdots&+&n \end{array}}_n$$


In summation signs,

$$\begin{align*} \sum_{i=1}^ni + \sum_{i=1}^{n-1}i &= \sum_{i=1}^ni + \sum_{i=0}^{n-1}i\\ &= \sum_{i=1}^ni + \sum_{j=1}^{n}(n-j) & (j = n-i)\\ &= \sum_{i=1}^n(i+n-i)\\ &= \sum_{i=1}^n n\\ &= n^2 \end{align*}$$

Solution 2:

It is known that $$\sum_{k=1}^nk=\frac{n(n+1)}{2}.$$ Thus the value of your sum would be $$\sum_{k=1}^nk+\sum_{k=1}^{n-1}k=\frac{n(n+1)}{2}+\frac{(n-1)(n)}{2}=\frac{n^2+n+n^2-n}{2}=\frac{2n^2}{2}=n^2.$$